mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-23 14:07:24 +00:00
S11configbackup: use mount bind to avoid creating/deleing symlink
This commit is contained in:
parent
c163d4c1ff
commit
84e92c5712
@ -11,16 +11,16 @@ case "$1" in
|
|||||||
start)
|
start)
|
||||||
|
|
||||||
echo "#####$(basename "$0")#####"
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
|
||||||
if df / | grep -q overlayfs; then
|
if df / | grep -q overlayfs; then
|
||||||
if [ -d /sdcard/wyze_config_backup ]; then
|
if [ -d /sdcard/wyze_config_backup ]; then
|
||||||
echo "Factory config backup directory exists"
|
echo "Factory config backup directory exists"
|
||||||
else
|
else
|
||||||
echo "Creating factory config backup directory"
|
echo "Creating factory config backup directory"
|
||||||
mkdir /sdcard/wyze_config_backup
|
mkdir /sdcard/wyze_config_backup
|
||||||
fi
|
fi
|
||||||
ln -s /sdcard/wyze_config_backup /opt/wyze_config_backup
|
mkdir -p /opt/wyze_config_backup
|
||||||
|
mount --bind /sdcard/wyze_config_backup /opt/wyze_config_backup
|
||||||
else
|
else
|
||||||
if [ -d /opt/wyze_config_backup ]; then
|
if [ -d /opt/wyze_config_backup ]; then
|
||||||
echo "Factory config backup directory exists"
|
echo "Factory config backup directory exists"
|
||||||
@ -67,7 +67,7 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if df / | grep -q overlayfs; then
|
if df / | grep -q overlayfs; then
|
||||||
rm /opt/wyze_config_backup
|
umount /opt/wyze_config_backup
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user