ref: f3829796c60592f393533e7a43d73dc828920c2c
parent: 94a064bda2c7aee2c78e8b90fc0e205a628cb664
author: 9ferno <gophone2015@gmail.com>
date: Mon Oct 18 07:08:47 EDT 2021
/dis/init starts it all up and calls /lib/init/$sysname for fine tuning
--- a/dis/init
+++ b/dis/init
@@ -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
+++ b/lib/init/bootcd
@@ -1,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
+++ b/lib/init/vmx9ferno
@@ -1,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
+++ b/lib/proto/inferno
@@ -2029,6 +2029,9 @@
emptydirs
games
+
+ init
+ bootcd 755
+ vmx9ferno 755
keyboard
legal
*
--- a/lib/proto/os
+++ b/lib/proto/os
@@ -705,7 +705,6 @@
shell.b
srvinit.b
wminit.b
- bootcd 755
ip
*
ipaq1110
--- a/os/init/bootcd
+++ /dev/null
@@ -1,20 +1,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
+++ /dev/null
@@ -1,31 +1,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
-}
-