shithub: 9ferno

Download patch

ref: f3829796c60592f393533e7a43d73dc828920c2c
parent: 94a064bda2c7aee2c78e8b90fc0e205a628cb664
author: 9ferno <gophone2015@gmail.com>
date: Mon Oct 18 14:08:47 EDT 2021

/dis/init starts it all up and calls /lib/init/$sysname for fine tuning

ape/diff: b/lib/init/null: No such file or directory
--- a/dis/init	Mon Oct 18 11:24:26 2021
+++ b/dis/init	Mon Oct 18 14:08:47 2021
@@ -40,7 +40,7 @@
 #		figure out the sysname from /lib/ndb/local
 # 			ndb/query ether 50e549e5f938 sys
 #
-# run /os/init/$sysname, if it exists
+# run /lib/init/$sysname, if it exists
 #
 # for options to disk/kfs:
 #	bootargs=local!any other disk/kfs args /dev/sdG0/fs
@@ -209,8 +209,8 @@
 	}
 
 	and {! ~ $"sysname ''} {
-			ftest -f /os/init/$sysname }{
-			@{sh /os/init/$sysname}
+			ftest -f /lib/init/$sysname }{
+			/lib/init/$sysname
 		}
 }
 
--- /dev/null	Sun Oct 31 09:33:26 2021
+++ b/lib/init/bootcd	Mon Oct 18 14:08:47 2021
@@ -0,0 +1,20 @@
+#!/dis/sh
+
+load std
+# machine specific initialization
+#	called by /dis/init when sysname=bootcd
+#	special networking setup, disk setup
+#	avoids putting machine specific stuff in devroot
+
+<>/net/ipifc/clone {
+	x=`{read}
+	echo bind ether /net/ether0 > /net/ipifc/^$x^/ctl
+}
+ip/dhcp -p /net/ipifc/$x
+
+# Networking
+ndb/dns -r
+ndb/cs
+#bind -a '#scs' /net
+
+
--- /dev/null	Sun Oct 31 09:33:26 2021
+++ b/lib/init/vmx9ferno	Mon Oct 18 14:08:47 2021
@@ -0,0 +1,31 @@
+#!/dis/sh
+
+load std
+# machine specific initialization
+#	called by /dis/init when sysname=vmx9ferno
+#	special networking setup, disk setup
+#	avoids putting machine specific stuff in devroot
+
+<>/net/ipifc/clone {
+	x=`{read}
+	echo bind ether /net/ether0 > /net/ipifc/^$x^/ctl
+}
+ip/dhcp -p /net/ipifc/$x
+
+# Networking
+ndb/dns -r
+ndb/cs
+#bind -a '#scs' /net
+
+# refresh disk contents from the master
+and {ndb/csquery tcp!master!styx}{ftest -d /n/rootdisk/dis}{
+	mount tcp!master!styx /n/master
+	disk/mkfs -v -s /n/master/ -d /n/rootdisk/ <{ cat /n/master/lib/proto/^(9boot inferno os src utils) }
+
+	# sync the boot executables
+	dossrv -f /dev/sdG0/9fat -m /n/9fat
+	cp /n/9fat/ipc64 /n/9fat/ipc64.0
+	cp /n/master/Inferno/amd64/ipc64 /n/9fat/ipc64
+	cp /n/master/Inferno/386/9bootfat /n/9fat/9bootfat
+}
+
--- a/lib/proto/inferno	Mon Oct 18 11:24:26 2021
+++ b/lib/proto/inferno	Mon Oct 18 14:08:47 2021
@@ -2029,6 +2029,9 @@
 	emptydirs
 	games
 		+
+	init
+		bootcd 755
+		vmx9ferno 755
 	keyboard
 	legal
 		*
--- a/lib/proto/os	Mon Oct 18 11:24:26 2021
+++ b/lib/proto/os	Mon Oct 18 14:08:47 2021
@@ -705,7 +705,6 @@
 		shell.b
 		srvinit.b
 		wminit.b
-		bootcd 755
 	ip
 		*
 	ipaq1110
--- a/os/init/bootcd	Mon Oct 18 11:24:26 2021
+++ /dev/null	Sun Oct 31 09:33:26 2021
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-load std
-# machine specific initialization
-#	called by /dis/init when sysname=bootcd
-#	special networking setup, disk setup
-#	avoids putting machine specific stuff in devroot
-
-<>/net/ipifc/clone {
-	x=`{read}
-	echo bind ether /net/ether0 > /net/ipifc/^$x^/ctl
-}
-ip/dhcp -p /net/ipifc/$x
-
-# Networking
-ndb/dns -r
-ndb/cs
-#bind -a '#scs' /net
-
-
--- a/os/init/vmx9ferno	Mon Oct 18 11:24:26 2021
+++ /dev/null	Sun Oct 31 09:33:26 2021
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-load std
-# machine specific initialization
-#	called by /dis/init when sysname=vmx9ferno
-#	special networking setup, disk setup
-#	avoids putting machine specific stuff in devroot
-
-<>/net/ipifc/clone {
-	x=`{read}
-	echo bind ether /net/ether0 > /net/ipifc/^$x^/ctl
-}
-ip/dhcp -p /net/ipifc/$x
-
-# Networking
-ndb/dns -r
-ndb/cs
-#bind -a '#scs' /net
-
-# refresh disk contents from the master
-and {ndb/csquery tcp!master!styx}{ftest -d /n/rootdisk/dis}{
-	mount tcp!master!styx /n/master
-	disk/mkfs -v -s /n/master/ -d /n/rootdisk/ <{ cat /n/master/lib/proto/^(9boot inferno os src utils) }
-
-	# sync the boot executables
-	dossrv -f /dev/sdG0/9fat -m /n/9fat
-	cp /n/9fat/ipc64 /n/9fat/ipc64.0
-	cp /n/master/Inferno/amd64/ipc64 /n/9fat/ipc64
-	cp /n/master/Inferno/386/9bootfat /n/9fat/9bootfat
-}
-