diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-09-05 19:43:23 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-09-05 19:43:23 +0200 |
commit | 67173d02a884a7769c47e45f8fea5a97827c15c4 (patch) | |
tree | 157556abaeee140d09bdd7078cad190cb43c6c4c /scripts/init.rootfs | |
parent | 280a9b13d28b9f581259ba3aa8affb2f049f05a0 (diff) |
initscript sets HOME='/root', sets max devtmpfs to 4k and chdir to %HOME before invoking sh
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'scripts/init.rootfs')
-rw-r--r-- | scripts/init.rootfs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/init.rootfs b/scripts/init.rootfs index 651acef..19757b8 100644 --- a/scripts/init.rootfs +++ b/scripts/init.rootfs @@ -1,10 +1,11 @@ #!/bin/sh export PATH="/bin:/sbin:/usr/bin:/usr/sbin" +export HOME='/root' export PS1='\w \h\$ ' UDHCPC_ARGS= mkdir -p /dev /proc /sys -mount -t devtmpfs none /dev +mount -t devtmpfs none /dev -o size=4k mount -t proc none /proc mount -t sysfs none /sys mount -t debugfs nodev /sys/kernel/debug @@ -18,7 +19,7 @@ if [ x"$(command -v syslogd)" != x ]; then fi echo '4 4 1 7' >/proc/sys/kernel/printk -cat <<! +cat <<EOF Boot took $(cut -d' ' -f1 /proc/uptime) seconds @@ -33,7 +34,7 @@ Boot took $(cut -d' ' -f1 /proc/uptime) seconds Welcome to mini_linux -! +EOF for arg in $(cat /proc/cmdline | tr '[:upper:]' '[:lower:]'); do if [ x"${arg}" = xip4 ]; then @@ -53,5 +54,6 @@ done hostname minlin loadkmap </usr/share/keymaps/i386/qwertz/de-latin1.bmap +cd ${HOME} setsid cttyhack sh poweroff -f |