Add check for overlay rootfs before linking /sdcard/record to /opt/record

This commit is contained in:
archandanime 2023-10-03 09:58:41 +07:00 committed by GitHub
parent 7fe2053d6b
commit f2babb4593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,8 +34,10 @@ case "$1" in
echo $CUSTOM_HOSTNAME > /opt/wz_mini/etc/hostname echo $CUSTOM_HOSTNAME > /opt/wz_mini/etc/hostname
mount --bind /opt/wz_mini/etc/hostname /etc/hostname mount --bind /opt/wz_mini/etc/hostname /etc/hostname
mkdir -p /opt/record if df / | grep -q overlayfs; then
mount --bind /sdcard/record /opt/record mkdir -p /opt/record
mount --bind /sdcard/record /opt/record
fi
;; ;;
*) *)
echo "Usage: $0 {start}" echo "Usage: $0 {start}"