diff --git a/tmcd/freebsd/prepare b/tmcd/freebsd/prepare index 11e2655728c677e98c2ba5600584d9338e2d2c60..a41b898273490c18049bddd4060e600a79dcd860 100755 --- a/tmcd/freebsd/prepare +++ b/tmcd/freebsd/prepare @@ -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,