aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2006-08-25 22:09:55 +0000
committerPetter Reinholdtsen <pere@hungry.com>2006-08-25 22:09:55 +0000
commitd4eb01b361e7910a2e64346665dffeda2f8d76be (patch)
tree43a123eac065628649e9ef3d1102db1d5b20f91c
parent2c95ddb70c7ee2a57cbfc9f10ecff0e5ea800952 (diff)
downloadsitesummary-d4eb01b361e7910a2e64346665dffeda2f8d76be.tar.gz
sitesummary-d4eb01b361e7910a2e64346665dffeda2f8d76be.tar.bz2
sitesummary-d4eb01b361e7910a2e64346665dffeda2f8d76be.tar.xz
Make sure the new content replaces the old.
-rw-r--r--sitesummary-collector.cgi6
1 files 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;
}