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