Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a31e0abd
Commit
a31e0abd
authored
Mar 30, 2012
by
Mike Hibler
Browse files
Nit: clear out all /var/spool/mail files, not just root's.
parent
d58e80e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/linux/prepare
View file @
a31e0abd
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-201
0
University of Utah and the Flux Group.
# Copyright (c) 2000-201
2
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
$MAIL
FILE
=
"
/var/spool/mail
/root
";
my
$MAIL
DIR
=
"
/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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment