Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | # This is run first except when booting in single-user mode. |
| 2 | |
| 3 | # Startup the system |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 4 | ::sysinit:/bin/mount -t proc proc /proc |
| 5 | ::sysinit:/bin/mount -t sysfs sysfs /sys |
| 6 | ::sysinit:/bin/mount -t devtmpfs devtmpfs /dev |
| 7 | ::sysinit:/bin/mount -o remount,rw / |
| 8 | ::sysinit:/bin/mkdir -p /dev/pts |
| 9 | ::sysinit:/bin/mount -t devpts devpts /dev/pts |
| 10 | ::sysinit:/bin/mount -a |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | ::sysinit:/sbin/swapon -a |
| 12 | null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd |
| 13 | null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin |
| 14 | null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout |
| 15 | null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr |
| 16 | # set hostname |
| 17 | null::sysinit:/bin/busybox hostname -F /etc/hostname |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 18 | ::sysinit:/etc/init.d/rcS |
| 19 | |
| 20 | # Stuff to do before rebooting |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | #::ctrlaltdel:/sbin/reboot |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 22 | ::shutdown:/etc/init.d/rcK |
| 23 | ::shutdown:/sbin/swapoff -a |
| 24 | ::shutdown:/bin/umount -a -r |
| 25 | |
| 26 | # Stuff to do when restarting the init process |
| 27 | ::restart:/sbin/init |
| 28 | |