code: 9ferno

ref: b548687a8ed1d0a159c9d3f3f921d93bbb56908e
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}

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
}

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