Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
949bb7f1
Commit
949bb7f1
authored
Feb 19, 2005
by
Mike Hibler
Browse files
Fixups to get routing to work.
parent
0b006871
Changes
2
Hide whitespace changes
Inline
Side-by-side
tmcd/cygwinxp/liblocsetup.pm
View file @
949bb7f1
...
...
@@ -12,8 +12,8 @@ package liblocsetup;
use
Exporter
;
@ISA
=
"
Exporter
";
@EXPORT
=
qw (
$RM
$CHOWN
$MOUNT
$UMOUNT
##
$CP $LN $CHMOD $TOUCH $EGREP
$NTS
$NET
##
$HOSTSFILE
qw (
$RM
$CHOWN
$MOUNT
$UMOUNT
$CP
$LN
$CHMOD
$TOUCH
$EGREP
$NTS
$NET
$HOSTSFILE
$TMPASSWD
$SFSSD
$SFSCD
$RPMCMD
os_account_cleanup
os_accounts_start
os_accounts_end
os_accounts_sync
os_ifconfig_line
os_etchosts_line
...
...
@@ -50,15 +50,15 @@ use librc;
#
# Various programs and things specific to CygWin on XP and that we want to export.
#
##
$CP = "/bin/cp";
##
$LN = "/bin/ln";
$CP
=
"
/bin/cp
";
$LN
=
"
/bin/ln
";
$RM
=
"
/bin/rm
";
$CHOWN
=
"
/bin/chown
";
##
$CHMOD = "/bin/chmod";
##
$TOUCH = "/bin/touch";
$CHMOD
=
"
/bin/chmod
";
$TOUCH
=
"
/bin/touch
";
$MOUNT
=
"
/bin/mount
";
$UMOUNT
=
"
/bin/umount
";
##
$EGREP = "/bin/egrep -q";
$EGREP
=
"
/bin/egrep -q
";
# Cygwin.
$MKPASSWD
=
"
/bin/mkpasswd
";
...
...
@@ -71,7 +71,9 @@ $NTS = "/cygdrive/c/WINDOWS/system32";
$NET
=
"
$NTS
/net
";
$NETSH
=
"
$NTS
/netsh
";
$NTE
=
"
$NTS
/drivers/etc
";
##$HOSTSFILE = "$NTE/hosts";
#$HOSTSFILE = "$NTE/hosts";
$HOSTSFILE
=
"
/etc/hosts
";
#
# These are not exported
...
...
@@ -88,7 +90,7 @@ my @LOCKFILES = ("/etc/group.lock", "/etc/gshadow.lock");
my
$MKDIR
=
"
/bin/mkdir
";
my
$RMDIR
=
"
/bin/rmdir
";
my
$GATED
=
"
/usr/sbin/gated
";
my
$ROUTE
=
"
route
";
my
$ROUTE
=
"
$NTS
/
route
";
my
$SHELLS
=
"
/etc/shells
";
my
$DEFSHELL
=
"
/bin/tcsh
";
my
$winusersfile
=
"
$BOOTDIR
/winusers
";
...
...
tmcd/cygwinxp/rc.cygwinxp
View file @
949bb7f1
#!/bin/bash
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# Copyright (c) 2004
, 2005
University of Utah and the Flux Group.
# All rights reserved.
#
# rc.cygwinxp - CygWin-specific startup. Run by rc.bootsetup on CygWin.
...
...
@@ -25,7 +25,7 @@ chmod -f g-w /etc/emulab
nodeid
=
`
tmcc nodeid
`
hostname
=
`
/bin/hostname
`
datehost
=
"
`
date
`
: Host name '
$hostname
'"
if
[
$nodeid
=
=
$hostname
]
;
then
if
[
$nodeid
=
$hostname
]
;
then
msg
=
"
$datehost
matches nodeid '
$nodeid
'."
echo
"
$msg
"
>>
$logfile
echo
"
$msg
"
...
...
@@ -44,23 +44,23 @@ else
echo
"
$msg
"
sleep
60
# Should never get here! Try /sbin/reboot.
datehost
=
"
`
date
`
: Host name '
$hostname
'"
msg
=
"
$datehost
didn't reboot changing to '
$nodeid
'! Trying reboot."
echo
"
$msg
"
>>
$logfile
echo
"
$msg
"
/sbin/reboot
# Reboot returns to the shell. Give it a few seconds to take effect.
sleep
10
# Should never get here either!! Try /bin/shutdown.
datehost
=
"
`
date
`
: Host name '
$hostname
'"
msg
=
"
$datehost
didn't /sbin/reboot changing to '
$nodeid
'! Trying shutdown."
echo
"
$msg
"
>>
$logfile
echo
"
$msg
"
/bin/shutdown
-r
-f
now
# Shutdown returns to the shell. Give it a few seconds to take effect.
sleep
10
#
# Should never get here! Try /sbin/reboot.
#
datehost="`date`: Host name '$hostname'"
#
msg="$datehost didn't reboot changing to '$nodeid'! Trying reboot."
#
echo "$msg" >> $logfile
#
echo "$msg"
#
/sbin/reboot
#
# Reboot returns to the shell. Give it a few seconds to take effect.
#
sleep 10
#
#
# Should never get here either!! Try /bin/shutdown.
#
datehost="`date`: Host name '$hostname'"
#
msg="$datehost didn't /sbin/reboot changing to '$nodeid'! Trying shutdown."
#
echo "$msg" >> $logfile
#
echo "$msg"
#
/bin/shutdown -r -f now
#
# Shutdown returns to the shell. Give it a few seconds to take effect.
#
sleep 10
# Last resort!!! tsshutdn
datehost
=
"
`
date
`
: Host name '
$hostname
'"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment