Commit 921a976b authored by Robert Ricci's avatar Robert Ricci

Added removal of root's mail file to prepare scripts

parent 1e4eeb4e
......@@ -13,6 +13,7 @@ my $FSTAB = "/etc/fstab";
my $LOGDIR = "/var/log";
my $RUNDIR = "/var/run";
my $HISTORY = "/root/.history";
my $MAILFILE = "/var/mail/root";
#
# Load the testbed library.
......@@ -104,6 +105,12 @@ if (-f $HISTORY) {
die("Could not unlink $HISTORY: $!");
}
print "Removing root's mailfile ...\n";
if (-f $MAILFILE) {
unlink($MAILFILE) or
die("Could not unlink $MAILFILE: $!");
}
print "Cleaing .pid files ...\n";
system("rm -rf $RUNDIR/*.pid");
......
......@@ -13,6 +13,7 @@ my $FSTAB = "/etc/fstab";
my $LOGDIR = "/var/log";
my $RUNDIR = "/var/run";
my $HISTORY = "/root/.bash_history";
my $MAILFILE = "/var/spool/mail/root";
#
# Load the testbed library.
......@@ -104,6 +105,12 @@ if (-f $HISTORY) {
die("Could not unlink $HISTORY: $!");
}
print "Removing root's mailfile ...\n";
if (-f $MAILFILE) {
unlink($MAILFILE) or
die("Could not unlink $MAILFILE: $!");
}
print "Cleaing .pid files ...\n";
system("rm -rf $RUNDIR/*.pid");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment