diff --git a/tmcd/cygwinxp/GNUmakefile.in b/tmcd/cygwinxp/GNUmakefile.in index d6f156cfc09eeb0664d2ebcd61ac91b4450ff639..18d0aa4d4d9f8e3e52bc3602932e516915c0b596 100644 --- a/tmcd/cygwinxp/GNUmakefile.in +++ b/tmcd/cygwinxp/GNUmakefile.in @@ -72,22 +72,16 @@ bin-install: dir-install etc-install: dir-install sysetc-remove sysetc-install sysetc-install: dir-install ###ifcfgs - # Copy host keys for the user sshd on port 2222 - chmod g+r /etc/ssh_host*key - -cp /etc/ssh_host_key /etc/ssh_host_key.user - -cp /etc/ssh_host_dsa_key /etc/ssh_host_dsa_key.user - -cp /etc/ssh_host_rsa_key /etc/ssh_host_rsa_key.user - chmod g-r /etc/ssh_host*key /etc/ssh_host*key.user # Watchdog assumes the ssh keys are in /etc/ssh. ln -f -s /etc /etc/ssh - # Boot log files have to be writable by SYSTEM under rc.cygwin. + # Boot log files have to be writable by root under rc.cygwin . $(INSTALL) -c -m 775 -o root -g wheel -d /var/log $(INSTALL) -c -m 775 -o root -g wheel -d /var/db # Need an /etc/shells file for rc.acounts. $(INSTALL) -m 755 $(SRCDIR)/shells /etc/shells sysetc-remove: - rm -f /etc/ssh_host*key.user /etc/shells + rm -f /etc/shells script-install: dir-install $(SCRIPTS) $(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm @@ -97,6 +91,8 @@ script-install: dir-install $(SCRIPTS) $(INSTALL) -m 755 $(SRCDIR)/tbshutdown $(BINDIR)/tbshutdown $(INSTALL) -c -m 755 -o root -g wheel -d /sbin $(INSTALL) -m 755 $(SRCDIR)/reboot /sbin/reboot + # Put the tcsh desktop startup script in the CygWin root directory. + $(INSTALL) -m 755 $(SRCDIR)/cygwin-tcsh.bat / ln -f -s /bin/shutdown /sbin/shutdown $(INSTALL) -m 755 $(SRCDIR)/rc.cygwinxp $(BINDIR)/rc/rc.cygwin # The following will fail if the user login script is still busy in a shell. diff --git a/tmcd/cygwinxp/cygwin-tcsh.bat b/tmcd/cygwinxp/cygwin-tcsh.bat new file mode 100755 index 0000000000000000000000000000000000000000..cb491f81c1250e4ebe06dc4eb379c9bdfbed21ac --- /dev/null +++ b/tmcd/cygwinxp/cygwin-tcsh.bat @@ -0,0 +1,6 @@ +@echo off + +C: +chdir C:\cygwin\bin + +tcsh -l diff --git a/tmcd/cygwinxp/liblocsetup.pm b/tmcd/cygwinxp/liblocsetup.pm index e9837e4e6258ef13f49c0df8d380c63cb7dda615..3f7cbe8a2bed7555ef17de9708cf69f865b84762 100644 --- a/tmcd/cygwinxp/liblocsetup.pm +++ b/tmcd/cygwinxp/liblocsetup.pm @@ -581,7 +581,10 @@ sub os_samba_mount($$$) # Make the CygWin mount from the Samba path to the local mount point directory. my $sambapath = $local; - $sambapath =~ s|.*/(.*)|//$host/$1|; + $sambapath =~ s|^/proj/(.*)|proj-$1|; + $sambapath =~ s|^/group/(.*)/(.*)|$1-$2|; + $sambapath =~ s|.*/(.*)|$1|; + $sambapath = "//$host/$sambapath"; if (! -e $local) { print "os_samba_mount: Making CygWin '$local' mount point directory.\n" if ($verbose); diff --git a/tmcd/cygwinxp/prepare b/tmcd/cygwinxp/prepare index a9849574c2d484cc76bfdd129d1afa65a2178253..9e9a017d0350c7682ef7cd788bb653c9f23010d6 100755 --- a/tmcd/cygwinxp/prepare +++ b/tmcd/cygwinxp/prepare @@ -116,6 +116,9 @@ if (-f $NTPDRIFT) { print "Clearing out testbed sources $SOURCES...\n"; system("rm -rf $SOURCES"); +print "Clearing out testbed sources $OBJS...\n"; +system("rm -rf $OBJS"); + print "Clearing out $RUNDIR ...\n"; system("rm -rf $RUNDIR/*.pid"); diff --git a/tmcd/cygwinxp/rc.cygwinxp b/tmcd/cygwinxp/rc.cygwinxp index f214b49c64e320bf56c45ae8dbafdc360d24a97f..f4c59e4bde481c36480af16169e405b4db2b8a5b 100755 --- a/tmcd/cygwinxp/rc.cygwinxp +++ b/tmcd/cygwinxp/rc.cygwinxp @@ -36,6 +36,13 @@ else # Change hostname and computername, rename My Computer, reboot on success. /usr/local/etc/emulab/WSName /N:$nodeid /REBOOT /MCN + # Does WSName return to the shell? Log it and give it a minute to take effect. + datehost="`date`: Host name '$hostname'" + newhost=`/bin/hostname` + msg="$datehost WSName returned to the shell after changing to '$newhost'." + echo "$msg" >> $logfile + echo "$msg" + sleep 60 # Should never get here! Try /sbin/reboot. datehost="`date`: Host name '$hostname'" @@ -44,6 +51,8 @@ else echo "$msg" >> $logfile echo "$msg" /sbin/reboot + # Reboot returns to the shell. Give it a minute to take effect. + sleep 60 # Should never get here either!!! Try /bin/shutdown. datehost="`date`: Host name '$hostname'" @@ -52,8 +61,10 @@ else echo "$msg" >> $logfile echo "$msg" /bin/shutdown -r -f now + # Shutdown returns to the shell. Give it a minute to take effect. + sleep 60 - # Give up. + # Give up, log it, and go on. datehost="`date`: Host name '$hostname'" newhost=`/bin/hostname` msg="$datehost failed to reboot changing to '$newhost'."