termrc/cpurc: dont run ipconfig if theres no /net/ipselftab, dont run dns resolver if theres already /net/dns
This commit is contained in:
parent
c00a72a02d
commit
fe60a74122
2 changed files with 22 additions and 19 deletions
11
rc/bin/cpurc
11
rc/bin/cpurc
|
@ -17,21 +17,21 @@ mntgen -s slashn && chmod 666 /srv/slashn
|
|||
# name translation, cs sets /dev/sysname
|
||||
ndb/cs
|
||||
sysname=`{cat /dev/sysname}
|
||||
|
||||
# parallelism for mk
|
||||
NPROC = `{wc -l </dev/sysstat}
|
||||
|
||||
if (~ $#sysname 0 || ~ $sysname ''){
|
||||
sysname=cirno # default
|
||||
echo -n $sysname >/dev/sysname
|
||||
}
|
||||
prompt=($sysname^'# ' ' ')
|
||||
|
||||
# parallelism for mk
|
||||
NPROC=`{wc -l </dev/sysstat}
|
||||
|
||||
# cpu-specific startup
|
||||
if(test -e /cfg/$sysname/cpurc)
|
||||
. /cfg/$sysname/cpurc
|
||||
|
||||
# automatic ip address setup
|
||||
if(test -r /net/ipselftab){
|
||||
if(! grep u /net/ipselftab | grep -sv 127.0.0.1){
|
||||
ether=`{ndb/query sys $sysname ether}
|
||||
if(~ $#ether 1){
|
||||
|
@ -40,8 +40,9 @@ if(! grep u /net/ipselftab | grep -sv 127.0.0.1){
|
|||
}
|
||||
rm -f /env/ether
|
||||
}
|
||||
}
|
||||
|
||||
if(! test -e /srv/dns)
|
||||
if(! test -e /net/dns)
|
||||
ndb/dns -r
|
||||
|
||||
if(! ps|grep -s timesync){
|
||||
|
|
|
@ -39,6 +39,7 @@ if(test -e /cfg/$sysname/termrc)
|
|||
. /cfg/$sysname/termrc
|
||||
|
||||
# automatic ip address setup
|
||||
if(test -r /net/ipselftab){
|
||||
if(! grep u /net/ipselftab | grep -sv 127.0.0.1){
|
||||
ether=`{ndb/query sys $sysname ether}
|
||||
if(~ $#ether 1){
|
||||
|
@ -47,8 +48,9 @@ if(! grep u /net/ipselftab | grep -sv 127.0.0.1){
|
|||
}
|
||||
rm -f /env/ether
|
||||
}
|
||||
}
|
||||
|
||||
if(! test -e /srv/dns)
|
||||
if(! test -e /net/dns)
|
||||
ndb/dns -r
|
||||
|
||||
if(! ~ $terminal *vx32*){
|
||||
|
|
Loading…
Reference in a new issue