if (! test -e '#c') service = unix iroot = /sys/inferno if (! test -e $iroot) iroot = /opt/inferno if (! ~ $service unix) { path=(/bin .) # safer than the default bind -a $iroot/Plan9/$cputype/bin /bin bind -b $home/bin/$cputype /bin bind -b $home/bin/rc /bin bind -a /acme/bin /bin bind -c $home/tmp /tmp upasname=a@9srv.net } font=/lib/font/bit/lucida/unicode.7.font rwin = /mnt/term/mnt/wsys tabstop = 4 fn : {} fn lf {ls -Fp $* | mc} fn ll {ls -lp $*} fn lart {ls -lrt $*} fn lsbig {ls -l $* | sort -nb +5} fn lsd {ls -F $* | grep '/\''?$' | mc} fn RAMFS {ramfs -s ; mount -c /srv/ramfs /tmp} fn initprog { echo -n 'Start [r]io, [n]ile, [a]cme, [rc], [c]pu, [o]ther:' profilestart=`{read} switch($profilestart){ case r #pipefile -r ktrans /dev/cons rio -s -f $font -i /bin/riostart # '#m/mousectl' >[2]/dev/null echo -n 'res 3' > '#m/mousectl' >[2]/dev/null prompt=(':; ' ' ') initprog case cpu if (test -e $rwin/wctl) { # rio already running wsys = /mnt/term^`{cat /mnt/term/env/wsys} bind -a $rwin /dev if (test -e /dev/label) { 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'; ' ' ') if (grep -sv '^$' /mnt/term/mnt/factotum/ctl >[2] /dev/null) bind /mnt/term/mnt/factotum /mnt/factotum if (! test -e $rwin) { # cpu call from drawterm font=/lib/font/bit/pelm/unicode.8.font cd plumber if (test -e /mnt/term/dev/secstore) { auth/factotum -n cat /mnt/term/dev/secstore | read -m > /mnt/factotum/ctl } if not auth/factotum upas/fs initprog } if not { # upas/fs news } case con prompt=(':; ' ' ') news case unix SYSHOST=`{uname | sed ' s;Darwin;MacOSX;;'} cputype=`{uname -m | sed ' s;i.86;386;; s;x86_64;amd64;; s;/.*;;; s; ;;g; s;armv4l;arm;g; s;PowerMacintosh;power;g; s;macppc;power;g; s;ppc64;power;g; s;ppc;power;g'} LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 EDITOR=E PAGER=nobs BROWSER=safari stty erase '^H' >[2] /dev/null if (~ $cputype amd64) inf_bin = $iroot/$SYSHOST/386/bin if not inf_bin = $iroog/$SYSHOST/$cputype/bin optpkgs = (go MacPorts v6shell asterisk libixp dmenu svn mercurial) packages = (/usr/X11R6 /opt/$optpkgs) path = (. $home/bin/unix $home/bin/$SYSHOST/$cputype /usr/bin /usr/sbin /bin /sbin \ $packages/bin $PLAN9/bin $inf_bin) if (~ $cputype amd64) path = ($path $home/bin/$SYSHOST/386) GOBIN=$home/bin/$SYSHOST/$cputype GOPATH=$home/src/go PYTHONPATH=/opt/mercurial/lib/python2.5/site-packages font = `{echo $font | 9 sed 's!^/lib/font/bit!'$PLAN9'/font!; s!lucida!luc!'} if (~ $DISPLAY '') DISPLAY=:0 if (! test -e `{namespace}) plumber if (~ $sysname '') sysname=`{hostname -s} prompt=(': '$sysname'; ' ' ') }