shithub: 9ferno

Download patch

ref: c9f282f9573b6996b81c8166852f7cd7c65b68b9
parent: d3662d2e54dccfece387a7a386db88be8ef353dc
author: 9ferno <gophone2015@gmail.com>
date: Wed Aug 11 18:36:07 EDT 2021

run the user lib/profile at startup

--- a/dis/init	Wed Aug 11 17:37:12 2021
+++ b/dis/init	Wed Aug 11 18:36:07 2021
@@ -59,6 +59,9 @@
 }
 
 #ns
+	# disinit.b does this but not sure why it loses it later
+	bind -c '#e' /env
+
 if{~ $"sysname vmx9ferno}{
 	# for using the cd
 	9660srv /dev/sdF0/data /n/cd
@@ -89,11 +92,15 @@
 
 	# refresh the disk contents from the cd
 	disk/mkfs -v -s /n/cd/ -d /n/rootdisk/ <{ echo + }
+
+	mkdir -p /usr/`{cat /dev/user}
 } &
+
 <>/net/ipifc/clone {
 	x=`{read}
-	echo bind ether /net/ether0 > /net/ipifc/^$x^/ctl
-	ip/dhcp -h `{cat /env/sysname} -p /net/ipifc/$x
+	echo bind ether /net/ether0 > /net/ipifc/^$x^/ctl &&
+	ip/dhcp -h $sysname -p /net/ipifc/$x
 } &
 
-sh -n
+cd /usr/`{cat /dev/user}
+sh -l -n # to use the ./lib/profile
--- a/os/pc64/pc64	Wed Aug 11 17:37:12 2021
+++ b/os/pc64/pc64	Wed Aug 11 18:36:07 2021
@@ -238,6 +238,10 @@
 #	/keydb  /
 #	/keydb/mutual   /usr/inferno/keyring/mutual
 #	/keydb/spree /usr/inferno/keyring/spree
+# user personalization
+	/usr	/
+	/usr/inferno	/
+	/usr/inferno/lib/profile
 
 bootdir
 	/$objtype/bin/paqfs
--- a/usr/inferno/lib/profile	Wed Aug 11 17:37:12 2021
+++ b/usr/inferno/lib/profile	Wed Aug 11 18:36:07 2021
@@ -10,3 +10,12 @@
 ndb/cs
 ndb/dns
 
+if{~ $"sysname vmx9ferno}{
+	# serve the cd
+	styxlisten -A -v tcp!192.168.88.118!17001 export /n/cd/
+}
+
+if{~ $"sysname 9ferno}{
+	# mount the vmx cd
+	mount -A tcp!192.168.88.118!17001 /n/cd
+}