From 147b0ca1e4e00f66abb47fff3c543b853033f609 Mon Sep 17 00:00:00 2001 From: Calvin Date: Sun, 16 Aug 2026 20:52:12 -0400 Subject: Initial commit: svc supervisor, design docs, session transcript Existing work moved from /storage/vms/9front/svc, previously unversioned. Object files and linked binaries excluded via .gitignore. --- svc/termrc.work | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 svc/termrc.work (limited to 'svc/termrc.work') diff --git a/svc/termrc.work b/svc/termrc.work new file mode 100755 index 0000000..9c12bf0 --- /dev/null +++ b/svc/termrc.work @@ -0,0 +1,80 @@ +#!/bin/rc +# this file is run if service=terminal +TIMESYNCARGS=(-rLa1000000) + +# parallelism for mk +NPROC=`{wc -l /dev/eia0 >[2=1]; sleep 1 }& + +# mount points (if not done by bootrc already) +>[2]/dev/null { +mntgen -s slashn /n && chmod 666 /srv/slashn +mntgen -s slashmnt /mnt && chmod 666 /srv/slashmnt +mntgen -s mntexport /mnt/exportfs && chmod 666 /srv/mntexport} + +# now that /mnt exists, mount factotum +mount /srv/factotum /mnt/factotum factotum +bind -q /mnt/factotum/factotum /mnt/factotum + +# usb listener +nusbrc + +# supervised services. cs, dns and timesync are defined in /lib/svc and +# are started from here on; if svcinit will not run the machine still boots, +# it just has none of them. +if(test -e /amd64/bin/svcinit && test -d /lib/svc) + svcinit -s svc -m /mnt/svcs >>/sys/log/svcinit >[2=1] & + +# 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) + . /rc/bin/termrc.local + +# cs is a service; see /lib/svc/cs +sysname=`{cat /dev/sysname} +if(~ $#sysname 0 || ~ $sysname ''){ + sysname=cirno # default + echo -n $sysname >/dev/sysname +} + +# 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) + . /cfg/$sysname/termrc + +# ip configuration is a service; see /lib/svc/ipconfig + +# dns is a service; see /lib/svc/dns + +# timesync is a service; see /lib/svc/timesync + +# setup mouse and graphics +screenrc + +if(test -f /dev/apm) + aux/apm + +if(~ $terminal *reform*){ + reform/pm + reform/audio +} + +dontkill '^(9660srv|cfs|cs|cwfs.*|disk|dns|dossrv|ether|factotum|gefs|hjfs|ipconfig|kb|kfs|mntgen|paqfs|reboot|usbd|venti|wpa)$' + -- cgit v1.2.3