Commit b1b79825 authored by Mike Hibler's avatar Mike Hibler

Discovered a few more files that can be purged, only one of any

significance (an audit file under Linux that was several MB)
parent bdacf637
......@@ -163,11 +163,16 @@ if (-f $NTPDRIFT) {
}
print "Cleaning .pid files ...\n";
system("rm -rf $RUNDIR/*.pid");
system("rm -rf $RUNDIR/*.pid /var/spool/*/*.pid");
print "Clearing utmp file ...\n";
system("rm -rf $RUNDIR/utmp");
print "Clearing other $RUNDIR stuff ...\n";
system("rm -f $RUNDIR/*.db $RUNDIR/*.boot $RUNDIR/*.hints $RUNDIR/*.lock");
system("rm -f $RUNDIR/*.sock $RUNDIR/*.sockets");
system("rm -rf $RUNDIR/sudo/*");
print "Cleaning out /tmp ...\n";
system("rm -rf /tmp/* /tmp/.??*");
......@@ -195,6 +200,7 @@ if (-f $SFSUSERS) {
if (-f $SFSHOSTKEY) {
system("rm -f $SFSHOSTKEY");
}
system("rm -f /var/sfs/sockets/*.sock");
print "Clearing out directories in $VARDIR ...\n";
......@@ -212,3 +218,6 @@ foreach my $file (@DEADFILES) {
}
}
system("rm -f /etc/start_if*");
exit 0;
......@@ -13,8 +13,9 @@ require 'ctime.pl';
#
my $DUMPDATES = "/etc/dumpdates";
my @DBFILES = ();
my @SYSVARDIRS = ("lib/dhcp", "spool/clientmqueue");
my @SYSVARDIRS = ("lib/dhcp", "spool/clientmqueue", "log/audit");
my @VARDIRS = ("logs", "db", "jails", "boot", "lock");
my @SOCKETS = ("/dev/log", "/var/run/acpid.socket");
my $FSTAB = "/etc/fstab";
my $LOGDIR = "/var/log";
my $RUNDIR = "/var/run";
......@@ -239,3 +240,14 @@ while ($dirent = readdir(ETC)) {
}
}
closedir(ETC);
print "Removing assorted unix-domain socket files\n";
foreach my $file (@SOCKETS) {
if (-e "$file" && ! -f "$file") {
unlink("$file") or
warn("*** could not remove $file\n");
}
}
exit 0;
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