[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipcop-cvs
Subject:    [IPCop-cvs] CVS: ipcop/html/cgi-bin index.cgi,1.5.2.8,1.5.2.9
From:       Mark Wormgoor <riddles () users ! sourceforge ! net>
Date:       2003-04-24 8:29:49
[Download RAW message or body]

Update of /cvsroot/ipcop/ipcop/html/cgi-bin
In directory sc8-pr-cvs1:/tmp/cvs-serv25157/html/cgi-bin

Modified Files:
      Tag: IPCOP_v1
	index.cgi 
Log Message:
Index.cgi will show disk error if it's too full (> 90%)

Index: index.cgi
===================================================================
RCS file: /cvsroot/ipcop/ipcop/html/cgi-bin/Attic/index.cgi,v
retrieving revision 1.5.2.8
retrieving revision 1.5.2.9
diff -C2 -d -r1.5.2.8 -r1.5.2.9
*** index.cgi	21 Apr 2003 18:12:34 -0000	1.5.2.8
--- index.cgi	24 Apr 2003 08:29:16 -0000	1.5.2.9
***************
*** 328,331 ****
--- 328,342 ----
  }
  
+ @df = `/bin/df -h -x rootfs`;
+ my $warnmessage = '';
+ foreach $line (@df) {
+ 	next if $line =~ m/Filesystem/;
+ 	$line =~ m/^.* (\d+)\%.*$/;
+ 	if ($1 > 90) {
+ 		@temp = split(/ /,$line);
+ 		$warnmessage .= "<LI> $tr{'filesystem full'}: $temp[0] is at $1% !<BR>";
+ 	}
+ }
+ 
  open(AV, "${swroot}/patches/available") or die "Could not open available patches database ($!)";
  @av = <AV>;
***************
*** 342,359 ****
  if ($#av != -1) 
  {
! 	&openbox('100%', 'CENTER', '');
! 	print $tr{'there are updates'};
! 	&closebox();
  }
  $age = &age("/${swroot}/patches/available");
! if ($age =~ m/(\d{1,3})d/)
! {
! 	if ($1 >= 7)
! 	{
! 		&openbox('100%', 'CENTER', '');
! 		print "$tr{'updates is old1'} $age $tr{'updates is old2'}\n";
! 		&closebox();
  	}
  }
  system('/usr/bin/uptime');
  
--- 353,371 ----
  if ($#av != -1) 
  {
! 	$warnmessage .= "<LI> $tr{'there are updates'}<BR>";
  }
  $age = &age("/${swroot}/patches/available");
! if ($age =~ m/(\d{1,3})d/) {
! 	if ($1 >= 7) {
! 		$warnmessage .= "<LI>$tr{'updates is old1'} $age $tr{'updates is old2'}\n";
  	}
  }
+ 
+ if ($warnmessage) {
+ 	&openbox('100%', 'LEFT', "$tr{'warning messages'}:");
+ 	print "<OL>$warnmessage</OL>";
+ 	closebox()
+ }
+ 
  system('/usr/bin/uptime');
  



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
IPCop-cvs mailing list
IPCop-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic