Commit 607504a5 authored by Russ Fish's avatar Russ Fish

Tweaks to the Cygwin scripts, and add my image building notes.

parent 8543c440
......@@ -484,6 +484,10 @@ sub doboot()
# Open up an existing key dir to the root user. Even though root
# is in the Administrators group, it's locked out by permissions.
$cmd = "$CHMOD 777 $sshdir";
if (-e $sshdir && system($cmd) != 0) {
warning("Failed $cmd: $!");
}
$cmd = "$CHOWN -R root $sshdir";
if (-e $sshdir && system($cmd) != 0) {
warning("Failed $cmd: $!");
......@@ -504,6 +508,10 @@ sub doboot()
if (system($cmd) != 0) {
warning("Failed $cmd: $!");
}
$cmd = "$CHMOD 700 $sshdir";
if (system($cmd) != 0) {
warning("Failed $cmd: $!");
}
}
}
}
......
......@@ -118,7 +118,7 @@ sub os_account_cleanup()
# directory as truth.
if (opendir(DIRHANDLE, "/users")) {
while ($name = readdir(DIRHANDLE)) {
if ($name =~ m/^\.+/) {
if ($name =~ m/^\.+/ || $name =~ m/^Administrator$/) {
next;
}
print "Removing user: $name\n";
......@@ -127,15 +127,17 @@ 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.
mysystem("$CHOWN -Rf root C:/'Documents and Settings'/$name");
mysystem("$RM -rf C:/'Documents and Settings'/$name");
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");
# It sometimes also makes user.PCnnn, user.PCnnn.000, etc.
mysystem("$CHOWN -Rf root C:/'Documents and Settings'/$name.*");
mysystem("$RM -rf C:/'Documents and Settings'/$name.*");
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.*");
# Unmount the homedir so we can get to the mount point.
mysystem("$UMOUNT /users/$name");
mysystem("$RMDIR /users/$name");
system("$UMOUNT /users/$name");
system("$RMDIR /users/$name");
}
closedir(DIRHANDLE);
......@@ -150,6 +152,9 @@ sub os_account_cleanup()
next;
}
# Open up an existing key dir to the root user. Even though root
# is in the Administrators group, it's locked out by permissions.
mysystem("$CHMOD 777 /sshkeys/$name");
mysystem("$CHOWN -Rf root /sshkeys/$name");
mysystem("$RM -rf /sshkeys/$name");
}
......
......@@ -67,6 +67,8 @@ foreach my $dbfile (@DBFILES) {
# Stop anything holding a logfile open which we will want to remove below.
print "Stopping the watchdog ...\n";
system("$BINDIR/watchdog stop");
print "Stopping the program-agent ...\n";
system("$BINDIR/rc/rc.progagent shutdown");
print "Cleaning logfiles ...\n";
opendir(LOG,$LOGDIR) or
......@@ -82,7 +84,9 @@ while ($dirent = readdir(LOG)) {
} elsif (-s $file) {
# Truncate other logfiles - many do not get re-created
truncate($file,0) or
die("Could not truncate $file: $!");
system("chown root $file") and system("chmod 666 $file")
and truncate($file,0) or
warn("Could not truncate $file: $!");
}
}
}
......@@ -123,6 +127,7 @@ 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("rm -rf /tmp/* /tmp/.??*");
......
......@@ -91,3 +91,7 @@ ipconfig /all | awk \
# Start up the service which will deliver a SHUTDOWN state event on reboot.
cygrunsrv -S EmulabShutdown
# The status 0 from this echo masks any failure of the above cygrunsrv.
echo rc.cygwin finished.
Log of XP images produced (most recent first.)
. emulab-ops/WINXP-SP0 - Windows XP with no SP's, pc600 and pc850.
6/14/05
prtn 1, whole disk[1], OS Windows, 5.1.0, node pc26, ping/ssh/isup, NORMALv2, pc600 and pc850.
4293596160 input (1640514560 compressed) bytes in 512.770 seconds
Image size: 819986432 bytes
3.051MB/second compressed
. emulab-ops/WINXP-UPDATE - Windows XP-SP2+, pc600 and pc850.
Created by Mike, 2005-04-22.
. WINXP-02-16 - Windows XP-SP2+, pc600 and pc850, release candidate.
prtn 1, whole disk[1], OS Windows, 5.1.2, node pc26, ping/ssh/isup, NORMALv2, pc600 and pc850.
4293596160 input (2775278592 compressed) bytes in 1096.485 seconds
Image size: 1463812096 bytes
2.414MB/second compressed
After removing the SP2 and Windows Update backup directories:
4293596160 input (2565563392 compressed) bytes in 987.167 seconds
Image size: 1299185664 bytes
2.479MB/second compressed
. WINXP-02-11 - Windows XP-SP1, pc600 and pc850, release candidate.
prtn 1, whole disk[1], OS Windows, 5.1.1, node pc26, ping/ssh/isup, NORMALv2, pc600 and pc850.
4293596160 input (2142913536 compressed) bytes in 804.105 seconds
Image size: 1026555904 bytes
2.542MB/second compressed
. WINXP-02-08 - Windows XP-SP1, pc600 only, release candidate.
prtn 1, whole disk[1], OS Windows, 5.1.1, node pc62, ping/ssh/isup, NORMALv2, pc600.
4293596160 input (2113422336 compressed) bytes in 643.544 seconds
Image size: 1001390080 bytes
3.132MB/second compressed
. WINXP-01-25 - Windows XP-SP1, pc850, cleaned and with Windows password support.
prtn 1, whole disk, OS Windows, 5.1.1, node pc80, ping/ssh/isup, MINIMAL, pc850.
4293596160 input (1957200896 compressed) bytes in 607.873 seconds
Image size: 946864128 bytes
. WINXP-12-08w - Windows XP-SP1, with networking and most other startup scripts.
prtn 1, whole disk, OS Windows, 5.1.1, node pc174, ping/ssh/isup, MINIMAL, pc2000.
. WINXP-12-08 - Windows XP SP1, with networking and most other startup scripts.
- From pc170 on 12-07 to hopefully lose the New Hardware wizard.
. WINXP-12-07 - Windows XP SP1, networking and most other startup scripts.
- Grumble. ./ missing from getmac in findif.c .
. WINXP-12-03 - Windows XP SP1, Samba /users, no networking yet.
- Z: comes up disconnected, okay in autologin but sshd loses out.
- Need to install pro2kxp.exe drivers.
- Install Cygwin rpm package.
. WINXP-10-24 - Windows XP SP1, host rename at boot, user dir mounts.
prtn 1, whole disk, OS other, 5.1.2, node pc174, ping/ssh, MINIMAL, pc2000.
Leave shared and global bits off until production images are being done.
This diff is collapsed.
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