From 05882fff6b855eda5469ae1977cf6fed77bdee03 Mon Sep 17 00:00:00 2001 From: maniacikarus Date: Sat, 11 Aug 2007 12:40:01 +0000 Subject: [PATCH] Fixes an MPFire Syntaxfix am ipsec git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@757 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- config/mpfire/mpfire.pl | 2 ++ html/cgi-bin/mpfire.cgi | 18 +++++++++++++++--- src/misc-progs/ipsecctrl.c | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/config/mpfire/mpfire.pl b/config/mpfire/mpfire.pl index b592b463f5..aa6a51e16d 100644 --- a/config/mpfire/mpfire.pl +++ b/config/mpfire/mpfire.pl @@ -60,10 +60,12 @@ elsif ($ARGV[0] eq 'stop') { elsif ($ARGV[0] eq 'volup') { if ($debug){print "Increasing Volume\n";} system("/usr/bin/amixer set Master $ARGV[1]%+ 2>/dev/null >/dev/null"); + system("/usr/bin/amixer set PCM $ARGV[1]%+ 2>/dev/null >/dev/null"); } elsif ($ARGV[0] eq 'voldown') { if ($debug){print "Decreasing Volume\n";} system("/usr/bin/amixer set Master $ARGV[1]%- 2>/dev/null >/dev/null"); + system("/usr/bin/amixer set PCM $ARGV[1]%- 2>/dev/null >/dev/null"); } elsif ($ARGV[0] eq 'playall') { &checkplaylist(); diff --git a/html/cgi-bin/mpfire.cgi b/html/cgi-bin/mpfire.cgi index e2e0e4c086..73c65968c4 100644 --- a/html/cgi-bin/mpfire.cgi +++ b/html/cgi-bin/mpfire.cgi @@ -188,7 +188,11 @@ print < -= $song =- -
total $#songdb songs

+END +; +if ( $#songdb eq '-1' ) {print "
total 0 songs

";} +else {print "
total $#songdb songs

";} +print <
@@ -229,7 +233,11 @@ foreach (@songdb){ @genre = sort keys %hash; print < - $Lang::tr{'artist'} - $#artist$Lang::tr{'album'} - $#album +END +; +if ( $#songdb eq '-1' ) {print "$Lang::tr{'year'}$Lang::tr{'genre'}";} +else {print "$Lang::tr{'year'} - $#year$Lang::tr{'genre'} - $#genre>";} +print <
diff --git a/src/misc-progs/ipsecctrl.c b/src/misc-progs/ipsecctrl.c index 850b36dbe6..763b81f96d 100644 --- a/src/misc-progs/ipsecctrl.c +++ b/src/misc-progs/ipsecctrl.c @@ -269,7 +269,7 @@ int main(int argc, char *argv[]) { if ( (argc == 2) && (file = fopen("/var/run/vpn-watch.pid", "r"))) { safe_system("kill -9 $(cat /var/run/vpn-watch.pid)"); - safe_system("unlink /var/run/vpn-watch.pid)"); + safe_system("unlink /var/run/vpn-watch.pid"); close(file); } -- 2.39.2