code: 9ferno

ref: 957c1191e660f4ff75ec9e847377ba70deb7d0ee
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}