mount-fix ready to test

Confirmed working on my modem
This commit is contained in:
Cameron Thompson
2025-01-11 02:11:12 -05:00
parent 78d9bdabff
commit 775674cbed
8 changed files with 21 additions and 12 deletions

View File

@@ -4,6 +4,7 @@
WATCH_DIR="/etc/rc.d"
TARGET_DIR1="/real_rootfs/etc/rc.d"
TARGET_DIR2="/usrdata/etc/rc.d"
LOG_FILE="/tmp/init-overlay-watchdog.log"
# Function to synchronize init scripts
synchronize_init_scripts() {
@@ -56,6 +57,13 @@ synchronize_init_scripts() {
mount -o remount,ro /real_rootfs
}
# Initialize log
rm -f "$LOG_FILE" >/dev/null 2>&1
touch "$LOG_FILE"
# Redirect all output (stdout and stderr) to the log file
exec >>"$LOG_FILE" 2>&1
# Initial synchronization
synchronize_init_scripts