]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Korrektur MPFire CGI
authormaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Thu, 23 Aug 2007 19:09:31 +0000 (19:09 +0000)
committermaniacikarus <maniacikarus@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Thu, 23 Aug 2007 19:09:31 +0000 (19:09 +0000)
Language nachgetragen
Syslogctrl angepasst
Tunerrd geloescht

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@814 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/rootfiles/common/stage2
doc/language_issues.de
doc/language_issues.en
html/cgi-bin/mpfire.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
src/misc-progs/syslogdctrl.c
src/scripts/tunerrd.pl [deleted file]

index 67b2d07d9f21c75b275b0ee859bffd8bd08ddb8d..c874a33fc833879b1e4ca7c3b20e73834aec9129 100644 (file)
@@ -67,7 +67,6 @@ usr/local/bin/setddns.pl
 usr/local/bin/setreservedports
 usr/local/bin/settime
 usr/local/bin/timecheck
-usr/local/bin/tunerrd.pl
 usr/local/bin/vpn-watch
 #usr/local/include
 #usr/local/lib
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7b19734f83e849ac7af4cb8f36dd4c6d96dd3d56 100644 (file)
@@ -0,0 +1 @@
+WARNING: translation string unused: psk
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7b19734f83e849ac7af4cb8f36dd4c6d96dd3d56 100644 (file)
@@ -0,0 +1 @@
+WARNING: translation string unused: psk
index c2dd67ae95a10785a501ce701284cf5c681c292f..0a17a04f6d29f88c086b6d15e472f9dbccfe25c3 100644 (file)
@@ -231,9 +231,13 @@ foreach (@songdb){
   @year = sort keys %hash;
   my %hash = map{ $_, 1 }@genre;
   @genre = sort keys %hash;
+  my $artistcount = $#artist+1;
+  my $albumcount = $#album+1;
+  my $yearcount = $#year+1;
+  my $genrecount = $#genre+1;
 print "<table width='95%' cellspacing='0'>";
 if ( $#songdb eq '-1' ) {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'}</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'}</b></td></tr>";}
-else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'} - $#artist</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'} - $#album</b></td></tr>";}
+else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'artist'} - ".$artistcount."</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'album'} - ".$albumcount."</b></td></tr>";}
 print <<END
   <tr><td align='center'>
       <form method='post' action='$ENV{'SCRIPT_NAME'}'>
@@ -261,7 +265,7 @@ print <<END
 END
 ;
 if ( $#songdb eq '-1' ) {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'year'}</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'genre'}</b></td></tr>";}
-else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'year'} - $#year</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'genre'} - $#genre</b></td></tr>";}
+else {print "<tr><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'year'} - ".$yearcount."</b></td><td align='center' bgcolor='$color{'color20'}'><b>$Lang::tr{'genre'} - ".$genrecount."</b></td></tr>";}
 print <<END
   <tr><td align='center'>
       <form method='post' action='$ENV{'SCRIPT_NAME'}'>
index 014520b380b2622bb757ec39f9fc20e4a1f581f6..97987fd2c8e97556f5066cd71bb16843bd467910 100644 (file)
 'proxy access graphs' => 'Diagramme zur Proxyauslastung',
 'proxy log viewer' => 'Ansicht Proxy-Log',
 'proxy logs' => 'Proxy-Logdateien',
+'psk' => 'PSK',
 'pulse' => 'Puls',
 'pulse dial' => 'Pulswahl:',
 'qos graphs' => 'Qos Diagramme',
index 25117564a75acbb916ac058df27e912cd1117194..d6334422cb389baff4e71f298da77b9583edff51 100644 (file)
 'proxy access graphs' => 'Proxy access graphs',
 'proxy log viewer' => 'Proxy log viewer',
 'proxy logs' => 'Proxy Logs',
+'psk' => 'PSK',
 'pulse' => 'Pulse',
 'pulse dial' => 'Pulse dial:',
 'qos graphs' => 'Qos Graphs',
index 25222c8542ac804c5281b3395ff5105ac53ef2fa..4e21d7a3cee40ce60ce16c85b1f050e55caac8c4 100644 (file)
@@ -24,7 +24,7 @@
 
 #define ERR_ANY 1
 #define ERR_SETTINGS 2    /* error in settings file */
-#define ERR_ETC 3         /* error with CONFIG_ROOT/etc permissions */
+#define ERR_ETC 3         /* error with /etc permissions */
 #define ERR_CONFIG 4      /* error updated sshd_config */
 #define ERR_SYSLOG 5      /* error restarting syslogd */
 
@@ -45,7 +45,7 @@ int main(void)
    /* Read in and verify config */
    kv=initkeyvalues();
 
-   if (!readkeyvalues(kv, CONFIG_ROOT "/logging/settings"))
+   if (!readkeyvalues(kv, "/logging/settings"))
    {
       fprintf(stderr, "Cannot read syslog settings\n");
       exit(ERR_SETTINGS);
@@ -78,55 +78,55 @@ int main(void)
    freekeyvalues(kv);
 
 
-   /* If anyone other than root can write to CONFIG_ROOT/etc this would be totally
-    * insecure - same if anyone other than root owns CONFIG_ROOT/etc, as they could
+   /* If anyone other than root can write to /etc this would be totally
+    * insecure - same if anyone other than root owns /etc, as they could
     * change the file mode to give themselves or anyone else write access. */
 
-   if(lstat(CONFIG_ROOT "/etc",&st))
+   if(lstat("/etc",&st))
    {
-      perror("Unable to stat" CONFIG_ROOT "/etc");
+      perror("Unable to stat /etc");
       exit(ERR_ETC);
    }
    if(!S_ISDIR(st.st_mode))
    {
-      fprintf(stderr,CONFIG_ROOT "/etc is not a directory?!\n");
+      fprintf(stderr, "/etc is not a directory?!\n");
       exit(ERR_ETC);
    }
    if ( st.st_uid != 0  ||  st.st_mode & S_IWOTH ||
       ((st.st_gid != 0) && (st.st_mode & S_IWGRP)) )
    {
-      fprintf(stderr,CONFIG_ROOT "/etc is owned/writable by non-root users\n");
+      fprintf(stderr, "/etc is owned/writable by non-root users\n");
       exit(ERR_ETC);
    }
 
    /* O_CREAT with O_EXCL will make open() fail if the file already exists -
     * mostly to prevent 2 copies running at once */
-   if ((config_fd = open( CONFIG_ROOT "/etc/syslog.conf.new", O_WRONLY|O_CREAT|O_EXCL, 0644 )) == -1 )
+   if ((config_fd = open( "/etc/syslog.conf.new", O_WRONLY|O_CREAT|O_EXCL, 0644 )) == -1 )
    {
       perror("Unable to open new config file");
       exit(ERR_CONFIG);
    }
 
    if (!strcmp(buffer,"on"))
-      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@\\).\\+$/\\1%s/' " CONFIG_ROOT "/etc/syslog.conf >&%d", hostname, config_fd );
+      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@\\).\\+$/\\1%s/' /etc/syslog.conf >&%d", hostname, config_fd );
    else
-      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@.\\+\\)$/#\\1/' " CONFIG_ROOT "/etc/syslog.conf >&%d", config_fd );
+      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@.\\+\\)$/#\\1/' /etc/syslog.conf >&%d", config_fd );
       
-      snprintf(buffer, STRING_SIZE - 1, "&& /bin/sed -e 's/*.\/var\/log\/messages/%s \/var\/log\/messages/' " CONFIG_ROOT "/etc/syslog.conf >&%d", varmessages, config_fd );
+      snprintf(buffer, STRING_SIZE - 1, "&& /bin/sed -e 's/*.\/var\/log\/messages/%s \/var\/log\/messages/' /etc/syslog.conf >&%d", varmessages, config_fd );
 
    /* if the return code isn't 0 failsafe */
    if ((rc = unpriv_system(buffer,99,99)) != 0)
    {
       fprintf(stderr, "sed returned bad exit code: %d\n", rc);
       close(config_fd);
-      unlink(CONFIG_ROOT "/etc/syslog.conf.new");
+      unlink("/etc/syslog.conf.new");
       exit(ERR_CONFIG);
    }
    close(config_fd);
-   if (rename(CONFIG_ROOT "/etc/syslog.conf.new", CONFIG_ROOT "/etc/syslog.conf") == -1)
+   if (rename("/etc/syslog.conf.new /etc/syslog.conf") == -1)
    {
       perror("Unable to replace old config file");
-      unlink(CONFIG_ROOT "/etc/syslog.conf.new");
+      unlink("/etc/syslog.conf.new");
       exit(ERR_CONFIG);
    }
 
diff --git a/src/scripts/tunerrd.pl b/src/scripts/tunerrd.pl
deleted file mode 100644 (file)
index 758f717..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/perl\r
-\r
-use RRDs;\r
-\r
-# Settings\r
-my $rrdlog = "/var/log/rrd";\r
-$ENV{PATH}="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";\r
-\r
-RRDs::tune ("$rrdlog/cpu.rrd",\r
-"-h", "user:600",\r
-"-h", "system:600",\r
-"-h", "idle:600");\r
-\r
-RRDs::tune ("$rrdlog/mem.rrd",\r
-"-h", "memused:600",\r
-"-h", "memfree:600",\r
-"-h", "memshared:600",\r
-"-h", "membuffers:600",\r
-"-h", "memcache:600",\r
-"-h", "swapused:600",\r
-"-h", "swapfree:600");\r
-\r
-RRDs::tune ("$rrdlog/disk.rrd",\r
-"-h", "readsect:600",\r
-"-h", "writesect:600");\r
-\r
-RRDs::tune ("$rrdlog/RED.rrd",\r
-"-h", "incoming:600",\r
-"-h", "outgoing:600");\r
-\r
-RRDs::tune ("$rrdlog/GREEN.rrd",\r
-"-h", "incoming:600",\r
-"-h", "outgoing:600");\r
-# end of script\r