diff --git a/html/cgi-bin/hardwaregraphs.cgi b/html/cgi-bin/hardwaregraphs.cgi
index a25d511ff..ad3ff59dc 100644
--- a/html/cgi-bin/hardwaregraphs.cgi
+++ b/html/cgi-bin/hardwaregraphs.cgi
@@ -144,7 +144,7 @@ elsif ($cgigraphs[1] =~ /(hdd)/)
{
my $output = `/bin/cat /var/log/hddgraph_smartctl_out`;
$output = &Header::cleanhtml($output);
- print "
$output \n";
+ print " \n";
}
}
else
@@ -223,7 +223,7 @@ else
my $ftime = localtime((stat("$graphdir/hddtemp-day.png"))[9]);
print "";
print "$Lang::tr{'the statistics were last updated at'}: $ftime \n";
- print "";
+ print " ";
print " ";
print " ";
}
diff --git a/html/cgi-bin/shutdown.cgi b/html/cgi-bin/shutdown.cgi
index 79717e27f..b92bf0c86 100644
--- a/html/cgi-bin/shutdown.cgi
+++ b/html/cgi-bin/shutdown.cgi
@@ -20,7 +20,6 @@ require "${General::swroot}/header.pl";
my %cgiparams=();
my $death = 0;
my $rebirth = 0;
-my $default_time = '03:15';
&Header::showhttpheaders();
@@ -30,34 +29,11 @@ $cgiparams{'ACTION'} = '';
if ($cgiparams{'ACTION'} eq $Lang::tr{'shutdown'}) {
$death = 1;
&General::log($Lang::tr{'shutting down ipfire'});
- #system '/usr/local/bin/ipfiredeath';
system '/usr/local/bin/ipfirereboot down';
} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'reboot'}) {
$rebirth = 1;
&General::log($Lang::tr{'rebooting ipfire'});
- #system '/usr/local/bin/ipfirerebirth';
system '/usr/local/bin/ipfirereboot boot';
-} elsif ($cgiparams{'ACTION'} eq $Lang::tr{'save'}) {
- my $days='';
- my $n = 1;
- # build list of days
- map ($cgiparams{$_} eq 'on' ? $days .= ",".$n++ : $n++ ,
- ('MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY','SUNDAY') );
-
- # if days is empty, it is a remove else it is a change
- if (length ($days)){
- substr($days,0,1) = ''; #kill front comma
- &General::log("Scheduling reboot on $days at $cgiparams{'TIME'}");
- my $min;
- my $hour;
- ($hour,$min) = split (':', $cgiparams{'TIME'});
- $days = "'*'" if ($days eq '1,2,3,4,5,6,7');
- my $mode = ($cgiparams{'MODE'} eq 'halt') ? '-h' : '-r';
- system "/usr/local/bin/ipfirereboot cron+ $min $hour $days $mode"; #reboot checks values of $hour & $min
- } else {
- &General::log("Remove scheduled reboot");
- system '/usr/local/bin/ipfirereboot cron-';
- }
}
if ($death == 0 && $rebirth == 0) {
@@ -79,121 +55,6 @@ END
;
&Header::closebox();
- &Header::openbox('100%', 'left', $Lang::tr{'reboot schedule'});
- my %checked=();
- my $reboot_at = $default_time;
- my $days = '';
-
- #decode the shutdown line stored in crontab
- #get the line
- open(FILE, "/usr/local/bin/ipfirereboot cron?|");
- my $schedule = ;
- close (FILE);
-
- if ($schedule) { # something exist
- $schedule =~ /(\d+) (\d+) \* \* ([1234567*,]+) .* (-[h|r])/;
- $reboot_at = sprintf("%.02d",$2) . ':' . sprintf("%.02d",$1); # hour (03:45)
- $days = $3; # 1,2,3... or *
- if ($4 eq '-h') {
- $checked{'MODE'}{'halt'} = "checked='checked'";
- } else {
- $checked{'MODE'}{'reboot'} = "checked='checked'";
- }
- }
- #decode $days
- if ($days eq '*') {
- $checked{'MONDAY'} = "checked='checked'";
- $checked{'TUESDAY'} = "checked='checked'";
- $checked{'WEDNESDAY'} = "checked='checked'";
- $checked{'THURSDAY'} = "checked='checked'";
- $checked{'FRIDAY'} = "checked='checked'";
- $checked{'SATURDAY'} = "checked='checked'";
- $checked{'SUNDAY'} = "checked='checked'";
- } else {
- $checked{'MONDAY'} = "checked='checked'" if ($days =~ /1/);
- $checked{'TUESDAY'} = "checked='checked'" if ($days =~ /2/);
- $checked{'WEDNESDAY'} = "checked='checked'" if ($days =~ /3/);
- $checked{'THURSDAY'} = "checked='checked'" if ($days =~ /4/);
- $checked{'FRIDAY'} = "checked='checked'" if ($days =~ /5/);
- $checked{'SATURDAY'} = "checked='checked'" if ($days =~ /6/);
- $checked{'SUNDAY'} = "checked='checked'" if ($days =~ /7/);
- }
-
- print <
-
- $Lang::tr{'time'}
- $Lang::tr{'day'}
- $Lang::tr{'action'}
-
-
-END
- ;
- print "", &select_hour_var("TIME", $reboot_at);
- print <
-
-
-
- $Lang::tr{'monday'}
-
-
- $Lang::tr{'reboot'}
-
-
-
-
- $Lang::tr{'tuesday'}
-
-
- $Lang::tr{'shutdown'}
-
-
-
-
-
- $Lang::tr{'wednesday'}
-
-
-
-
-
- $Lang::tr{'thursday'}
-
-
-
-
-
- $Lang::tr{'friday'}
-
-
-
-
-
- $Lang::tr{'saturday'}
-
-
-
-
-
- $Lang::tr{'sunday'}
-
-
-
-
-END
-;
- &Header::closebox();
- print "\n";
} else {
my $message='';
my $title='';
@@ -224,26 +85,3 @@ END
&Header::closebigbox();
&Header::closepage();
-
-
-
-# Create a named select box containing valid times from quarter to quarter.
-sub select_hour_var {
- # Create a variable containing the SELECT with selected value variable name and current value selected
- my $select_hour_var = shift;
- my $selected_hour = shift;
-
- my $select_hour = "";
- my $hh = 0;
- my $mm = 15;
- my $str = '00:00';
- for (my $x=0; $x<(24*4); $x++) {
- my $check = $selected_hour eq $str ? "selected='selected'" : '';
- $select_hour .= "$str";
- $str = sprintf("%.02d", $hh) . ":" . sprintf("%.02d", $mm);
- $mm += 15;
- if ($mm==60) {$mm=0; $hh++; }
- }
- $select_hour .= " \n";
- return ($select_hour);
-}