]> git.lizzy.rs Git - plan9front.git/commitdiff
cpurc: remove obsolete device binds, run diskparts after $sysname is known. remove...
authorcinap_lenrek <cinap_lenrek@felloff.net>
Thu, 12 Apr 2018 19:30:28 +0000 (21:30 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Thu, 12 Apr 2018 19:30:28 +0000 (21:30 +0200)
rc/bin/cpurc
rc/bin/termrc
sys/man/8/cpurc

index 1c533093aa8d1ba1fd89f84a0de88c55c3b64d77..a410d3dcbb11e03ba196b55ea98b39a4d7973b4a 100755 (executable)
@@ -1,10 +1,13 @@
 #!/bin/rc
 # this file is run if service=cpu
 
-date > /env/boottime
+# parallelism for mk
+NPROC=`{wc -l </dev/sysstat}
 
-for(i in m i P S t u '$')
+# bind all likely devices
+for(i in t S P '$')
        bind -a '#'^$i /dev >/dev/null >[2=1]
+rm -f /env/i
 
 mount -qb /srv/cons /dev
 
@@ -23,22 +26,28 @@ unmount /mnt/temp
 # usb listener
 nusbrc
 
-# name translation, cs sets /dev/sysname
-ndb/cs
-sysname=`{cat /dev/sysname}
-
 # site-specific startup
 if(test -e /rc/bin/cpurc.local)
        . /rc/bin/cpurc.local
 
-if (~ $#sysname 0 || ~ $sysname ''){
+# cs sets sysname (cpurc.local may already have started it so check)
+if(! test -e /srv/cs && ! test -e /net/cs)
+       ndb/cs
+sysname=`{cat /dev/sysname}
+if(~ $#sysname 0 || ~ $sysname ''){
        sysname=cirno                   # default
        echo -n $sysname >/dev/sysname
 }
 prompt=($sysname^'# ' '        ')
 
-# parallelism for mk
-NPROC=`{wc -l </dev/sysstat}
+# set up any partitions
+diskparts
+
+# start up local swapping
+disk=`{ls /dev/sd*/swap >[2]/dev/null}
+if (! ~ $#disk 0)
+       swap $disk(1) >/dev/null >[2=1]
+rm -f /env/disk
 
 # cpu-specific startup
 if(test -e /cfg/$sysname/cpurc)
index 74b3566dd73f1c14c77f14525518d9dee73636ab..dfc99968b18c277721cde4c28fcbe5b279a2aed0 100755 (executable)
@@ -2,8 +2,11 @@
 # this file is run if service=terminal
 TIMESYNCARGS=(-rLa1000000)
 
+# parallelism for mk
+NPROC=`{wc -l </dev/sysstat}
+
 # bind all likely devices
-for(i in S f k t m i v L P u U A '$' Σ κ)
+for(i in v t m i f S P L A '$')
        bind -a '#'^$i /dev >/dev/null >[2=1]
 rm -f /env/i
 
@@ -24,15 +27,6 @@ unmount /mnt/temp
 # usb listener
 nusbrc
 
-# set up any partitions
-diskparts
-
-# start up local swapping
-disk=`{ls /dev/sd*/swap >[2]/dev/null}
-if (! ~ $#disk 0)
-       swap $disk(1) >/dev/null >[2=1]
-rm -f /env/disk
-
 # we do this before we have a name.  we may need to do network
 # setup so that we can get a name.
 if(test -e /rc/bin/termrc.local)
@@ -47,8 +41,14 @@ if(~ $#sysname 0 || ~ $sysname ''){
        echo -n $sysname >/dev/sysname
 }
 
-# parallelism for mk
-NPROC=`{wc -l </dev/sysstat}
+# set up any partitions
+diskparts
+
+# start up local swapping
+disk=`{ls /dev/sd*/swap >[2]/dev/null}
+if (! ~ $#disk 0)
+       swap $disk(1) >/dev/null >[2=1]
+rm -f /env/disk
 
 # machine specific startup (e.g., for devices not probed)
 if(test -e /cfg/$sysname/termrc)
index c9a0afd183a29563cf8dee4d2c978b7072bfb2be..7c60c7030dfb731086e17b6cfc312adb7a77c7d5 100644 (file)
@@ -33,12 +33,8 @@ and
 .B $terminal
 these scripts start appropriate network processes and
 administrative daemons and enable swapping.
-.I Cpurc
+.I Termrc
 sets
-.B /env/boottime
-to the time
-.I cpurc
-was executed and
 .B /env/NPROC
 to a value suitable for parallel compilation in
 .IR mk (1).
@@ -54,9 +50,6 @@ exists for the machine named
 .BR $sysname ,
 .I termrc
 will execute it next.
-Automatic initialization of the mouse and
-VGA on a PC is suppressed, if the user is
-.BR none .
 These files should be edited by local installations
 to reflect the configuration of their systems.
 .PP