From 84e92c5712d1c53b875b2eca7a06d5f81b2d774a Mon Sep 17 00:00:00 2001 From: archandanime <36922812+archandanime@users.noreply.github.com> Date: Wed, 4 Oct 2023 19:09:06 +0700 Subject: [PATCH] S11configbackup: use mount bind to avoid creating/deleing symlink --- SD_ROOT/wz_mini/etc/init.d/S11configbackup | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SD_ROOT/wz_mini/etc/init.d/S11configbackup b/SD_ROOT/wz_mini/etc/init.d/S11configbackup index d05f7aa..b6b0410 100644 --- a/SD_ROOT/wz_mini/etc/init.d/S11configbackup +++ b/SD_ROOT/wz_mini/etc/init.d/S11configbackup @@ -11,16 +11,16 @@ case "$1" in start) echo "#####$(basename "$0")#####" - - + if df / | grep -q overlayfs; then if [ -d /sdcard/wyze_config_backup ]; then echo "Factory config backup directory exists" else echo "Creating factory config backup directory" mkdir /sdcard/wyze_config_backup - fi - ln -s /sdcard/wyze_config_backup /opt/wyze_config_backup + fi + mkdir -p /opt/wyze_config_backup + mount --bind /sdcard/wyze_config_backup /opt/wyze_config_backup else if [ -d /opt/wyze_config_backup ]; then echo "Factory config backup directory exists" @@ -67,7 +67,7 @@ case "$1" in fi if df / | grep -q overlayfs; then - rm /opt/wyze_config_backup + umount /opt/wyze_config_backup fi ;; *)