diff --git a/rc/bin/cpurc b/rc/bin/cpurc index 1c533093a..a410d3dcb 100755 --- a/rc/bin/cpurc +++ b/rc/bin/cpurc @@ -1,10 +1,13 @@ #!/bin/rc # this file is run if service=cpu -date > /env/boottime +# parallelism for mk +NPROC=`{wc -l /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 [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) diff --git a/rc/bin/termrc b/rc/bin/termrc index 74b3566dd..dfc99968b 100755 --- a/rc/bin/termrc +++ b/rc/bin/termrc @@ -2,8 +2,11 @@ # this file is run if service=terminal TIMESYNCARGS=(-rLa1000000) +# parallelism for mk +NPROC=`{wc -l /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 [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) diff --git a/sys/man/8/cpurc b/sys/man/8/cpurc index c9a0afd18..7c60c7030 100644 --- a/sys/man/8/cpurc +++ b/sys/man/8/cpurc @@ -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