MPFire erweitert

Samba etwas angepasst
Pakfire ueberfluessigen Text entfernt
Tripwire Policy angepasst


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@702 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
maniacikarus
2007-07-17 19:39:18 +00:00
parent ecd083e0c0
commit 8871b9f2fb
14 changed files with 159 additions and 122 deletions

View File

@@ -5,4 +5,16 @@
/etc/passwd
/etc/shadow
/etc/group
/etc/hosts
/etc/localtime
/etc/httpd/server.crt
/etc/httpd/server.csr
/etc/httpd/server.key
/etc/rc.d/rc.local
/etc/rc.d/rc.firewall.local
/etc/ssh/ssh_host_dsa_key
/etc/ssh/ssh_host_dsa_key.pub
/etc/ssh/ssh_host_key
/etc/ssh/ssh_host_key.pub
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_rsa_key.pub

View File

@@ -1,21 +0,0 @@
var/ipfire/backup/*.system
var/ipfire/backup/backup.key
var/ipfire/backup/sets
var/ipfire/countries.pl
var/ipfire/dhcpc
var/ipfire/eciadsl/modems.db
var/ipfire/eciadsl/firmware00.bin
var/ipfire/header.pl
var/ipfire/general-functions.pl
var/ipfire/lang.pl
var/ipfire/key
var/ipfire/langs
var/ipfire/patches
var/ipfire/ppp/fake-resolv.conf
var/ipfire/red
var/ipfire/time/counter
var/ipfire/firewall/protocols.pl
var/ipfire/firewall/defaultservices
var/ipfire/firewall/icmptypes
var/ipfire/addon-lang
var/ipfire/net-traffic

View File

@@ -1 +0,0 @@
var/ipfire/ethernet/settings

View File

@@ -1,16 +0,0 @@
/etc/passwd
/etc/shadow
/etc/hosts
/etc/localtime
/etc/httpd/server.crt
/etc/httpd/server.csr
/etc/httpd/server.key
/etc/rc.d/rc.local
/etc/rc.d/rc.firewall.local
/etc/ssh/ssh_host_dsa_key
/etc/ssh/ssh_host_dsa_key.pub
/etc/ssh/ssh_host_key
/etc/ssh/ssh_host_key.pub
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_rsa_key.pub
/var/ipfire/

View File

@@ -9,7 +9,7 @@ require "${General::swroot}/header.pl";
my $filename = "";
my %songs = "";
my $debug = 1;
my $debug = 0;
if ($ARGV[0] eq 'scan') {
my $command = "find ";
@@ -36,16 +36,24 @@ if ($ARGV[0] eq 'getdb') {
print %songs;
}
elsif ($ARGV[0] eq 'play') {
&checkplaylist();
if ($debug){print "Yes we are called and we will play $ARGV[1]\n";}
system("/usr/bin/mpg123 -b 1024 --aggressive -q \"$ARGV[1]\" 2>/dev/null >/dev/null &");
}
elsif ($ARGV[0] eq 'stop') {
my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`;
if ( $PID ne "" ){
if ($debug){print "Stopping $PID\n";}
system("kill -KILL $PID");
}
else {&stopweb();}
my $PID = `ps -ef \| grep wget \| grep EXTM3U \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`;
if ( $PID ne '' ){
if ($debug){print "Stopping $PID\n";}
system("kill -KILL $PID");
my $PID = `ps -ef \| grep "mpg123 -b 1024 --aggressive -Zq -" \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`;
if ($debug){print "Killing Process $PID\n";}
system("kill -KILL $PID");
}
else{
my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`;
if ($debug){print "Stopping $PID\n";}
system("kill -KILL $PID");
}
}
elsif ($ARGV[0] eq 'volup') {
if ($debug){print "Increasing Volume\n";}
@@ -56,16 +64,17 @@ elsif ($ARGV[0] eq 'voldown') {
system("/usr/bin/amixer set Master $ARGV[1]%- 2>/dev/null >/dev/null");
}
elsif ($ARGV[0] eq 'playall') {
&checkplaylist();
if ($debug){print "Playing everything\n";}
system("/usr/bin/mpg123 -b 1024 --aggressive -Zq@ /var/ipfire/mpfire/playlist 2>/dev/null >/dev/null &");
}
elsif ($ARGV[0] eq 'pause') {
my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`;
my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`;
if ($debug){print "Pausing Process $PID\n";}
system("kill -STOP $PID");
}
elsif ($ARGV[0] eq 'resume') {
my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`;
my $PID = `ps -ef \| grep mpg123 \| grep playlist \| head -1 \| grep -v "sh -c" \| awk '{ print \$2 }'`;
if ($debug){print "Resuming Process $PID\n";}
system("kill -CONT $PID");
}
@@ -80,35 +89,30 @@ elsif ($ARGV[0] eq 'song') {
my $i = @song;
if ( $i == 0 ){
my $song = `ps -ef \| grep wget \| grep EXTM3U \| grep -v "sh -c"`;
my @song = split(/\//,$song);
print $song[2];
my @song = split(/,/,$song);
print $song[1];
}
else { print $song[$i-1];}
}
elsif ($ARGV[0] eq 'playweb') {
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
if ($debug){print "Playing webstream\n";}
if ($proxysettings{'UPSTREAM_PROXY'}) {
if ($proxysettings{'UPSTREAM_USER'}) {
system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - -p $proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@$proxysettings{'UPSTREAM_PROXY'} 2>/dev/null >/dev/null &");
&checkm3uproxy();
if ($debug){print "Playing webstream\n";}
system("wget -qO - `wget -qO - http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@$proxysettings{'UPSTREAM_PROXY'}$ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");
}
else { system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - -p $proxysettings{'UPSTREAM_PROXY'} 2>/dev/null >/dev/null &");}
else {
&checkm3uproxyuser();
if ($debug){print "Playing webstream\n";}
system("wget -qO - `wget -qO - http://$proxysettings{'UPSTREAM_PROXY'}$ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");}
} else {
system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");
&checkm3u();
if ($debug){print "Playing webstream\n";}
system("wget -qO - `wget -qO - http://$ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");
}
}
elsif ($ARGV[0] eq 'stopweb') {
&stopweb();
}
sub stopweb(){
my $PID = `ps -ef | grep wget | grep EXTM3U | head -1 | awk '{ print \$2 }'`;
if ($debug){print "Stopping $PID\n";}
system("kill -KILL $PID");
my $PID = `ps -ef | grep "mpg123 -b 1024 --aggressive -Zq -" | head -1 | awk '{ print \$2 }'`;
if ($debug){print "Killing Process $PID\n";}
system("kill -KILL $PID");
}
sub getSongInfo(){
my $mp3 = MP3::Tag->new($filename);
@@ -127,3 +131,24 @@ sub getExistingSongs(){
$songs{$Zeile[0]} = "|".$Zeile[1]."|".$Zeile[2]."|".$Zeile[3]."|".$Zeile[4]."|".$Zeile[5]."|".$Zeile[6]."|".$Zeile[7]."|".$Zeile[8]."|".$Zeile[9]."|".$Zeile[10]."|".$Zeile[11]."\n";
}
}
sub checkplaylist(){
my $Datei = "/var/ipfire/mpfire/playlist";
my @Info = stat($Datei);
if ( $Info[7] eq '' ){print "There is no playlist";exit(1);}
}
sub checkm3u(){
my $Datei = system("wget -q --spider http://$ARGV[1]");
if ( $Datei ne '0' ){print "We are unable to get the stream";exit(1);}
}
sub checkm3uproxy(){
my $Datei = system("wget -q --spider http://$ARGV[1]");
if ( $Datei ne '0' ){print "We are unable to get the stream";exit(1);}
}
sub checkm3uproxyuser(){
my $Datei = system("wget -q --spider http://$ARGV[1]");
if ( $Datei ne '0' ){print "We are unable to get the stream";exit(1);}
}

View File

@@ -1,5 +1,5 @@
http://www.89.0rtl.de/webradio/rtl-high.m3u|89.0 RTL Hitradio
http://metafiles.gl-systemhaus.de/wdr/channel_einslive.m3u|Einslive
http://www.deepinside.co.uk/ecoute-deepinside-wmp.m3u|Deepinside Radio European
http://www.bigfm.de/webradio/bigfm-high.m3u|BigFM
http://www.brocken.de/webradio/brocken-high.m3u|Hit-Radio Brocken
www.89.0rtl.de/webradio/rtl-high.m3u|89.0 RTL Hitradio
metafiles.gl-systemhaus.de/wdr/channel_einslive.m3u|Einslive
www.deepinside.co.uk/ecoute-deepinside-wmp.m3u|Deepinside Radio European
www.bigfm.de/webradio/bigfm-high.m3u|BigFM
www.brocken.de/webradio/brocken-high.m3u|Hit-Radio Brocken

View File

@@ -4,11 +4,6 @@ var/ipfire/addon-lang
var/ipfire/auth
#var/ipfire/auth/users
var/ipfire/backup
#var/ipfire/backup/exclude.hardware
#var/ipfire/backup/exclude.system
#var/ipfire/backup/exclude.user
#var/ipfire/backup/include.system
#var/ipfire/backup/include.user
var/ipfire/ca
var/ipfire/certs
#var/ipfire/certs/index.txt

View File

@@ -8,8 +8,8 @@ var/ipfire/mpfire/db
var/ipfire/mpfire/db/songs.db
var/ipfire/mpfire/playlist
var/ipfire/mpfire/settings
usr/lib/perl5/site_perl/5.8.8/MP3/Info.pm
usr/lib/perl5/site_perl/5.8.8/MP3/Tag.pm
usr/lib/perl5/site_perl/5.8.8/MP3/Tag/File.pm
usr/lib/perl5/site_perl/5.8.8/MP3/Tag/ID3v1.pm
usr/lib/perl5/site_perl/5.8.8/MP3/Tag/ID3v2.pm
usr/lib/perl5/5.8.8/MP3/Info.pm
usr/lib/perl5/5.8.8/MP3/Tag.pm
usr/lib/perl5/5.8.8/MP3/Tag/File.pm
usr/lib/perl5/5.8.8/MP3/Tag/ID3v1.pm
usr/lib/perl5/5.8.8/MP3/Tag/ID3v2.pm

View File

@@ -27,10 +27,10 @@ SIG_HI = 100 ; # Critical files that are significant point
$(TWDB) -> $(SEC_CRIT) ;
$(TWPOL)/tw.pol -> $(SEC_CRIT) -i ;
$(TWPOL)/tw.cfg -> $(SEC_CRIT) -i ;
$(TWLKEY)/local.key -> $(SEC_CRIT) ;
$(TWLKEY)/local.key -> $(SEC_CRIT) ;
$(TWSKEY)/site.key -> $(SEC_CRIT) ;
/bin -> $(SEC_CRIT) ;
/bin -> $(SEC_CRIT) ;
/boot -> $(SEC_CRIT) ;
/etc -> $(SEC_CRIT) ;
/lib -> $(SEC_CRIT) ;
@@ -39,6 +39,7 @@ SIG_HI = 100 ; # Critical files that are significant point
/sbin -> $(SEC_CRIT) ;
/usr -> $(SEC_CRIT) ;
!/usr/src ;
!usr/share/clamav ;
/etc/mtab -> $(SEC_CONFIG) -i ; # Inode number changes on any mount/unmount
#don't scan the individual reports
@@ -70,5 +71,5 @@ SIG_HI = 100 ; # Critical files that are significant point
/proc/mounts -> $(Device) ;
/proc/filesystems -> $(Device) ;
/proc/misc -> $(Device) ;
/var/log -> $(SEC_CONFIG) ;
}
/var/log -> $(SEC_LOG) ;
}