From b6276ca1dfae0b8559efa2fcf85295411fe3b676 Mon Sep 17 00:00:00 2001 From: Alfonso Gamboa Date: Sat, 2 Jul 2022 01:45:13 -0700 Subject: [PATCH] add comments, clean up --- SD_ROOT/wz_mini/etc/init.d/wz_init.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/SD_ROOT/wz_mini/etc/init.d/wz_init.sh b/SD_ROOT/wz_mini/etc/init.d/wz_init.sh index fffb670..aa0fc03 100755 --- a/SD_ROOT/wz_mini/etc/init.d/wz_init.sh +++ b/SD_ROOT/wz_mini/etc/init.d/wz_init.sh @@ -1,7 +1,4 @@ #!/bin/sh -### -###DO NOT MODIFY UNLESS YOU KNOW WHAT YOU ARE DOING -### ###This file is run by switch_root, from the initramfs in the kernel. LOG_NAME=/opt/wz_mini/log/wz_init @@ -36,13 +33,13 @@ echo ' set -x -#replace stock busybox +echo "replace stock busybox" mount --bind /opt/wz_mini/bin/busybox /bin/busybox echo "replace stock fstab" mount --bind /opt/wz_mini/etc/fstab /etc/fstab -echo "mount workplace dir" +echo "mount wz_mini tmpfs" mount -t tmpfs /opt/wz_mini/tmp echo "install busybox applets" @@ -96,14 +93,21 @@ else fi fi -touch /opt/wz_mini/etc/.first_boot +if [ -f /opt/wz_mini/etc/.first_boot ]; then + echo "Not first_boot" +else + echo "Set first_boot" + touch /opt/wz_mini/etc/.first_boot +fi + +echo "replace stock inittab" mount --bind /opt/wz_mini/etc/inittab /etc/inittab echo "bind /etc/profile for local/ssh shells" mount --bind /opt/wz_mini/etc/profile /etc/profile -echo "mounting tmpfs" +echo "mounting global tmpfs" mount -t tmpfs /tmp echo "mount system to replace factorycheck with dummy, to prevent bind unmount"