Commit a7b3eca5 authored by Russ Fish's avatar Russ Fish
Browse files

Tweak Windows node cleanup.

parent 3805c04e
......@@ -130,12 +130,12 @@ sub os_account_cleanup()
mysystem("$NET user $name /delete > /dev/null");
# There will only be an NT homedir if the user has logged in sometime.
system("$CHMOD -R 777 C:/'Documents and Settings'/$name");
system("$CHOWN -Rf root C:/'Documents and Settings'/$name");
system("$RM -rf C:/'Documents and Settings'/$name");
system("$CHMOD -Rf 777 C:/'Documents and Settings'/$name > /dev/null");
system("$CHOWN -Rf root C:/'Documents and Settings'/$name > /dev/null");
system("$RM -rf C:/'Documents and Settings'/$name ");
# It sometimes also makes user.PCnnn, user.PCnnn.000, etc.
system("$CHMOD -R 777 C:/'Documents and Settings'/$name.*");
system("$CHOWN -Rf root C:/'Documents and Settings'/$name.*");
system("$CHMOD -Rf 777 C:/'Documents and Settings'/$name.* > /dev/null");
system("$CHOWN -Rf root C:/'Documents and Settings'/$name.* > /dev/null");
system("$RM -rf C:/'Documents and Settings'/$name.*");
# Unmount the homedir so we can get to the mount point.
......
......@@ -37,6 +37,12 @@ my @DEADFILES = ("rc.agents", "rc.delayagent", "rc.delta", "rc.healthd",
# Drag in path stuff so we can find emulab stuff.
BEGIN { require "/etc/emulab/paths.pm"; import emulabpaths; }
# Only root.
if ($EUID != 0) {
die("*** $0:\n".
" Must be root to run this script!\n");
}
#
# Turn off line buffering on output
#
......@@ -153,8 +159,8 @@ print "Clearing out $RUNDIR ...\n";
system("rm -rf $RUNDIR/*.pid");
print "Clearing out /tmp ...\n";
system("chmod -R 777 /tmp/* /tmp/.??*");
system("chown -R root /tmp");
system("chmod -Rf 777 /tmp/* /tmp/.??* > /dev/null");
system("chown -Rf root /tmp > /dev/null");
system("rm -rf /tmp/* /tmp/.??*");
print "Cleaning out /local/logs ...\n";
......
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