commit 0ec38fd

chld  ·  2026-08-29 05:30:00 +0000 UTC
parent 5bd1259
sit: device managers after rc.local, dont kill them either
1 files changed,  +7, -32
M sit
M sit
+7, -32
 1@@ -85,6 +85,12 @@ if [ -w /proc/sys/net/ipv4/ping_group_range ]; then
 2     echo "0 2147483647" > /proc/sys/net/ipv4/ping_group_range
 3 fi
 4 
 5+# run rc.local
 6+[ -x /etc/rc.local ] && {
 7+	echo 'running rc.local'
 8+	/etc/rc.local
 9+}
10+
11 # setup device manager (if available)
12 echo 'setting up devices'
13 if command -v udevd >/dev/null 2>&1; then
14@@ -101,7 +107,7 @@ elif command -v smdev >/dev/null 2>&1; then
15     smdev -s
16 elif command -v mdev >/dev/null 2>&1; then
17     [ -f /proc/sys/kernel/hotplug ] && echo /bin/mdev > /proc/sys/kernel/hotplug
18-    mdev -s
19+    mdev -svd
20 else
21 	echo 'no device manager'
22 fi
23@@ -115,40 +121,9 @@ if command -v ip >/dev/null 2>&1; then
24     ip link set lo up
25 fi
26 
27-# start services in sorted order with pid tracking
28-echo "starting services"
29-mkdir -p /etc/sv/pid
30-if [ -d /etc/sv/on ]; then
31-    for svc in $(ls /etc/sv/on/ 2>/dev/null | sort); do
32-        svc_path="/etc/sv/on/$svc"
33-        [ -x "$svc_path" ] || continue
34-        # Get the actual service name from symlink target
35-        svc_name=$(basename "$(readlink "$svc_path")")
36-        echo "starting $svc_name"
37-        "$svc_path" &
38-        echo $! > "/etc/sv/pid/$svc_name.pid"
39-    done
40-fi
41-
42-# run rc.local
43-[ -x /etc/rc.local ] && {
44-	echo 'running rc.local'
45-	/etc/rc.local
46-}
47-
48-echo 'killing device managers'
49-{
50-	pkill udevd
51-	pkill smdev
52-	pkill mdev
53-}>/dev/null 2>&1
54-
55 # spawn console on serial and VGA with respawning
56 echo "spawning getty"
57 
58-# wait a moment for devices to settle
59-sleep 1
60-
61 if command -v getty >/dev/null 2>&1; then
62     # BusyBox getty: getty [OPTIONS] BAUD_RATE TTY [TERMTYPE]
63     # Serial console (for -nographic) - respawn if dies