]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/mpfire/mpfire.pl
kernel: disable FW_LOADER_USER_HELPER_FALLBACK
[people/pmueller/ipfire-2.x.git] / config / mpfire / mpfire.pl
index 6c9b4c11b5eaa1bb042f82e8f24a68fcadd72622..66413145de61a1545bd4ac992a3801d6f7168f39 100644 (file)
@@ -7,10 +7,14 @@ require "${General::swroot}/header.pl";
 my $filename = "";
 my $debug = 0; 
 
+if (  `/etc/init.d/mpd status` =~/not running/ ){
+system("/etc/init.d/mpd start >/dev/null");
+}
+
 if ($ARGV[0] eq 'scan') {
   if ($debug){print "Creating Database\n";}
   system("mpd --create-db >/dev/null");
-  system("/etc/init.d/mpd restart");
+  system("/etc/init.d/mpd restart >/dev/null");
 }
 elsif ($ARGV[0] eq 'play') {
   &checkmute();
@@ -22,13 +26,6 @@ elsif ($ARGV[0] eq 'playadd') {
   if ($debug){print "Yes we are called and we will add $ARGV[1]\n";}
   system("mpc add \"$ARGV[1]\" >/dev/null && mpc play >/dev/null");
   }
-elsif ($ARGV[0] eq 'playlist') {
-  &checkmute();
-  &shuffle();
-  &clearplaylist();
-  if ($debug){print "Yes we are called and we will play your Playlist\n";}
-  system("mpc load playlist >/dev/null && mpc play >/dev/null");
-  }
 elsif ($ARGV[0] eq 'clearplaylist') {
   if ($debug){print "Deleting playlist\n";}
   &clearplaylist();
@@ -86,7 +83,7 @@ sub clearplaylist(){
   }
 
 sub shuffle(){
-  system("mpc shuffle >/dev/null");  
+  system("mpc random >/dev/null");  
   }
 
 sub checkplaylist(){
@@ -102,10 +99,10 @@ sub checkmute(){
   my @PCM = split(/ /,$temp);
  if ( $PCM[7] =~  /off/ ){
   if ($debug){print "PCM was muted - umuting.\n";}
-  system("amixer set PCM toggle");
+  system("amixer set PCM toggle >/dev/null");
   }
  if ( $Master[7] =~ /off/ ){
   if ($debug){print "Master was muted - umuting.\n";}
-  system("amixer set Master toggle");
+  system("amixer set Master toggle >/dev/null");
   } 
 }