code: 9ferno

ref: 6bb619c8db2867ddd9cd19c0aec05065f5ee0cae
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}