aboutsummaryrefslogtreecommitdiff
path: root/rootfs/etc/runit/1
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-02-07 18:41:32 +0100
committerlonkaars <loek@pipeframe.xyz>2024-02-07 18:41:32 +0100
commitb02e98ad03bfdf37cb17b56034168d4ad8638823 (patch)
tree0f8527b388eb9b3260743234199b7f4da704a034 /rootfs/etc/runit/1
parentb9dfdaaa1ae0148dd8a3e78508c636636e7396a6 (diff)
fix init systemend
Diffstat (limited to 'rootfs/etc/runit/1')
-rwxr-xr-xrootfs/etc/runit/120
1 files changed, 20 insertions, 0 deletions
diff --git a/rootfs/etc/runit/1 b/rootfs/etc/runit/1
new file mode 100755
index 0000000..f693a41
--- /dev/null
+++ b/rootfs/etc/runit/1
@@ -0,0 +1,20 @@
+#!/bin/sh
+# mount all drives in /etc/fstab
+mount -a
+
+# clear run folder
+rm -rf /var/run
+mkdir -p /var/run
+
+# update hostname
+hostname -F /etc/hostname
+
+# up all network interfaces
+ifup -a -f
+
+# start system log
+syslogd
+
+# go to stage 2 (normally runit (/sbin/init) does this by itself, but this is
+# using busybox's weird init system)
+(setsid /etc/runit/2 1> /dev/null 2> /dev/null &)