mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-27 07:37:19 +00:00
Fix S11configbackup creates /wyze_config_backup without wyze_config_backup/configs
This commit is contained in:
parent
7ed7ca6a43
commit
4070ed7ce6
@ -7,14 +7,17 @@
|
|||||||
|
|
||||||
. /opt/wz_mini/wz_mini.conf
|
. /opt/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
if df / | grep -q overlayfs; then
|
|
||||||
mount --bind /sdcard /opt # Temporarily let this script do its operations as if SD Card is mounted as /opt
|
|
||||||
fi
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
|
|
||||||
echo "#####$(basename "$0")#####"
|
echo "#####$(basename "$0")#####"
|
||||||
|
|
||||||
|
if df / | grep -q overlayfs; then
|
||||||
|
mkdir -p /sdcard/wyze_config_backup
|
||||||
|
mkdir -p /opt/wyze_config_backup
|
||||||
|
mount --bind /sdcard/wyze_config_backup /opt/wyze_config_backup
|
||||||
|
fi
|
||||||
|
|
||||||
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"
|
||||||
else
|
else
|
||||||
@ -54,13 +57,14 @@ case "$1" in
|
|||||||
umount /params
|
umount /params
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if df / | grep -q overlayfs; then
|
||||||
|
umount /opt/wyze_config_backup
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start}"
|
echo "Usage: $0 {start}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if df / | grep -q overlayfs; then
|
|
||||||
umount /opt
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user