code: 9ferno

ref: 44ce0097b612a1fefd754065bdf8d9d2e5ef60c8
dir: /lib/sh/profile/

View raw version
# sh initialisation here
load std

user = `{cat /dev/user}
home = /usr/^$user
pubgridreg = tcp!registry.9p.zone!registry
cd $home

# build the user's namespace in $home/
and {ftest -e namespace}	{nsbuild}

# Networking
ndb/dns -r
ndb/cs
# bind -a '#scs' /net

if{~ $#emuhost 0 && ~ $#emuwdir 0}{
	# running native

	# load a heap based filesystem on /tmp
	memfs
}{
	# running hosted

	# dis/init has set this up already for native booting
	mount {mntgen} /n
	mount {mntgen} /mnt
}

# Run the user's profile
and {ftest -e lib/profile}	{run ./lib/profile}