Fix mount-fix issue

This commit is contained in:
Cameron Thompson
2025-01-28 19:49:42 -05:00
parent 3b2f4df801
commit 3d0a760e13
7 changed files with 69 additions and 79 deletions

View File

@@ -33,6 +33,8 @@ stop_handle_new_firmware() {
/bin/echo "Stopping and reverting overlay and pivot_root"
service init-overlay-watchdog stop
service init-overlay-watchdog disable
# Unmount /etc/rc.d bind
/bin/umount -lf /etc/rc.d
# Remount the original root filesystem as read-write
/bin/mount -o remount,rw /real_rootfs
@@ -73,6 +75,10 @@ stop_handle_old_firmware() {
# Redirect all output (stdout and stderr) to the log file
exec >>"$LOG_FILE" 2>&1
/bin/echo "Stopping and reverting overlay and pivot_root"
service init-overlay-watchdog stop
service init-overlay-watchdog disable
# Unmount /etc/rc.d bind
/bin/umount -lf /etc/rc.d
# Remount the original root filesystem as read-write
/bin/mount -o remount,rw /real_rootfs
@@ -110,7 +116,6 @@ if grep -qs '/real_rootfs' /proc/mounts; then
echo "Upgrade scenario detected."
mount_factory
service mount-fix disable
rm /usrdata/etc/rc.d/S03mount-fix
echo "Filesystem structure returned to Quectel Stock"
echo "Backup exists at /usrdata/rootfs or /data/rootfs"
fi
@@ -131,4 +136,8 @@ if grep -qs '/usrdata' /proc/mounts; then
umount -lf /etc
fi
echo "Preinst complete...."
echo "View Results here:..."
mount
exit 0