summaryrefslogtreecommitdiffstats
path: root/init.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'init.sh.in')
-rw-r--r--init.sh.in32
1 files changed, 16 insertions, 16 deletions
diff --git a/init.sh.in b/init.sh.in
index 33459fd..07a0d99 100644
--- a/init.sh.in
+++ b/init.sh.in
@@ -1,43 +1,43 @@
#!/bin/sh
-PATH="/rescue"
+PATH='/rescue'
-if [ "`ps -o command 1 | tail -n 1 | ( read c o; echo ${o} )`" = "-s" ]; then
- echo "==> Running in single-user mode"
- SINGLE_USER="true"
+if [ "$(ps -o command 1 | tail -n 1 | ( read -r _ o; printf %s "$o" ))" = "-s" ]; then
+ echo '==> Running in single-user mode'
+ SINGLE_USER='true'
fi
-echo "==> Remount rootfs as read-write"
+echo '==> Remount rootfs as read-write'
mount -u -w /
-echo "==> Make mountpoints"
+echo '==> Make mountpoints'
mkdir -p /cdrom /memdisk /sysroot
-echo "==> Mount cdrom"
+echo '==> Mount cdrom'
mount_cd9660 /dev/iso9660/@VOLUME@ /cdrom
mdmfs -P -F /cdrom/data/system.uzip -o ro md.uzip /sysroot
-if [ "$SINGLE_USER" = "true" ]; then
- echo -n "Enter memdisk size used for read-write access in the live system: "
- read MEMDISK_SIZE
+if [ "$SINGLE_USER" = 'true' ]; then
+ echo -n 'Enter memdisk size used for read-write access in the live system: '
+ read -r MEMDISK_SIZE
else
- MEMDISK_SIZE="256"
+ MEMDISK_SIZE='256'
fi
-echo "==> Mount swap-based memdisk"
+echo '==> Mount swap-based memdisk'
mdmfs -s "${MEMDISK_SIZE}m" md /memdisk || exit 1
mount -t unionfs /memdisk /sysroot
mkdir -p /sysroot/mnt/cdrom
mount_nullfs -o ro /cdrom /sysroot/mnt/cdrom
-echo "==> Mount devfs"
+echo '==> Mount devfs'
mount -t devfs devfs /sysroot/dev
-if [ "$SINGLE_USER" = "true" ]; then
- echo "Starting interactive shell in temporary rootfs ..."
+if [ "$SINGLE_USER" = 'true' ]; then
+ echo 'Starting interactive shell in temporary rootfs ...'
sh
fi
-kenv init_shell="/bin/sh"
+kenv init_shell='/bin/sh'
exit 0