From d4eb01b361e7910a2e64346665dffeda2f8d76be Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Fri, 25 Aug 2006 22:09:55 +0000 Subject: Make sure the new content replaces the old. --- sitesummary-collector.cgi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sitesummary-collector.cgi b/sitesummary-collector.cgi index 51dd193..bf98d81 100644 --- a/sitesummary-collector.cgi +++ b/sitesummary-collector.cgi @@ -102,9 +102,11 @@ sub process_entry { $eth0mac = $1 if (m/eth0\s+Link encap:Ethernet HWaddr (\S+)/); } close (IFCONFIG); - print STDERR "MAC: $eth0mac\n"; + #print STDERR "MAC: $eth0mac\n"; my $newdir = "$basedir/entries/ether-$eth0mac"; - unlink $newdir if ( -d $newdir ); + + `rm -r $newdir` if ( -d $newdir ); + rename $dirname, $newdir || die; } -- cgit v1.2.3