Commit a31e0abd authored by Mike Hibler's avatar Mike Hibler

Nit: clear out all /var/spool/mail files, not just root's.

parent d58e80e9
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -22,7 +22,7 @@ my $FSTAB = "/etc/fstab";
my $LOGDIR = "/var/log";
my $RUNDIR = "/var/run";
my $HISTORY = ".bash_history";
my $MAILFILE = "/var/spool/mail/root";
my $MAILDIR = "/var/spool/mail";
my $NTPDRIFT1 = "/etc/ntp/drift";
my $NTPDRIFT2 = "/var/lib/ntp/drift";
my $SFSUSERS = "/etc/sfs/sfs_users";
......@@ -233,11 +233,8 @@ if (-f "/root/$HISTORY") {
die("Could not unlink /root/$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/*");
#
# Remove the iftab file (maps ifaces to mac addrs and renames ifaces according
......
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