rc: use some uppercase variables (PATH, USER...)
This commit is contained in:
@@ -7,7 +7,7 @@ mntgen -s slashn && chmod 666 /srv/slashn
|
||||
|
||||
# name translation, cs sets /dev/sysname
|
||||
ndb/cs
|
||||
sysname=`{cat /dev/sysname}
|
||||
SYSNAME=`{cat /dev/sysname}
|
||||
|
||||
# parallelism for mk
|
||||
NPROC = `{wc -l </dev/sysstat}
|
||||
@@ -16,15 +16,15 @@ NPROC = `{wc -l </dev/sysstat}
|
||||
if(test -e /arch/rc/cmd/cpurc.local)
|
||||
. /arch/rc/cmd/cpurc.local
|
||||
|
||||
if (~ $#sysname 0 || ~ $sysname '') {
|
||||
sysname = jehanne # default
|
||||
echo -n $sysname >/dev/sysname
|
||||
if (~ $#SYSNAME 0 || ~ $SYSNAME '') {
|
||||
SYSNAME = jehanne # default
|
||||
echo -n $SYSNAME >/dev/sysname
|
||||
}
|
||||
prompt=($sysname^'# ' ' ')
|
||||
PROMPT=($SYSNAME^'# ' ' ')
|
||||
|
||||
# cpu-specific startup
|
||||
if(test -e /cfg/$sysname/cpurc)
|
||||
. /cfg/$sysname/cpurc
|
||||
if(test -e /cfg/$SYSNAME/cpurc)
|
||||
. /cfg/$SYSNAME/cpurc
|
||||
|
||||
# start up internet if we don't already have an address
|
||||
if(! grep u /net/ipselftab | grep -sv 127.0.0.1)
|
||||
@@ -69,8 +69,8 @@ if(! netstat -n | grep -s 'tcp.*Listen.* (7|9|21|22|23|25|110|113|565|993|17007|
|
||||
#}
|
||||
|
||||
# cpu-specific late startup
|
||||
if(test -e /cfg/$sysname/cpustart)
|
||||
. /cfg/$sysname/cpustart
|
||||
if(test -e /cfg/$SYSNAME/cpustart)
|
||||
. /cfg/$SYSNAME/cpustart
|
||||
|
||||
# mode of /proc/*/ctl is inherited across rfork, and sets modes on
|
||||
# other /proc files, such as note, so let listen be killed.
|
||||
@@ -83,5 +83,5 @@ if(test ! -e '#s/comconsole')
|
||||
echo 'key proto=p9sk1 dom=jehanne user=glenda !password=demodemo' >/mnt/factotum/ctl
|
||||
ip/listen1 -t tcp!*!17010 /cmd/cpu -R &
|
||||
|
||||
# echo `{date} $sysname >>/sys/log/boot
|
||||
# echo `{date} $SYSNAME >>/sys/log/boot
|
||||
exit ''
|
||||
|
@@ -27,15 +27,15 @@ if(test -e /arch/rc/cmd/termrc.local)
|
||||
# cs sets sysname (termrc.local may already have started it so check)
|
||||
if(! test -e /srv/cs && ! test -e /net/cs)
|
||||
ndb/cs -f $NDBFILE
|
||||
sysname=`{cat /dev/sysname}
|
||||
if (~ $#sysname 0 || ~ $sysname '') {
|
||||
sysname = jehanne # default
|
||||
echo -n $sysname >/dev/sysname
|
||||
SYSNAME=`{cat /dev/sysname}
|
||||
if (~ $#SYSNAME 0 || ~ $SYSNAME '') {
|
||||
SYSNAME = jehanne # default
|
||||
echo -n $SYSNAME >/dev/sysname
|
||||
}
|
||||
|
||||
# machine specific startup (e.g., for devices not probed)
|
||||
if(test -e /cfg/$sysname/termrc)
|
||||
. /cfg/$sysname/termrc
|
||||
if(test -e /cfg/$SYSNAME/termrc)
|
||||
. /cfg/$SYSNAME/termrc
|
||||
|
||||
# start IP on the LAN, if not already configured. diskless terminals
|
||||
# are already configured by now. It's commented out to avoid a long timeout
|
||||
@@ -46,7 +46,7 @@ if(test -e /cfg/$sysname/termrc)
|
||||
#if(! test -e /net/ipifc/0/ctl)
|
||||
# ip/ipconfig
|
||||
#
|
||||
# Otherwise, see /cfg/$sysname/termrc (/cfg/example/termrc is an example).
|
||||
# Otherwise, see /cfg/$SYSNAME/termrc (/cfg/example/termrc is an example).
|
||||
|
||||
# start dns if we have an internet
|
||||
if(test -e /net/ipifc/0/ctl && ! test -e /srv/dns)
|
||||
|
Reference in New Issue
Block a user