Commit 2718ddf1 authored by Kirk Webb's avatar Kirk Webb

Don't run Emulab client-side startup when in Windows mini-setup.

We install the Emulab client-side startup as a Windows service, so Windows
mini-setup will try to run it along with the other services.  We don't want
this, so have rc.cygwin check that mini-setup isn't running before allowing
the client-side code to continue.
parent eb8a112a
......@@ -28,9 +28,8 @@ if (!$? -or $NodeID -eq "UNKNOWN" -or !$NodeID) {
exit(1)
}
# Change the node's name to nodeid from Emulab Central, if required
if ($NodeID -ne $CurName) {
log("Computer name change required: $CurName -> $NodeID")
# Change the node's name to nodeid from Emulab Central
log("Setting node name to: $NodeID (was $CurName)")
# XXX: Doesn't work under mini-setup
# if (!$NameObj.rename($NodeID)) {
# log("Name change failed: " + $Error)
......@@ -39,17 +38,10 @@ if ($NodeID -ne $CurName) {
# log("Node rename succeeded - reboot required")
# }
# Change the name via the registry
New-ItemProperty -Path $CNPATH -Name ComputerName -PropertyType String`
-Value $nodeid.ToUpper() -Force
New-ItemProperty -Path $HNPATH -Name "NV Hostname" -PropertyType String`
-Value $nodeid -Force
} else {
log("Current node name is correct - no changes made")
}
# Change the name via the registry
New-ItemProperty -Path $CNPATH -Name ComputerName -PropertyType String`
-Value $nodeid.ToUpper() -Force
New-ItemProperty -Path $HNPATH -Name "NV Hostname" -PropertyType String`
-Value $nodeid -Force
exit(0)
......@@ -30,6 +30,15 @@ uname -r > $iscygwin
chmod g+w $iscygwin
chmod -f g-w /etc/emulab
#
# If we are running under mini-setup (sysprep), bail.
#
setupstate=`regtool get /HKLM/Software/Microsoft/Windows/CurrentVersion/Setup/State/ImageState`
if [ $setupstate != "IMAGE_STATE_COMPLETE" ]; then
logit "Windows mini-setup is running - exiting!"
exit 1;
fi
# Stop the sshd service during setup, because it sometimes loops, eating 100% of the
# CPU. It will be restarted after rc.bootsetup by EmulabStartup. Make sure below.
# XXX: Assume this isn't needed.
......
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