Commit 5e8cf0e2 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Remove all the spool files in /var/mail, not just root.

parent ca8fba0c
......@@ -18,7 +18,7 @@ my $FSTAB = "/etc/fstab";
my $LOGDIR = "/var/log";
my $RUNDIR = "/var/run";
my $HISTORY = "/root/.history";
my $MAILFILE = "/var/mail/root";
my $MAILDIR = "/var/mail";
my $LEASES = "/var/db/dhclient.leases";
my $NTPDRIFT = "/etc/ntp.drift";
my $SFSUSERS = "/etc/sfs/sfs_users";
......@@ -126,11 +126,8 @@ 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 "Cleaning mail spool files ...\n";
system("rm -rf $MAILDIR/*");
#
# Just removing the drift file results in no drift being tracked,
......
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