henesyinit from lsubb0c8bdb6 years agoHistory
93 lines · 1.5 KB · Text
RawDownload
#!/bin/rc user=`{cat /dev/user}home=/usr/$userif(test -f $home/lib/profile){	echo user directories already made	exit no}cd $homex='$'mkdir bin bin/rc bin/mips bin/386mkdir lib tmpchmod +t tmpbind -c $home/tmp /tmp mail -cauth/cron -c cat > lib/profile <<! if (~ $planb yes && ~ $service terminal){	bfs /n/once	switch($sysname){	case primaryterminal		env/update &	}	exec /bin/rio -i rioinit	echo 'rio exited'	exec rc -i} tabstop=8fn mksnarf () {	if (! test -d /tmp/snarf){		mkdir /tmp/snarf		chmod +t /tmp/snarf		touch /tmp/snarf/snarf		chmod go-rwx /tmp/snarf/snarf	}	if not		echo -n nothing>/tmp/snarf/snarf	bind -b /tmp/snarf /dev} bind -a $x^home/bin/rc /binbind -a $x^home/bin/$x^cputype /binbind -c $x^home/tmp /tmpfont = /lib/font/bit/pelm/euro.9.fontswitch($x^service){case terminal	plumber	upas/fs	news	prompt=(';' '	')	fn term%{ $x^* }	mksnarf	exec riocase 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 $x^sysname > /dev/label	}	bind /mnt/term/dev/cons /dev/cons	bind /mnt/term/dev/consctl /dev/consctl	bind -a /mnt/term/dev /dev	prompt=('%' '	')	fn cpu%{ $x^* }	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 rio	}case con	prompt=('cpu% ' '	')	news}!cat > lib/plumbing <<!# to update: cp /usr/$user/lib/plumbing /mnt/plumb/rules editor = acme include planb ! . lib/profile