From: ms
Date: Mon, 5 Jun 2006 11:30:07 +0000 (+0000)
Subject: Hinzugefügt:
X-Git-Tag: v2.3-beta1~1094
X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=39a7cc119ab47d4ef5c06d61c99abbeb09a9f130
Hinzugefügt:
* Kleiner Tux im Webinterface für den eXciter und den Benne :)
Geändert:
* time.cgi überarbeitet und Funktion verbessert.
* index.cgi - noch ein Paar Fehler behoben oder was hinzugefügt.
* FLASH-Eintrag aus der crontab gelöscht.
* Online-Hilfe-Rettungsringe (die hässlichen) aus den CGIs entfernt.
* Logger von ipcop nach ipfire umgestellt.
Gelöscht:
* Nicht benötigte Reste vom IPCop entfernt.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@160 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
---
diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl
index b40327a625..d8c2bb959f 100644
--- a/config/cfgroot/general-functions.pl
+++ b/config/cfgroot/general-functions.pl
@@ -23,14 +23,14 @@ $|=1; # line buffering
$General::version = 'VERSION';
$General::swroot = 'CONFIG_ROOT';
$General::noipprefix = 'noipg-';
-$General::adminmanualurl = 'http://www.ipcop.org/1.4.0/en/admin/html';
+$General::adminmanualurl = 'http://users.ipfire.eu';
sub log
{
my $logmessage = $_[0];
$logmessage =~ /([\w\W]*)/;
$logmessage = $1;
- system('/usr/bin/logger', '-t', 'ipcop', $logmessage);
+ system('/usr/bin/logger', '-t', 'ipfire', $logmessage);
}
sub readhash
@@ -481,7 +481,7 @@ sub FetchPublicIp {
my ($out, $response) = Net::SSLeay::get_http( 'checkip.dyndns.org',
80,
"/",
- Net::SSLeay::make_headers('User-Agent' => 'Ipcop' )
+ Net::SSLeay::make_headers('User-Agent' => 'IPFire' )
);
if ($response =~ m%HTTP/1\.. 200 OK%) {
$out =~ /Current IP Address: (\d+.\d+.\d+.\d+)/;
diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl
index 065bb690b2..3d84c1cc28 100644
--- a/config/cfgroot/header.pl
+++ b/config/cfgroot/header.pl
@@ -760,7 +760,7 @@ END
&showsubsection($menu);
print <
diff --git a/config/cfgroot/time-settings b/config/cfgroot/time-settings
index 2f74f9ccc9..577b0b3455 100644
--- a/config/cfgroot/time-settings
+++ b/config/cfgroot/time-settings
@@ -3,5 +3,5 @@ UPDATE_PERIOD=daily
UPDATE_VALUE=1
UPDATE_METHOD=manually
ENABLENTP=off
-NTP_ADDR_1=pool.ntp.org
+NTP_ADDR_1=de.pool.ntp.org
VALID=yes
diff --git a/config/cron/crontab b/config/cron/crontab
index 435328befe..f51a686a4d 100644
--- a/config/cron/crontab
+++ b/config/cron/crontab
@@ -9,9 +9,6 @@ HOME=/
# Log rotation
01 * * * * /usr/sbin/logrotate /etc/logrotate.conf
-# Backup logs to flashdisk
-01 * * * * [ -f "/etc/FLASH" ] && /etc/rc.d/rc.flash.down
-
# Set time
*/5 * * * * /usr/local/bin/timecheck > /dev/null 2>&1
diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi
index be7e0bf531..11fbb6a187 100644
--- a/html/cgi-bin/dhcp.cgi
+++ b/html/cgi-bin/dhcp.cgi
@@ -576,9 +576,7 @@ print < $Lang::tr{'this field may be blank'} |
$warnNTPmessage |
|
-
-
- |
+ |
diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi
index 7bcf445224..9233628df3 100644
--- a/html/cgi-bin/index.cgi
+++ b/html/cgi-bin/index.cgi
@@ -102,13 +102,12 @@ print <
-
$Lang::tr{'network'}
| IP
| $Lang::tr{'status'}
-
|
$Lang::tr{'internet'}:
- | $ipaddr | $connstate
+ | $ipaddr
+ | $connstate
|
|
END
diff --git a/html/cgi-bin/shutdown.cgi b/html/cgi-bin/shutdown.cgi
index 4ccf805ae0..cd0ace7d3f 100644
--- a/html/cgi-bin/shutdown.cgi
+++ b/html/cgi-bin/shutdown.cgi
@@ -186,9 +186,7 @@ END
|
-
-
- |
+
diff --git a/html/cgi-bin/time.cgi b/html/cgi-bin/time.cgi
index aa96479da4..9b599453b5 100644
--- a/html/cgi-bin/time.cgi
+++ b/html/cgi-bin/time.cgi
@@ -19,7 +19,7 @@ use strict;
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
-require 'CONFIG_ROOT/general-functions.pl';
+require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
@@ -46,49 +46,6 @@ $timesettings{'SETYEAR'} = '';
&Header::getcgihash(\%timesettings);
-if ($timesettings{'ACTION'} eq $Lang::tr{'instant update'})
-{
- if ($timesettings{'SETHOUR'} eq '' || $timesettings{'SETHOUR'} < 0 || $timesettings{'SETHOUR'} > 23) {
- $errormessage = $Lang::tr{'invalid time entered'};
- goto UPDTERROR;
- }
- if ($timesettings{'SETMINUTES'} eq '' || $timesettings{'SETMINUTES'} < 0 || $timesettings{'SETMINUTES'} > 59) {
- $errormessage = $Lang::tr{'invalid time entered'};
- goto UPDTERROR;
- }
- if ($timesettings{'SETDAY'} eq '' || $timesettings{'SETDAY'} < 1 || $timesettings{'SETDAY'} > 31) {
- $errormessage = $Lang::tr{'invalid date entered'};
- goto UPDTERROR;
- }
- if ($timesettings{'SETMONTH'} eq '' || $timesettings{'SETMONTH'} < 1 || $timesettings{'SETMONTH'} > 12) {
- $errormessage = $Lang::tr{'invalid date entered'};
- goto UPDTERROR;
- }
- if ($timesettings{'SETYEAR'} eq '' || $timesettings{'SETYEAR'} < 2003 || $timesettings{'SETYEAR'} > 2030) {
- $errormessage = $Lang::tr{'invalid date entered'};
- goto UPDTERROR;
- }
-
-UPDTERROR:
- if ($errormessage) {
- $timesettings{'VALID'} = 'no'; }
- else {
- $timesettings{'VALID'} = 'yes'; }
-
- if ($timesettings{'VALID'} eq 'yes') {
- # we want date in YYYY-MM-DD HH:MM format for date command
- # EAO changed datestring to ISO 6801 format 2003-08-11
- my $datestring = "$timesettings{'SETYEAR'}-$timesettings{'SETMONTH'}-$timesettings{'SETDAY'}";
- my $timestring = "$timesettings{'SETHOUR'}:$timesettings{'SETMINUTES'}";
- # EAO setdate.c also revised for ISO 6801 date format 2003-08-11
- system ('/usr/local/bin/setdate', $datestring, $timestring);
- &General::log("$Lang::tr{'time date manually reset'} $datestring $timestring");
- }
- unless ($errormessage) {
- undef %timesettings;
- }
-}
-
if ($timesettings{'ACTION'} eq $Lang::tr{'save'})
{
if ($timesettings{'ENABLENTP'} eq 'on')
@@ -203,6 +160,7 @@ $timesettings{'ACTION'} = &Header::cleanhtml ($timesettings{'ACTION'});
if ($timesettings{'ACTION'} eq $Lang::tr{'set time now'} && $timesettings{'ENABLENTP'} eq 'on')
{
system ('/bin/touch', "${General::swroot}/time/settimenow");
+ system ('/usr/local/bin/timecheckctrl >& /dev/null');
}
&General::readhash("${General::swroot}/time/settings", \%timesettings);
@@ -213,7 +171,7 @@ if ($timesettings{'VALID'} eq '')
$timesettings{'UPDATE_METHOD'} = 'manually';
$timesettings{'UPDATE_VALUE'} = '1';
$timesettings{'UPDATE_PERIOD'} = 'daily';
- $timesettings{'NTP_ADDR_1'} = 'pool.ntp.org';
+ $timesettings{'NTP_ADDR_1'} = 'de.pool.ntp.org';
$timesettings{'NTP_ADDR_2'} = 'pool.ntp.org';
}
@@ -345,9 +303,7 @@ print < $Lang::tr{'this field may be blank'} |
|
|
-
-
- |
+ |
END
@@ -355,34 +311,6 @@ END
&Header::closebox();
-&Header::openbox('100%', 'left', $Lang::tr{'update time'});
-
-print <
-
-
-
- |
- |
-
-
-END
-;
-&Header::closebox();
-
print "\n";
&Header::closebigbox();
diff --git a/html/cgi-bin/wireless.cgi b/html/cgi-bin/wireless.cgi
index 129e8df238..d73df7034b 100644
--- a/html/cgi-bin/wireless.cgi
+++ b/html/cgi-bin/wireless.cgi
@@ -225,9 +225,7 @@ print <
-
-
- |
+ |
END
diff --git a/html/html/images/iptux.png b/html/html/images/iptux.png
new file mode 100644
index 0000000000..38a754ba03
Binary files /dev/null and b/html/html/images/iptux.png differ
diff --git a/src/ROOTFILES.i386 b/src/ROOTFILES.i386
index 1ddae00ff1..e064e7c3b1 100644
--- a/src/ROOTFILES.i386
+++ b/src/ROOTFILES.i386
@@ -1361,8 +1361,9 @@ usr/local/bin/setddns.pl
usr/local/bin/setreservedports
usr/local/bin/settime
usr/local/bin/timecheck
+usr/local/bin/timecheckctrl
#usr/local/bin/tunerrd.pl
-usr/local/bin/updatelists.pl
+#usr/local/bin/updatelists.pl
usr/local/bin/resetusb
#usr/local/doc
#usr/local/etc
diff --git a/src/misc-progs/Makefile b/src/misc-progs/Makefile
index b896748294..06c98eaf4b 100644
--- a/src/misc-progs/Makefile
+++ b/src/misc-progs/Makefile
@@ -9,7 +9,7 @@ SUID_PROGS = setdmzholes setportfw setfilters setxtaccess restartdhcp restartsno
ipfirebkcfg ipfirerscfg installpackage installfcdsl ipsecctrl \
setaliases ipfirebackup restartntpd \
restartapplejuice setdate rebuildhosts \
- restartsyslogd logwatch openvpnctrl
+ restartsyslogd logwatch openvpnctrl timecheckctrl
# restartwireless
install : all
@@ -78,5 +78,8 @@ restartwireless: restartwireless.c setuid.o ../install+setup/libsmooth/varval.o
ipsecctrl: ipsecctrl.c setuid.o ../install+setup/libsmooth/varval.o
$(COMPILE) -I../install+setup/libsmooth/ ipsecctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
+timecheckctrl: timecheckctrl.c setuid.o ../install+setup/libsmooth/varval.o
+ $(COMPILE) -I../install+setup/libsmooth/ timecheckctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
+
ipfirebackup: ipfirebackup.c setuid.o
$(COMPILE) -lcrypt ipfirebackup.c setuid.o -o $@
diff --git a/src/misc-progs/timecheckctrl.c b/src/misc-progs/timecheckctrl.c
new file mode 100644
index 0000000000..f6617836a7
--- /dev/null
+++ b/src/misc-progs/timecheckctrl.c
@@ -0,0 +1,25 @@
+/* SmoothWall helper program - smoothiedeath
+ *
+ * This program is distributed under the terms of the GNU General Public
+ * Licence. See the file COPYING for details.
+ *
+ * (c) Lawrence Manning, 2001
+ * Simple program intended to be installed setuid(0) that can be used for
+ * starting shutdown.
+ *
+ * $Id: ipcopdeath.c,v 1.2 2003/12/11 10:57:34 riddles Exp $
+ *
+ */
+
+#include
+#include "setuid.h"
+
+int main(void)
+{
+ if (!(initsetuid()))
+ exit(1);
+
+ safe_system("/usr/local/bin/timecheck");
+
+ return 0;
+}
diff --git a/src/scripts/makegraphs b/src/scripts/makegraphs
index 42773338a8..1120fd8488 100644
--- a/src/scripts/makegraphs
+++ b/src/scripts/makegraphs
@@ -89,7 +89,7 @@ sub updatecpugraph {
"--alt-y-grid", "-w 600", "-h 100", "-l 0", "-u 100", "-r",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
- "--color", "BACK#EAE9EE",
+ "--color", "BACK#FFFFFF",
"-t $tr{'cpu usage per'} $tr{$period}",
"DEF:user=$rrdlog/cpu.rrd:user:AVERAGE",
"DEF:system=$rrdlog/cpu.rrd:system:AVERAGE",
@@ -156,7 +156,7 @@ sub updatememgraph {
"--alt-y-grid", "-w 600", "-h 100", "-l 0", "-u 100", "-r",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
- "--color", "BACK#EAE9EE",
+ "--color", "BACK#FFFFFF",
"-t $tr{'memory usage per'} $tr{$period}",
"DEF:used=$rrdlog/mem.rrd:memused:AVERAGE",
"DEF:free=$rrdlog/mem.rrd:memfree:AVERAGE",
@@ -198,7 +198,7 @@ sub updatememgraph {
"--alt-y-grid", "-w 600", "-h 100", "-l 0", "-u 100", "-r",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
- "--color", "BACK#EAE9EE",
+ "--color", "BACK#FFFFFF",
"-t $tr{'swap usage per'} $tr{$period}",
"DEF:used=$rrdlog/mem.rrd:swapused:AVERAGE",
"DEF:free=$rrdlog/mem.rrd:swapfree:AVERAGE",
@@ -269,7 +269,7 @@ sub updatediskgraph {
"--alt-y-grid", "-w 600", "-h 100", "-l 0", "-r",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
- "--color", "BACK#EAE9EE",
+ "--color", "BACK#FFFFFF",
"-t $tr{'disk access per'} $tr{$period}",
"DEF:read=$rrdlog/disk.rrd:readsect:AVERAGE",
"DEF:write=$rrdlog/disk.rrd:writesect:AVERAGE",
@@ -350,7 +350,7 @@ sub updateifgraph {
"--alt-y-grid", "-w 600", "-h 100",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
- "--color", "BACK#EAE9EE",
+ "--color", "BACK#FFFFFF",
"-t $tr{'traffic on'} $interface ($tr{'graph per'} $tr{$period})",
"-v$tr{'bytes per second'}",
"DEF:incoming=$rrdlog/$interface.rrd:incoming:AVERAGE",
@@ -398,7 +398,7 @@ sub updatefwhitsgraph {
"--alt-y-grid", "-w 600", "-h 200",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
- "--color", "BACK#EAE9EE",
+ "--color", "BACK#FFFFFF",
"-t firewall hits over the last $interval",
"DEF:amount=$rrdlog/firewallhits.rrd:amount:AVERAGE",
"AREA:amount#6464FF:firewallhits",
@@ -418,7 +418,7 @@ sub updatefwhitsgraph {
"--alt-y-grid", "-w 600", "-h 200",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
- "--color", "BACK#EAE9EE",
+ "--color", "BACK#FFFFFF",
"-t firewall hits over the last $interval",
"DEF:amount=$rrdlog/firewallhits.rrd:amount:AVERAGE",
"LINE2:amount#6464FF:firewallhits",
@@ -545,7 +545,7 @@ sub updatelqgraph {
"--lazy",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
- "--color", "BACK#EAE9EE",
+ "--color", "BACK#FFFFFF",
"-v ms / pkts (% x10)",
"DEF:roundtrip=$rrdlog/lq.rrd:roundtrip:AVERAGE",
"DEF:loss=$rrdlog/lq.rrd:loss:AVERAGE",
diff --git a/src/scripts/updatelists.pl b/src/scripts/updatelists.pl
deleted file mode 100644
index 9b534d824e..0000000000
--- a/src/scripts/updatelists.pl
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use LWP::UserAgent;
-require "CONFIG_ROOT/general-functions.pl";
-
-my @this;
-my $return = &downloadlist();
-if($return && $return->is_success) {
- unless(open(LIST, ">CONFIG_ROOT/patches/available")) {
- die "Could not open available lists database.";
- }
- flock LIST, 2;
- @this = split(/----START LIST----\n/,$return->content);
- print LIST $this[1];
- close(LIST);
-} else {
- die "Could not download patches list.";
-}
-
-sub downloadlist {
- unless(-e "CONFIG_ROOT/red/active") {
- die "Not connected.";
- }
-
- my $downloader = LWP::UserAgent->new;
- $downloader->timeout(5);
-
- my %proxysettings;
- &General::readhash("CONFIG_ROOT/proxy/settings", \%proxysettings);
-
- if ($_=$proxysettings{'UPSTREAM_PROXY'}) {
- my ($peer, $peerport) = (/^(?:[a-zA-Z ]+\:\/\/)?(?:[A-Za-z0-9\_\.\-]*?(?:\:[A-Za-z0-9\_\.\-]*?)?\@)?([a-zA-Z0-9\.\_\-]*?)(?:\:([0-9]{1,5}))?(?:\/.*?)?$/);
- if ($proxysettings{'UPSTREAM_USER'}) {
- $downloader->proxy("http","http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@"."$peer:$peerport/");
- } else {
- $downloader->proxy("http","http://$peer:$peerport/");
- }
- }
-
- return $downloader->get("http://www.ipcop.org/patches/${General::version}", 'Cache-Control', 'no-cache');
-}
diff --git a/src/scripts/updatesetup b/src/scripts/updatesetup
deleted file mode 100644
index ef9b23a9ea..0000000000
--- a/src/scripts/updatesetup
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-UPGRADEVERSION="1.4.x" # configured by ./make.sh newupdate
-PREVIOUSVERSION="1.4."$((`echo $UPGRADEVERSION | /usr/bin/cut -f3 -d '.'`-1))
-echo "This is the $UPGRADEVERSION update patch for IPCop $PREVIOUSVERSION installing."
-
-CURRENTVERSION=`perl -e "require '/var/ipfire/general-functions.pl';print \\$General::version;"`
-if [ "$CURRENTVERSION" != "$PREVIOUSVERSION" ]; then
- echo "You are not running IPCop v$PREVIOUSVERSION for this patch to install."
- echo "Aborting installation."
- exit -1
-fi
-
-# general-functions might not be overwrited by patch...
-/bin/sed -i -e "s+= '1.4.*$+= '$UPGRADEVERSION';+" /var/ipfire/general-functions.pl
-
-/bin/tar -zxpf patch.tar.gz -C /
-
-#build cachelang file after all "lang/*.pl" updates
-perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
-
-killall mingetty #redisplay correct version
-echo "end of $UPGRADEVERSION update"