Move hddshutdown status from /tmp to /var/run

tmp is now again on harddisk
This commit is contained in:
Arne Fitzenreiter
2008-10-08 23:19:01 +02:00
parent 3799d28413
commit 965f45472d
6 changed files with 22 additions and 21 deletions

View File

@@ -195,8 +195,8 @@ sub diskbox {
my $disk = $_[0];
chomp $disk;
my @status;
if (-e "/tmp/hddstatus"){
open(DATEI, "</tmp/hddstatus") || die "Datei nicht gefunden";
if (-e "/var/run/hddstatus"){
open(DATEI, "</var/run/hddstatus") || die "Datei nicht gefunden";
my @diskstate = <DATEI>;
close(DATEI);
@@ -205,7 +205,7 @@ sub diskbox {
}
if ( $status[1]=~/standby/){
my $ftime = localtime((stat("/tmp/hddshutdown-$disk"))[9]);
my $ftime = localtime((stat("/var/run/hddshutdown-$disk"))[9]);
print"<B>Disk $disk status:<font color=#FF0000>".$status[1]."</font></B> (since $ftime)";
}else{
print"<B>Disk $disk status:<font color=#00FF00>".$status[1]."</font></B>";