Plan 9 from Bell Labs’s /usr/web/sources/contrib/james/james_profile

Copyright © 2009 Alcatel-Lucent.
Distributed under the Lucent Public License version 1.02.
Download the Plan 9 distribution.


UPASARGS=-f/imaps/imap.gmail.com/drivers@0xabadba.be

# bin
bind -a $home/bin/rc /bin
bind -a $home/bin/$cputype /bin
if(test -d /usr/inferno/Plan9/$cputype/bin)
	bind -a /usr/inferno/Plan9/$cputype/bin /bin

# tmp
bind -c $home/tmp /tmp

# font
font = /lib/font/bit/fixed/unicode.6x12.font

# mouse
mousescrollsize='30%'

upasname = drivers@0xabadba.be

# kbmap
if(test -f /dev/kbmap)
	cat /sys/lib/kbmap/us >/dev/kbmap

if(~ $#sysname 0)
	sysname=g

prompt=($sysname^'% ' '	')

fn $sysname^'%' { if(! ~ $#* 0) $* }

fn cd {
	builtin cd $* && {
		awd
		if(test -w /dev/label){
			if(~ $service terminal)
				label `{pwd}
			if(~ $service cpu)
				label $sysname `{pwd}
		}
		status=''
	}
}

switch($service){
case terminal
	if(test -f '#P/apm')
		aux/apm
	if(test -f /dev/mousectl){
		echo -n hwaccel off >/dev/mousectl
		echo -n accelerated 3 >/dev/mousectl
		echo -n res 3 >/dev/mousectl
	}
#	if(~ $sysname lotte && test -r $home/lib/fact.aes)@{
#		auth/aescbc -d < $home/lib/fact.aes | read -m > /mnt/factotum/ct#l
#	}
# Add some keys to factotum
	if(test -f $home/lib/fact.keys){
     auth/aescbc -d < $home/lib/fact.keys | read -m > /mnt/factotum/ctl
	}
	webfs
	plumber
	upas/fs $UPASARGS
	exec rio -si riostart

case cpu
	bind /mnt/term/dev/cons /dev/cons
	bind /mnt/term/dev/consctl /dev/consctl
	bind -a /mnt/term/dev /dev

	if (test -e /mnt/term/mnt/wsys) {
		# rio already running
		bind -a /mnt/term/mnt/wsys /dev
		if(test -w /dev/label)
			echo -n $sysname > /dev/label
		upas/fs -p $UPASARGS
		if(test -f /mnt/term/env/wsys)
			wsys=/mnt/term/`{cat /mnt/term/env/wsys}
	}
	if not {		# drawterm
		auth/factotum -n
		read -m /mnt/term/dev/secstore > /mnt/factotum/ctl
		echo > /mnt/term/dev/secstore
		webfs
		upas/fs $UPASARGS
		plumber
		exec rio -si riostart
	}

case con
	news
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2009 Alcatel-Lucent. All Rights Reserved.
Comments to webmaster@plan9.bell-labs.com.