Update: sdxpinn-mount-fix 1.0.11 RC
-Improved stopping mount-fix
- Now restores stock filesystem completely when stopped.
- / is still rw after but a reboot or setting it to ro will make it be read only again
- Improved echo and comments
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
Package: sdxpinn-mount-fix
|
||||
Version: 1.0.10
|
||||
Version: 1.0.11
|
||||
Architecture: aarch64_cortex-a53
|
||||
Maintainer: Cameron Thompson iamromulan@github.com
|
||||
Description: Creates a usable mount space and overlay for SDXPINN modems. Dependencies bundled: libinotifytools and inotifywait
|
||||
|
||||
@@ -4,19 +4,20 @@
|
||||
DETECTED_PACKAGES_FILE="/tmp/detected_packages.tmp"
|
||||
LIST_FILE_DELETED=false
|
||||
|
||||
# Function to check if a specific package is installed and delete its list file
|
||||
# Function to check if a specific bundled package is already installed and delete its list file
|
||||
detect_and_remove_list_files() {
|
||||
local package_name="$1"
|
||||
local list_file="/usr/lib/opkg/info/${package_name}.list"
|
||||
|
||||
# Check if the package is installed by checking its .list file
|
||||
# Check if the bundled package is installed by checking its .list file
|
||||
if [ -f "$list_file" ]; then
|
||||
echo "$package_name is already installed. Deleting $list_file to avoid conflicts."
|
||||
echo "$package_name is already installed. Deleting its $list_file to avoid future conflicts."
|
||||
rm -f "$list_file"
|
||||
echo "$package_name" >> "$DETECTED_PACKAGES_FILE"
|
||||
LIST_FILE_DELETED=true
|
||||
else
|
||||
echo "$package_name is not installed."
|
||||
echo "$package_name is not currently installed."
|
||||
echo "$package_name is included in this package and will be installed."
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -5,5 +5,6 @@ service mount-fix stop
|
||||
sleep 1
|
||||
service mount-fix disable
|
||||
service init-overlay-watchdog disable
|
||||
|
||||
echo "Filesystem structure returned to Quectel Stock"
|
||||
echo "Backup exists at /data/rootfs"
|
||||
exit 0
|
||||
@@ -124,6 +124,18 @@ stop() {
|
||||
|
||||
/bin/echo "Reverted pivot_root" >> /tmp/mount-fix.log
|
||||
/bin/echo "Previous root overlay available at /rootfs" >> /tmp/mount-fix.log
|
||||
|
||||
# Unmount /rootfs overlay
|
||||
/bin/umount -lf /rootfs >/dev/null 2>&1
|
||||
|
||||
# Mount the location of etc-upper back
|
||||
mount -t ubifs /dev/ubi0_3 /overlay
|
||||
|
||||
# Mount the old overlay filesystem back for etc
|
||||
/bin/mount -t overlay overlay -o lowerdir=/etc,upperdir=/overlay/etc-upper,workdir=/overlay/.etc-work /etc >> /tmp/mount-fix.log
|
||||
|
||||
echo -e "\e[31m / is read-write right now. Be careful\e[0m"
|
||||
echo -e "\e[31m Reboot or run mount -o remount,ro / \e[0m"
|
||||
}
|
||||
|
||||
restart() {
|
||||
|
||||
Reference in New Issue
Block a user