root/ 775 0 0 0 12553055650 105655ustar00glendaglendaroot/adm/ 775 0 0 0 12551625645 113335ustar00glendaglendaroot/bin/ 775 0 0 0 12553055646 113425ustar00glendaglendaroot/bin/addns 775 0 0 3141 12553056307 12353ustar00glendaglenda#!/bin/rc #binds the namespace of one process on top of another rfork e ifs=' ' while (~ $1 -*){ switch($1){ case -o only=$2 shift shift case -x xclude=$2 shift shift case -t testonly=yes shift case -r riosafe=yes shift case * echo bad flag $1 shift } } if(~ $2 ''){ echo usage: addns MODELpid TARGETpid exit usage } if(! test -e /proc/$1){ echo process $1 does not exist! exit no.proc } if(! test -e /proc/$2){ echo process $2 does not exist! exit no.proc } if(test -e /tmp/chnsuniq) rm /tmp/chnsuniq # find lines in model not contained in target orig=`{cat /proc/$1/ns} for (i in $orig){ search=''^$i^'' match=`{cat /proc/$2/ns |grep -e $search} if(~ $match ''){ echo $i >> /tmp/chnsuniq } } if(! test -e /tmp/chnsuniq){ echo no binds in $1 not in $2 to add exit no.binds } # convert the list of binds in model not in target into a set of namespace commands sed 's/^/echo ⊞/g' /tmp/chnsuniq |sed 's/$/⊞ >\/proc\/'$2'\/ns/g'| tr ⊞ '''' |sed '/echo .cd/d' |sed 's/ / /g' |sed '/\#\|\/data/d' |sed '/\#D\/ssl/d' >/tmp/chnscom if(~ $riosafe yes){ sed '/\/mnt\/wsys/d' /tmp/chnscom | sed '/\/mnt\/term/d' |sed '/\/dev\/cons/d' |sed '/\/rio/d' >/tmp/chnssafe mv /tmp/chnssafe /tmp/chnscom } if (! ~ $xclude ''){ grep -v $xclude /tmp/chnscom >/tmp/chnssafe mv /tmp/chnssafe /tmp/chnscom } if (! ~ $only ''){ grep $only /tmp/chnscom >/tmp/chnssafe mv /tmp/chnssafe /tmp/chnscom } if (test -e /tmp/chnssafe) rm /tmp/chnssafe if(~ $testonly yes){ cat /tmp/chnscom exit } # fire off the assembled list of namespace ops and hope the world doesnt explode . /tmp/chnscom root/bin/addroroot 775 0 0 526 12553056307 13243ustar00glendaglenda#!/bin/rc # mount a fileserver without auth and use its binaries, lib, and sys if (! ~ $1 ?*){ echo usage: addroroot TARGETSYSTEM exit usage } if(! test -e /srv/$1){ srv tcp!$1!564 $1 } mount -n /srv/$1 /n/$1 bind -a /n/$1/ / bind -b /n/$1/$cputype/bin /bin bind -b /n/$1/rc/bin /bin bind -b /n/$1/lib /lib bind -b /n/$1/sys /sys exit '' root/bin/addsources 775 0 0 627 12553056307 13404ustar00glendaglenda#!/bin/rc # make the sources copy of the plan 9 distribution available for local use if(! test -e /srv/sources){ srv tcp!204.178.31.11!564 sources } mount -n /srv/sources /n/sources bind -a /n/sources/plan9 / bind -b /$cputype/bin /bin bind -b /rc/bin /bin bind -a /n/sources/plan9/sys /sys bind -a /n/sources/plan9/lib /lib bind -b /n/sources/plan9/lib/font /lib/font mount -a /srv/factotum /mnt exit '' root/bin/addwrroot 775 0 0 733 12553056307 13253ustar00glendaglenda#!/bin/rc # mounts a fileserver and binds dirs to use it if (! ~ $1 ?*){ echo usage: addwrroot TARGETSYSTEM exit usage } if(! test -e /srv/$1){ srv tcp!$1!564 $1 } mount -c /srv/$1 /n/$1 bind -a /n/$1/ / bind -b /n/$1/$cputype/bin /bin bind -b /n/$1/rc/bin /bin bind -b /n/$1/sys /sys bind -b /n/$1/lib/ /lib/ bind -bc /n/$1/usr /usr bind -bc /n/$1/$home $home bind -bc /n/$1/$home/tmp /tmp bind -bc /n/$1/$home/bin/$cputype /bin bind -bc /n/$1/$home/bin/rc /bin exit '' root/bin/cpns 775 0 0 1266 12553056307 12233ustar00glendaglenda#!/bin/rc # cpns copies namespace from process 1 to process 2 # this script requires the writable /proc/ns mod found in contrib/mycroftiv/writeprocns # cpns MODELpid TARGETpid rfork e only=() xclude=() riosafe=() testonly=() saveargs=$* while (~ $1 -*){ switch($1){ case -o only=$2 shift shift case -x xclude=$2 shift shift case -t testonly=-t shift case -r riosafe=-r shift case * echo bad flag $1 shift } } if(~ $2 ""){ echo usage: cpns MODELpid TARGETpid exit usage } if(! test -e /proc/$1){ echo process $1 does not exist! exit no.proc } if(! test -e /proc/$2){ echo process $2 does not exist! exit no.proc } subns $saveargs addns $saveargs exit '' root/bin/cpsys 775 0 0 427 12553056307 12407ustar00glendaglenda#!/bin/rc # copy one system's fossil to another # cpsys SOURCE DEST rfork e source=$1 dest=$2 if(~ $2 ''){ echo usage: cpsys SOURCE DEST exit usage } rx $dest fossilize resetargs=`{rx $source fossilize} echo rx $dest fosreset $resetargs rx $dest fosreset $resetargs exit '' root/bin/foshalt 775 0 0 707 12553056307 12707ustar00glendaglenda#!/bin/rc # slightly simplified fossil-only fshalt script f=`{ls /srv/fscons*>[2]/dev/null} sync -h localhost >[2]/dev/null & sync >[2]/dev/null & echo -n syncing... for(i in $f) @ { echo -n $i... { echo sleep 2 echo fsys all sync sleep 2 } < $i >> $i } sync -h localhost >[2]/dev/null & sync >[2]/dev/null & sleep 5 echo -n halting... for(i in $f) @ { echo -n $i... { echo fsys all halt } < $i >> $i } sleep 2 echo halted exit '' root/bin/fosreset 775 0 0 1540 12553056307 13115ustar00glendaglenda#!/bin/rc # DANGER! This script obliterates fossils and resets them to a different score # fosreset rootscore [fossil] [venti] rfork e score=$1 if(! ~ $score ???????????????????????????*){ echo $1 is not a fossil root score exit no.rootscore } fossil=$2 if(~ $fossil '') fossil=/dev/sdC0/fossil if(! ~ $3 '') venti=$3 if(~ $venti ''){ echo 'please set a venti target for your fossil!' exit no.venti } if(~ $fossil tcp*){ echo not disk exit no.disk } if(! test -e /bin/foshalt) fshalt if not foshalt kill fossil |rc sleep 1 Kill fossil |rc sleep 2 slay fossil |rc sleep 1 stillhere=`{ps |grep fossil} if(! ~ $stillhere ''){ echo 'fossil processes still running! exiting' exit fossilzombie } if(~ $score vac*) score=`{echo $score |sed 's/vac://g'} if(test -e /bin/flfmt) flfmt -y -v $score $fossil if not fossil/flfmt -y -v $score $fossil exit '' root/bin/fossilconf 775 0 0 2327 12553056307 13434ustar00glendaglenda#!/bin/rc # THIS FILE IS AUTOMATICALLY GENERATED # FROM /sys/src/cmd/fossil/conf.rc. DO NOT EDIT. # EDITED BY MYCROFTIV # the fossil configuration is stored at the 127kB offset in the disk # and extends for at most 1 kB. rfork e fn usage { echo 'usage: fossilconf [-w] /dev/sdC0/fossil [config]' >[1=2] exit usage } wflag=no while(! ~ $#* 0 && ~ $1 -* && ! ~ $1 --){ switch($1){ case -w wflag=yes case * usage } shift } if(~ $1 --) shift if(~ $wflag no && ! ~ $#* 1) usage if(~ $wflag yes && ! ~ $#* 1 2) usage disk=$1 if(! test -f $disk){ echo 'unknown disk' $1 >[1=2] exit nodisk } fn sigexit { rm -f /tmp/fossilconf.$pid } if(~ $wflag yes){ {echo fossil config; cat $2} >/tmp/fossilconf.$pid || exit oops if(! test -s /tmp/fossilconf.$pid){ echo 'config is empty; will not install' >[1=2] exit emptyconfig } dd -quiet 1 -bs 1024 -count 1 -if $disk -iseek 127 \ >/tmp/_fossilconf.old || exit backup dd -quiet 1 -count 2 >/tmp/fossilconf.$pid || exit dd dd -quiet 1 -bs 1024 -count 1 -if /tmp/fossilconf.$pid \ -trunc 0 -of $disk -oseek 127 || exit dd2 exit 0 } dd -quiet 1 -bs 1024 -count 1 -if $disk -iseek 127 | zerotrunc >/tmp/fossilconf.$pid sed 1d /tmp/fossilconf.$pid exit 0 root/bin/fossilize 775 0 0 1360 12553056307 13272ustar00glendaglenda#!/bin/rc # freeze a fossil for preservation # fossilize [partition] rfork e fossil=$1 if(~ $fossil '') fossil=/dev/sdC0/fossil part=`{ls /dev/fs/9fat /dev/sd*/9fat >[2]/dev/null} if(~ $#part 0) { echo '9fat?' >[1=2] exit no.9fat } part=$part(1) if(! test -f /srv/dos) dossrv >/dev/null [2]/dev/null unmount /n/9fat >/dev/null >[2]/dev/null mount -c /srv/dos /n/9fat $part unmount /n/9 >/dev/null >[2]/dev/null mount -c /srv/dos /n/9 $part if(! test -e /n/9fat/plan9.ini){ echo '9fat?' exit no.plan9ini } if(test -e /bin/fossilast) last=`{fossilast $fossil} if not last=`{fossil/last $fossil} if(! ~ $last vac*){ echo 'no score?!' exit no.score } echo $last $fossil $venti >>/n/9fat/rootscor echo $last $fossil $venti exit '' ustar00glendaglendaroot/bin/fossilstart 775 0 0 1173 12553056307 13642ustar00glendaglenda#!/bin/rc # start standard fossil setup # fossilstart PARTITION [name] rfork e if(! ~ $venti ?*){ echo please set venti env variable as needed exit no.venti } foscons=fscons fossrv=fossil fospart=$1 if(~ $1 '') fospart=/dev/sdC0/fossil if(! ~ $2 ''){ foscons=fscons.$2 fossrv=$2 } fossilcmd=fossil if(test -d /bin/fossil) fossilcmd=/bin/fossil/fossil $fossilcmd -c 'srv -p '$foscons echo 'fsys main config '$fospart >>/srv/fscons echo 'fsys main open -c 9000' >>/srv/fscons echo 'fsys main snaptime -s 60 -a 0500 -t 2880' >>/srv/$foscons echo 'srv -A '$fossrv >>/srv/$foscons echo 'listen tcp!*!564' >>/srv/$foscons exit '' if(! test -e /srv/$1){ srv tcp!$1!564 $1 } mount -c /srv/$1 /n/$1 bind -a /n/$1/ / bind -b /n/$1/$cputype/bin /bin bind -b /n/$1/rc/bin /bin bind -b /n/$1/sys /sys bind -b /n/$1/lib/ /lib/ bind -bc /n/$1/usr /usr bind -bc /n/$1/$home $home bind -bc /n/$1/$home/tmp /tmp bind -bc /n/$1/$home/bin/$cputype /bin bind -bc /n/$1/$home/bin/rc /bin exit '' root/bin/getdevs 775 0 0 776 12553056310 12710ustar00glendaglenda#!/bin/rc # retrieve devices to re-attach to window system # getdevs [name] if(~ $1 ''){ echo need a srvname with saved devices exit no.srvname } if(! test -e /srv/oldterm.$1){ echo no devices saved at /srv/oldterm.$1 exit no.devices } mount -c /srv/oldterm.$1 /n/oldterm mount -c /srv/oldwsys.$1 /n/oldwsys bind /n/oldterm/dev/cons /dev/cons bind /n/oldterm/dev/consctl /dev/consctl bind -a /n/oldterm/dev /dev bind -b /n/oldwsys /dev bind -bc /n/oldterm /mnt/term bind -bc /n/oldwsys /mnt/wsys exit '' root/bin/gui 775 0 0 214 12553056310 12016ustar00glendaglenda#!/bin/rc # start gui in rootless environment bind -b '#P' /dev bind -b '#m' /dev mouse $mouseport vga -m vesa -l 1024x768x24 grio exit '' root/bin/importroroot 775 0 0 664 12553056310 14022ustar00glendaglenda#!/bin/rc # import ns of cpu server without assuming write permission if (! ~ $1 ?*){ echo usage: importroroot TARGETSYSTEM exit usage } import $1 / /n/$1 bind -a /n/$1/ / bind -b /n/$1/$cputype/bin /bin bind -b /n/$1/rc/bin /bin bind -b /n/$1/lib /lib bind -b /n/$1/sys /sys bind -a /n/$1/usr /usr bind -a /n/$1/$home $home bind -a /n/$1/$home/tmp /tmp bind -a /n/$1/$home/bin/$cputype /bin bind -a /n/$1/$home/bin/rc /bin exit '' root/bin/importwrroot 775 0 0 676 12553056310 14035ustar00glendaglenda#!/bin/rc # import ns of cpu server and bind its resources if (! ~ $1 ?*){ echo usage: importwrroot TARGETSYSTEM exit usage } import -c $1 / /n/$1 bind -a /n/$1/ / bind -b /$cputype/bin /bin bind -b /rc/bin /bin bind -b /n/$1/sys /sys bind -a /n/$1/srv /srv bind -b /n/$1/lib /lib bind -bc /n/$1/usr /usr bind -bc /n/$1/$home $home bind -bc /n/$1/$home/tmp /tmp bind -bc /n/$1/$home/bin/$cputype /bin bind -bc /n/$1/$home/bin/rc /bin exit '' root/bin/mountsrvfs 775 0 0 451 12553056310 13463ustar00glendaglenda#!/bin/rc # mount from srv then srvfs a path if(! ~ $#* 3){ echo usage mountsrv srvname pathname newsrvname exit usage } if(! test -e /srv/$1){ echo no /srv/$1 exit no.srv } mount -c /srv/$1 /n/$1 if(! test -d /n/$1^$2){ echo /n/$1^$2 not a directory exit no.srvdir } srvfs $3 /n/$1^$2 root/bin/rerootwin 775 0 0 3344 12553056310 13311ustar00glendaglenda#!/boot/rc # change your current root and stay attached to window system and devices # rerootwin targetsrv [ authagent ] if(test -e /lib/namespace.saveterm) nsfile=/lib/namespace.saveterm if(test -e /boot/namespace.saveterm) nsfile=/boot/namespace.saveterm if(~ $nsfile ''){ echo no namespace.saveterm found exit no.nssaveterm } pivot=/net.alt while (~ $1 -*){ switch($1){ case -f nsfile=/boot/namespace.save9front if(test -e /lib/namespace.save9front) nsfile=/lib/namespace.save9front shift case -u pivot=/u shift case -n pivot=/n shift } } if(! ~ $1 ?*){ echo need a target srv exit no.srv } # depending on the kind of namespace we are being run from we might need # to get our devices in the expected place to begin if(! test -e /mnt/wsys/wctl){ if(! test -e /mnt/term/mnt/wsys/wctl){ echo no wctl at mnt wsys exit no.wctl } echo binding /mnt/term/mnt/wsys to /mnt/wsys bind /mnt/term/mnt/wsys /mnt/wsys } if(! test -e /mnt/term/dev/cons){ if(! test -e /mnt/wsys/cons){ echo no cons at mnt term exit no.cons } if(! test -e /mnt/term/dev) mkdir /mnt/term/dev echo binding /mnt/wsys /mnt/term/dev bind /mnt/wsys /mnt/term/dev } if(! test -e /srv/$1){ srv tcp!$1!564 $1 if(! test -e /srv/$1){ echo srv $1 couldnt be acquired exit no.srv } } nsroot=$1 if(~ $2 ?*){ authagent=$2 } if not if(! ~ $authagent ?*){ authagent=factotum } if(! test -e /srv/$authagent){ factotum -s $authagent } mount -b /srv/$authagent /mnt # use srvfs to save our old devices so the namespace.saveterm can mount them later oldterm=oldterm.$pid oldwsys=oldwsys.$pid srvfs -p 0600 oldterm.$pid /mnt/term srvfs -p 0600 oldwsys.$pid /mnt/wsys if(test -e /bin/newns){ newns -n $nsfile exit '' } auth/newns -n $nsfile exit '' ustar00glendaglendaroot/bin/riobind 775 0 0 246 12553056310 12665ustar00glendaglenda#!/bin/rc # modiifies namespace of running rio # riobind [standard mount/bind operation] topgrio =`{ps |grep rio |sed 1q} echo ''$*'' >/proc/$topgrio(2)^/ns exit '' root/bin/riopush 775 0 0 1067 12553056310 12752ustar00glendaglenda#!/bin/rc # "pushes" a running rio onto a window on another window system. mostly just a trick. # riopush TARGETPID rfork e local = `{ns |grep wsys |grep rio |sed 's/#s/\/srv/g' |tr -d ''''} winid = `{cat /dev/winid |tr -d ' '} localmount = `{echo $local(1) $local(2) $local(3) $winid} remote = `{ns $1 |grep wsys |grep rio |sed 's/#s/\/srv/g' |tr -d ''''} bind /mnt/wsys /n/oldwin $remote bind -b /mnt/wsys /dev bind /n/oldwin/cons /dev/cons bind /n/oldwin/consctl /dev/consctl bind /n/oldwin/mouse /dev/mouse echo $localmount >/tmp/riocontrolwin grio exit '' srv >>/srv/$foscons echo 'listen tcp!*!564' >>/srv/$foscons exit '' if(! test -e /srv/$1){ srv tcp!$1!564 $1 } mount -c /srv/$1 /n/$1 bind -a /n/$1/ / bind -b /n/$1/$cputype/bin /bin bind -b /n/$1/rc/bin /bin bind -b /n/$1/sys /sys bind -b /n/$1/lib/ /lib/ bind -bc /n/$1/usr /usr bind -bc /n/$1/$home $home bind -bc /n/$1/$home/tmp /tmp bind -bc /n/$1/$home/bin/$cputype /bin bind -bc /n/$1/$home/bin/rc /bin exit '' root/bin/savedevs 775 0 0 1512 12553056310 13074ustar00glendaglenda#!/bin/rc # save current window and console devices for later attachment # savedevs [name] rfork e srvname=$pid if(! ~ $1 '') srvname=$1 # depending on the kind of namespace we are being run from we might need # to get our devices in the expected place to begin if(! test -e /mnt/wsys/wctl){ if(! test -e /mnt/term/mnt/wsys/wctl){ echo no wctl at mnt wsys exit no.wctl } echo binding /mnt/term/mnt/wsys to /mnt/wsys bind /mnt/term/mnt/wsys /mnt/wsys } if(! test -e /mnt/term/dev/cons){ if(! test -e /mnt/wsys/cons){ echo no cons at mnt term exit no.cons } if(! test -e /mnt/term/dev) mkdir /mnt/term/dev echo binding /mnt/wsys /mnt/term/dev bind /mnt/wsys /mnt/term/dev } srvfs -p 0600 oldterm.$srvname /mnt/term srvfs -p 0600 oldwsys.$srvname /mnt/wsys echo devices saved at oldterm.$srvname oldwsys.$srvname exit '' root/bin/sharescreen 775 0 0 650 12551625645 13553ustar00glendaglenda#!/bin/rc #showremote riocontrolwin = `{cat /tmp/riocontrolwin} startwin = `{cat /tmp/startwin} bind /mnt/wsys /n/mywsys $startwin bind /mnt/wsys /n/remwin $riocontrolwin bind -b /mnt/wsys /dev bind /n/mywsys/mouse /dev/mouse bind /n/mywsys/cons /dev/cons bind /n/mywsys/consctl /dev/consctl togif /tmp/curscreen.gif while(~ a a){ gif /tmp/curscreen.gif togif /tmp/curscreen.gif } root/bin/subns 775 0 0 3076 12553056310 12415ustar00glendaglenda#!/bin/rc #uses MODELpid's namespace to remove all binds and mounts from TARGETpid that are not present in MODELpid's namespace rfork e ifs=' ' while (~ $1 -*){ switch($1){ case -o only=$2 shift shift case -x xclude=$2 shift shift case -t testonly=yes shift case -r riosafe=yes shift case * echo bad flag $1 shift } } if(~ $2 ''){ echo usage: subns MODELpid TARGETpid exit usage } if(! test -e /proc/$1){ echo process $1 does not exist! exit no.proc } if(! test -e /proc/$2){ echo process $2 does not exist! exit no.proc } if(test -e /tmp/chnsuniq) rm /tmp/chnsuniq orig=`{cat /proc/$2/ns} for (i in $orig){ search=''^$i^'' match=`{cat /proc/$1/ns |grep -e $search} if(~ $match ''){ echo $i >> /tmp/chnsuniq } } if(! test -e /tmp/chnsuniq){ echo no binds in $2 not in $1 to subtract exit no.binds } sed 's/^/echo ⊞/g' /tmp/chnsuniq |sed 's/$/⊞ >\/proc\/'$2'\/ns/g'| tr ⊞ '''' |sed '/echo .cd/d' |sed 's/mount/unmount/g' | sed 's/bind/unmount/g' | sed 's/-. //g' |sed 's/-.. //g' |sed 's/ / /g' |sed '/\#\|\/data/d' |sed '/\#D\/ssl/d' |sed '1!G;h;$!d' >/tmp/chnscom if(~ $riosafe yes){ cat /tmp/chnscom |sed '/\/mnt\/wsys/d' | sed '/\/mnt\/term/d' |sed '/\/dev\/cons/d' |sed '/rio/d' >/tmp/chnssafe mv /tmp/chnssafe /tmp/chnscom } if (! ~ $xclude ''){ grep -v $xclude /tmp/chnscom >/tmp/chnssafe mv /tmp/chnssafe /tmp/chnscom } if (! ~ $only ''){ grep $only /tmp/chnscom >/tmp/chnssafe mv /tmp/chnssafe /tmp/chnscom } if (test -e /tmp/chnssafe) rm /tmp/chnssafe if(~ $testonly yes){ cat /tmp/chnscom exit } . /tmp/chnscom exit '' echo usage mountsrv srvname pathname newsrvname exit usage } if(! test -e /srv/$1){ echo no /srv/$1 exit no.srv } mount -c /srv/$1 /n/$1 if(! test -d /n/$1^$2){ echo /n/$1^$2 not a directory exit no.srvdir } srvfs $3 /n/$1^$2 root/bin/venticonf 775 0 0 2330 12553056310 13246ustar00glendaglenda#!/bin/rc # THIS FILE IS AUTOMATICALLY GENERATED # FROM /sys/src/cmd/venti/conf.rc. DO NOT EDIT. # EDITED BY MYCROFTIV # the venti configuration is stored at the 248kB offset in the first index # partition and extends for at most 8 kB. rfork e fn usage { echo 'usage: venti/conf [-w] /dev/sdC0/v.arenas' >[1=2] exit usage } wflag=no while(! ~ $#* 0 && ~ $1 -* && ! ~ $1 --){ switch($1){ case -w wflag=yes case * usage } shift } if(~ $1 --) shift if(~ $wflag no && ! ~ $#* 1) usage if(~ $wflag yes && ! ~ $#* 1 2) usage disk=$1 if(! test -f $disk){ echo 'unknown disk' $1 >[1=2] exit nodisk } fn sigexit { #rm -f /tmp/venticonf.$pid } if(~ $wflag yes){ {echo venti config; cat $2} >/tmp/venticonf.$pid || exit oops if(! test -s /tmp/venticonf.$pid){ echo 'config is empty; will not install' >[1=2] exit emptyconfig } dd -quiet 1 -bs 1024 -count 8 -if $disk -iseek 248 \ >/tmp/_venticonf.old || exit backup dd -quiet 1 -count 2 > /tmp/venticonf.$pid || exit dd dd -quiet 1 -bs 1024 -count 8 -if /tmp/venticonf.$pid \ -of $disk -trunc 0 -oseek 248 || exit dd2 exit 0 } dd -quiet 1 -bs 1024 -count 8 -if $disk -iseek 248 | zerotrunc >/tmp/venticonf.$pid sed 1d /tmp/venticonf.$pid exit '' v/$1){ echo srv $1 couldnt be acquired exit no.srv } } nsroot=$1 if(~ $2 ?*){ authagent=$2 } if not if(! ~ $authagent ?*){ authagent=factotum } if(! test -e /srv/$authagent){ factotum -s $authagent } mount -b /srv/$authagent /mnt # use srvfs to save our old devices so the namespace.saveroot/bin/ventiprog 775 0 0 1260 12553056310 13271ustar00glendaglenda#!/bin/rc # uses a pre-existing wrarena command at /n/9fat/wrcmd to backup a venti # the expected command looks about like this: # wrarena -h tcp!192.168.1.123!17034 -o 537665536 /dev/sdC0/arenas 0x12224578 # ventiprog [ventilist] rfork e if(! test -e /n/9fat/wrcmd) 9fat: if(! test -e /n/9fat/wrcmd) exit no.wrcmd if(! ~ $1 '') targetventis=$* oldcmd=`{cat /n/9fat/wrcmd} newoff=`{$oldcmd | grep offset |sed 's/.*0x/0x/g'} if(! ~ $targetventis ''){ for(i in $targetventis){ nxtcmd=`{echo $oldcmd |sed 's/!.*!/!'$i'!/g'} $nxtcmd } } newcmd=`{echo $oldcmd |sed 's/0x.*/'$newoff'/g'} echo $oldcmd >>/n/9fat/rootscor echo $newcmd >/n/9fat/wrcmd echo $oldcmd echo $newcmd exit '' root/bin/winpush 775 0 0 556 12553056310 12740ustar00glendaglenda#!/bin/rc # "pushes" a window onto a different window system. # winpush TARGETPID rfork e local = `{ns |grep wsys |grep rio |sed 's/#s/\/srv/g' |tr -d ''''} remote = `{ns $1 |grep wsys |grep rio |sed 's/#s/\/srv/g' |tr -d ''''} wsys = $remote(2) echo $local >/tmp/startwin window -m exit '' # BUG: can misfire if target process has multiple wsys in its namespace root/lib/ 775 0 0 0 12553055647 113415ustar00glendaglendaroot/lib/font/ 775 0 0 0 12553006564 123015ustar00glendaglendaroot/lib/font/bit/ 775 0 0 0 12553006564 130575ustar00glendaglendaroot/lib/font/bit/lucm/ 775 0 0 0 12553055647 140255ustar00glendaglendaroot/lib/font/bit/lucm/latin1.9 664 0 0 11051 12551625645 15324ustar00glendaglendacompressed k1 0 0 2304 15 15 2976 ||||||E0B@C``H А@`|Cp8p|@||c ~>?}  @ @HA`A d>iH$  !8 |W,?0<`(T_ o}o ":8> dxccA00$v Pc0(?p$ p p 8  cx> k| ?o3 0||B# <`>n>`ű8lc1G??|~?? C0'A~r"y C , `c8l6 3|><7p#ƈ0l? n`8 @ eAѠ0 cb r10 9e230x"#1fw_@lv' Tx~oϓ?~?w{aQ(O0Jل@E, d1 a`0lb` ;a6 ƒ@@lp$]@Ppp `?  ?c<03 yefa H3`>LC21p䪘}/?]}op>ߟ0(Yg???2L^#`08 1u 7 gƀ @l lAl0c90>00# ??5|a; n0?  ٺuT O|ovl1([J t8eRTF#b10"?& 0~? ?(k Cl_@$   @ p( ?g0g ?0_`a& c ?#ă8_9 oy~ _``0f(M`Y_8?=8~ 9_! 8 @$$p_1o0 `c ```c`M! ac`!n_#& ?~o|_qyqa>c? g x`0;`p8| # ? w~?~? `0?=< G P Y b k t }                   ( 1 : C L U ^ g p y               -of $disk -trunc 0 -oseek 248 || exit dd2 exit 0 } dd -quiet 1 -bs 1024 -count 8 -if $disk -iseek 248 | zerotrunc >/tmp/venticonf.$pid sed 1d /tmp/venticonf.$pid exit '' v/$1){ echo srv $1 couldnt be acquired exit no.srv } } nsroot=$1 if(~ $2 ?*){ authagent=$2 } if not if(! ~ $authagent ?*){ authagent=factotum } if(! test -e /srv/$authagent){ factotum -s $authagent } mount -b /srv/$authagent /mnt # use srvfs to save our old devices so the namespace.saveroot/lib/font/bit/lucm/latin1.9.font 664 0 0 71 12551625645 16211ustar00glendaglenda15 13 0x0000 0x00FF latin1.9 0xFFFD 0xFFFD 0x80 latin1.9 root/lib/font/bit/lucm/unicode.9.font 664 0 0 4705 12551625645 16517ustar00glendaglenda17 14 0x0000 0x00FF latin1.9 0x0100 0x017E latineur.9 0x0250 0x02E9 ipa.9 0x0370 0x03F5 greek.9 0x0400 0x0475 ../misc/cyrillic.9 0x0500 0x05FF ../fixed/10x20.0500 0x0600 0x06FF ../fixed/10x20.0600 0x0E00 0x0EFF ../fixed/10x20.0E00 0x1000 0x10FF ../fixed/10x20.1000 0x1200 0x12FF ../fixed/10x20.1200 0x1300 0x13FF ../fixed/10x20.1300 0x1600 0x16FF ../fixed/10x20.1600 0x1D00 0x1DFF ../fixed/10x20.1D00 0x1E00 0x1EFF ../fixed/10x20.1E00 0x1F00 0x1FFF ../fixed/10x20.1F00 0x2000 0x2044 genpunc.9 0x2070 0x208E supsub.9 0x20A0 0x20AC currency.9 0x2100 0x2138 ../misc/letterlike.8 0x2190 0x21EA ../misc/arrows 0x2200 0x227F ../misc/math1 0x2280 0x22F1 ../misc/math2 0x2300 0x232C ../misc/tech 0x2500 0x257F ../misc/chart 0x2580 0x25ff ../misc/geometric 0x2600 0x266F ../misc/ding 0x2700 0x27BF ../misc/zapf 0x2800 0x28FF ../fixed/10x20.2800 0x2A00 0x2AFF ../fixed/10x20.2A00 0x2B00 0x2BFF ../fixed/10x20.2B00 0x3000 0x303f ../jis/jis3000.16 0x30a1 0x30fe ../jis/katakana.16 0x3041 0x309e ../jis/hiragana.16 0x4D00 0x4DFF ../fixed/10x20.4D00 0x4e00 0x4fff ../jis/jis4e00.16 0x5000 0x51ff ../jis/jis5000.16 0x5200 0x53ff ../jis/jis5200.16 0x5400 0x55ff ../jis/jis5400.16 0x5600 0x57ff ../jis/jis5600.16 0x5800 0x59ff ../jis/jis5800.16 0x5a00 0x5bff ../jis/jis5a00.16 0x5c00 0x5dff ../jis/jis5c00.16 0x5e00 0x5fff ../jis/jis5e00.16 0x6000 0x61ff ../jis/jis6000.16 0x6200 0x63ff ../jis/jis6200.16 0x6400 0x65ff ../jis/jis6400.16 0x6600 0x67ff ../jis/jis6600.16 0x6800 0x69ff ../jis/jis6800.16 0x6a00 0x6bff ../jis/jis6a00.16 0x6c00 0x6dff ../jis/jis6c00.16 0x6e00 0x6fff ../jis/jis6e00.16 0x7000 0x71ff ../jis/jis7000.16 0x7200 0x73ff ../jis/jis7200.16 0x7400 0x75ff ../jis/jis7400.16 0x7600 0x77ff ../jis/jis7600.16 0x7800 0x79ff ../jis/jis7800.16 0x7a00 0x7bff ../jis/jis7a00.16 0x7c00 0x7dff ../jis/jis7c00.16 0x7e00 0x7fff ../jis/jis7e00.16 0x8000 0x81ff ../jis/jis8000.16 0x8200 0x83ff ../jis/jis8200.16 0x8400 0x85ff ../jis/jis8400.16 0x8600 0x87ff ../jis/jis8600.16 0x8800 0x89ff ../jis/jis8800.16 0x8a00 0x8bff ../jis/jis8a00.16 0x8c00 0x8dff ../jis/jis8c00.16 0x8e00 0x8fff ../jis/jis8e00.16 0x9000 0x91ff ../jis/jis9000.16 0x9200 0x93ff ../jis/jis9200.16 0x9400 0x95ff ../jis/jis9400.16 0x9600 0x97ff ../jis/jis9600.16 0x9800 0x99ff ../jis/jis9800.16 0x9a00 0x9bff ../jis/jis9a00.16 0x9c00 0x9dff ../jis/jis9c00.16 0x9e00 0x9fff ../jis/jis9e00.16 0xFB00 0xFBFF ../fixed/10x20.FB00 0xFC00 0xFCFF ../fixed/10x20.FC00 0xFD00 0xFDFF ../fixed/10x20.FD00 0xfee0 0xff5e latin1.9 0xFFFD 0xFFFD 0x80 latin1.9 root/lib/namespace 664 0 0 1627 12551625645 13225ustar00glendaglenda# root mount -ac #s/ramboot /root $rootspec bind -a $rootdir / bind -c $rootdir/mnt /mnt mount -a #s/bootpaq /boot # kernel devices bind #c /dev bind #d /fd bind -c #e /env bind -a #ec /env bind #p /proc bind -c #s /srv bind -a #¤ /dev bind -a #S /dev bind -b #k /dev bind -a #κ /dev bind -a #u /dev bind -b #P /dev # mount points mount -a /srv/slashn /n # authentication mount -a /srv/factotum /mnt # standard bin bind -a /boot /bin bind -b /root/bin /bin bind -a /root/bin /boot bind -b /$cputype/bin /bin bind -a /rc/bin /bin # internal networks # mount -a /srv/ip /net bind -a #l /net bind -a #I /net mount -a /srv/cs /net mount -a /srv/dns /net mount -a /srv/net /net mount -b /srv/ssh /net # usbd, mainly disks mount /srv/usb /n/usb mount -a /srv/usb /dev mount -c /srv/hubfs /n/hubfs bind -c /usr/$user/tmp /tmp cd /usr/$user . /lib/namespace.local . /lib/namespace.$sysname . /cfg/$sysname/namespace v Pc0(?p$ p p 8  cx> k|  '#m/mousectl' echo -n 'res 3' > '#m/mousectl' prompt=('term% ' ' ') fn term%{ $* } exec grio -s case cpu if (test -e /mnt/term/mnt/wsys) { # rio already running wsys = /mnt/term^`{cat /mnt/term/env/wsys} bind -a /mnt/term/mnt/wsys /dev echo -n $sysname > /dev/label } bind /mnt/term/dev/cons /dev/cons bind /mnt/term/dev/consctl /dev/consctl bind -a /mnt/term/dev /dev prompt=$sysname^': ' # prompt=('cpu% ' ' ') # fn cpu%{ $* } # upas/fs # news if (! test -e /mnt/term/mnt/wsys) { # cpu call from drawterm # font=/lib/font/bit/pelm/latin1.8.font # plumber # auth/factotum exec grio -b 2 -c 0xbbccddff -s -x /boot/grio -a -s } case con prompt=('cpu% ' ' ') # news } root/usr/bootes/tmp/ 775 0 0 0 12551625646 134775ustar00glendaglendaroot/usr/none/ 775 0 0 0 12553006565 123365ustar00glendaglendaroot/usr/none/lib/ 775 0 0 0 12553055650 131035ustar00glendaglendaroot/usr/none/lib/profile 664 0 0 331 12551625646 14451ustar00glendaglendarfork efns unmount '#P' /dev unmount '#S' /dev unmount '#¤' /dev unmount '#k' /dev unmount '#u' /dev unmount /srv/factotum /mnt unmount /srv/slashn /n mount -c /srv/escape /net.alt unmount /srv unmount /net rfork m