Commit d6fdc20e authored by Russ Fish's avatar Russ Fish

Windows polishing, Samba mount path changes for projects and groups.

parent e576e852
...@@ -72,22 +72,16 @@ bin-install: dir-install ...@@ -72,22 +72,16 @@ bin-install: dir-install
etc-install: dir-install sysetc-remove sysetc-install etc-install: dir-install sysetc-remove sysetc-install
sysetc-install: dir-install ###ifcfgs 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. # Watchdog assumes the ssh keys are in /etc/ssh.
ln -f -s /etc /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/log
$(INSTALL) -c -m 775 -o root -g wheel -d /var/db $(INSTALL) -c -m 775 -o root -g wheel -d /var/db
# Need an /etc/shells file for rc.acounts. # Need an /etc/shells file for rc.acounts.
$(INSTALL) -m 755 $(SRCDIR)/shells /etc/shells $(INSTALL) -m 755 $(SRCDIR)/shells /etc/shells
sysetc-remove: sysetc-remove:
rm -f /etc/ssh_host*key.user /etc/shells rm -f /etc/shells
script-install: dir-install $(SCRIPTS) script-install: dir-install $(SCRIPTS)
$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm $(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm
...@@ -97,6 +91,8 @@ script-install: dir-install $(SCRIPTS) ...@@ -97,6 +91,8 @@ script-install: dir-install $(SCRIPTS)
$(INSTALL) -m 755 $(SRCDIR)/tbshutdown $(BINDIR)/tbshutdown $(INSTALL) -m 755 $(SRCDIR)/tbshutdown $(BINDIR)/tbshutdown
$(INSTALL) -c -m 755 -o root -g wheel -d /sbin $(INSTALL) -c -m 755 -o root -g wheel -d /sbin
$(INSTALL) -m 755 $(SRCDIR)/reboot /sbin/reboot $(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 ln -f -s /bin/shutdown /sbin/shutdown
$(INSTALL) -m 755 $(SRCDIR)/rc.cygwinxp $(BINDIR)/rc/rc.cygwin $(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. # The following will fail if the user login script is still busy in a shell.
......
@echo off
C:
chdir C:\cygwin\bin
tcsh -l
...@@ -581,7 +581,10 @@ sub os_samba_mount($$$) ...@@ -581,7 +581,10 @@ sub os_samba_mount($$$)
# Make the CygWin mount from the Samba path to the local mount point directory. # Make the CygWin mount from the Samba path to the local mount point directory.
my $sambapath = $local; 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) { if (! -e $local) {
print "os_samba_mount: Making CygWin '$local' mount point directory.\n" print "os_samba_mount: Making CygWin '$local' mount point directory.\n"
if ($verbose); if ($verbose);
......
...@@ -116,6 +116,9 @@ if (-f $NTPDRIFT) { ...@@ -116,6 +116,9 @@ if (-f $NTPDRIFT) {
print "Clearing out testbed sources $SOURCES...\n"; print "Clearing out testbed sources $SOURCES...\n";
system("rm -rf $SOURCES"); system("rm -rf $SOURCES");
print "Clearing out testbed sources $OBJS...\n";
system("rm -rf $OBJS");
print "Clearing out $RUNDIR ...\n"; print "Clearing out $RUNDIR ...\n";
system("rm -rf $RUNDIR/*.pid"); system("rm -rf $RUNDIR/*.pid");
......
...@@ -36,6 +36,13 @@ else ...@@ -36,6 +36,13 @@ else
# Change hostname and computername, rename My Computer, reboot on success. # Change hostname and computername, rename My Computer, reboot on success.
/usr/local/etc/emulab/WSName /N:$nodeid /REBOOT /MCN /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. # Should never get here! Try /sbin/reboot.
datehost="`date`: Host name '$hostname'" datehost="`date`: Host name '$hostname'"
...@@ -44,6 +51,8 @@ else ...@@ -44,6 +51,8 @@ else
echo "$msg" >> $logfile echo "$msg" >> $logfile
echo "$msg" echo "$msg"
/sbin/reboot /sbin/reboot
# Reboot returns to the shell. Give it a minute to take effect.
sleep 60
# Should never get here either!!! Try /bin/shutdown. # Should never get here either!!! Try /bin/shutdown.
datehost="`date`: Host name '$hostname'" datehost="`date`: Host name '$hostname'"
...@@ -52,8 +61,10 @@ else ...@@ -52,8 +61,10 @@ else
echo "$msg" >> $logfile echo "$msg" >> $logfile
echo "$msg" echo "$msg"
/bin/shutdown -r -f now /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'" datehost="`date`: Host name '$hostname'"
newhost=`/bin/hostname` newhost=`/bin/hostname`
msg="$datehost failed to reboot changing to '$newhost'." msg="$datehost failed to reboot changing to '$newhost'."
......
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