diff options
Diffstat (limited to 'meta/recipes-core/busybox/files')
-rw-r--r-- | meta/recipes-core/busybox/files/inittab | 24 | ||||
-rw-r--r-- | meta/recipes-core/busybox/files/rcK | 25 | ||||
-rw-r--r-- | meta/recipes-core/busybox/files/rcS | 26 | ||||
-rw-r--r-- | meta/recipes-core/busybox/files/runlevel | 11 |
4 files changed, 86 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/files/inittab b/meta/recipes-core/busybox/files/inittab new file mode 100644 index 0000000000..bfec4a7743 --- /dev/null +++ b/meta/recipes-core/busybox/files/inittab | |||
@@ -0,0 +1,24 @@ | |||
1 | # This is run first except when booting in single-user mode. | ||
2 | |||
3 | # Startup the system | ||
4 | null::sysinit:/bin/mount -t proc proc /proc | ||
5 | null::sysinit:/bin/mount -t sysfs sysfs /sys | ||
6 | null::sysinit:/bin/mount -t devtmpfs devtmpfs /dev | ||
7 | null::sysinit:/bin/mount -o remount,rw / | ||
8 | null::sysinit:/bin/mkdir -p /dev/pts | ||
9 | null::sysinit:/bin/mount -t devpts devpts /dev/pts | ||
10 | null::sysinit:/bin/mount -a | ||
11 | |||
12 | ::sysinit:/etc/init.d/rcS | ||
13 | |||
14 | # Stuff to do before rebooting | ||
15 | ::ctrlaltdel:/sbin/reboot | ||
16 | ::shutdown:/etc/init.d/rcK | ||
17 | ::shutdown:/sbin/swapoff -a | ||
18 | ::shutdown:/bin/umount -a -r | ||
19 | |||
20 | # Stuff to do when restarting the init process | ||
21 | ::restart:/sbin/init | ||
22 | |||
23 | # set hostname | ||
24 | null::sysinit:/bin/busybox hostname -F /etc/hostname | ||
diff --git a/meta/recipes-core/busybox/files/rcK b/meta/recipes-core/busybox/files/rcK new file mode 100644 index 0000000000..050086ecd8 --- /dev/null +++ b/meta/recipes-core/busybox/files/rcK | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Stop all init scripts in /etc/init.d | ||
4 | # executing them in reversed numerical order. | ||
5 | # | ||
6 | for i in /etc/rc6.d/K??*; do | ||
7 | # Ignore dangling symlinks (if any). | ||
8 | [ ! -f "$i" ] && continue | ||
9 | |||
10 | case "$i" in | ||
11 | *.sh) | ||
12 | # Source shell script for speed. | ||
13 | ( | ||
14 | trap - INT QUIT TSTP | ||
15 | set stop | ||
16 | . $i | ||
17 | ) | ||
18 | ;; | ||
19 | *) | ||
20 | # No sh extension, so fork subprocess. | ||
21 | $i stop | ||
22 | ;; | ||
23 | esac | ||
24 | done | ||
25 | |||
diff --git a/meta/recipes-core/busybox/files/rcS b/meta/recipes-core/busybox/files/rcS new file mode 100644 index 0000000000..d18c26b4c3 --- /dev/null +++ b/meta/recipes-core/busybox/files/rcS | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Stop all init scripts in /etc/init.d | ||
4 | # executing them in reversed numerical order. | ||
5 | # | ||
6 | |||
7 | for i in /etc/rcS.d/S??* /etc/rc5.d/S??* ;do | ||
8 | # Ignore dangling symlinks (if any). | ||
9 | [ ! -f "$i" ] && continue | ||
10 | |||
11 | case "$i" in | ||
12 | *.sh) | ||
13 | # Source shell script for speed. | ||
14 | ( | ||
15 | trap - INT QUIT TSTP | ||
16 | set stop | ||
17 | . $i | ||
18 | ) | ||
19 | ;; | ||
20 | *) | ||
21 | # No sh extension, so fork subprocess. | ||
22 | $i start | ||
23 | ;; | ||
24 | esac | ||
25 | done | ||
26 | |||
diff --git a/meta/recipes-core/busybox/files/runlevel b/meta/recipes-core/busybox/files/runlevel new file mode 100644 index 0000000000..866f3b5945 --- /dev/null +++ b/meta/recipes-core/busybox/files/runlevel | |||
@@ -0,0 +1,11 @@ | |||
1 | #!/bin/sh | ||
2 | # busybox init does not have LSB ( sysvinit ) like initlevels | ||
3 | # so lets fake it to 5 which is what we default anyway | ||
4 | # this helps with opkg post installs where it tries to invoke | ||
5 | # update-rc.d ad post install step. | ||
6 | # for package upgrades | ||
7 | # See code in update-rc.d around line 190 where it calls runlevel | ||
8 | # program | ||
9 | # | ||
10 | echo "5" | ||
11 | |||