summaryrefslogtreecommitdiff
path: root/old-school/init
diff options
context:
space:
mode:
Diffstat (limited to 'old-school/init')
-rwxr-xr-xold-school/init60
1 files changed, 60 insertions, 0 deletions
diff --git a/old-school/init b/old-school/init
new file mode 100755
index 0000000..3b62c0a
--- /dev/null
+++ b/old-school/init
@@ -0,0 +1,60 @@
1#!/bin/sh
2PATH=$PATH:/usr/lib/klibc/bin
3#if [ $$ = 1 ]; then
4# "$0" "$@"
5# exec sh -i
6#fi
7. init.functions
8warnings=y
9
10debug_log init
11mountvirt
12klogd -c1 # no kernel messages
13
14mkdir -p "$LOGBASE"
15sh -c "syslogd -O '$LOGBASE'/"'syslogd.$$.log';
16if [ "$DEBUG" != y ]; then
17 echo 0 > /proc/sys/kernel/printk
18fi
19
20makedev
21loadenv
22
23if [ -x /bin/kmod ]; then
24 ln -sf /bin/kmod /bin/depmod
25 /bin/depmod -a
26else
27 depmod -a
28fi
29
30PS1='[$$ \w]# ' my_openvt 8 -- sh -i
31
32mkfifo "$MENUFIFO" || panic "mkfifo '$MENUFIFO' failed"
33bootmenu
34mkdir -p /etc/udev/rules.d
35cat <<END >/etc/udev/rules.d/z00_blockdev_mountroot.rules
36ACTION=="add", SUBSYSTEM=="block", RUN+="/bin/grok-block \$env{DEVNAME}"
37END
38
39start_udev
40mountunionroot
41
42bootwait rw-overlay
43# killeverything
44# nuke /dev/.udev/queue/
45stop_udev
46insertoverlay
47
48movemounts
49gpg_agent_chroot
50patchroot
51clear >/dev/tty1
52chvt 1
53[ -e /do-delay-boot ] && bootwait 'launch-init-ready'
54launch_init "$@"
55
56# unreachable since launch_init will panic on failure
57panic 'inconceivable!'
58exec >/dev/tty1 2>&1 <&1
59reset
60exec sh -i