Add sdxpinn-mount-fix

-Source Added
-build-ipk executable script added
-ipk added
This commit is contained in:
Cameron Thompson
2024-10-03 04:07:28 -04:00
parent 7594aa095b
commit 2feecf15e1
10 changed files with 370 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
Package: sdxpinn-mount-fix
Version: 1.0
Architecture: aarch64_cortex-a53
Maintainer: Cameron Thompson iamromulan@github.com
Description: Creates a usable mount space and overlay for SDXPINN modems
Depends: libc

View File

@@ -0,0 +1,33 @@
#!/bin/ash
# Replace distfeeds.conf with non-working sources commented out
# Check if the temporary distfeeds.conf file exists
if [ -f /tmp/distfeeds.conf ]; then
# Backup the existing /etc/opkg/distfeeds.conf if it exists
if [ -f /etc/opkg/distfeeds.conf ]; then
cp /etc/opkg/distfeeds.conf /etc/opkg/distfeeds.conf.bak
echo "Backed up original /etc/opkg/distfeeds.conf to /etc/opkg/distfeeds.conf.bak"
fi
# Move the new distfeeds.conf from /tmp to /etc/opkg
mv /tmp/distfeeds.conf /etc/opkg/distfeeds.conf
echo "Replaced /etc/opkg/distfeeds.conf with the custom version."
else
echo "Error: /tmp/distfeeds.conf not found. Cannot replace /etc/opkg/distfeeds.conf."
exit 1
fi
# Make the init script executable
chmod +x /etc/init.d/mount-fix
chmod +x /etc/init.d/init-overlay-watchdog
chmod +x /usr/sbin/init-overlay-watchdog.sh
# Enable and start the service
service mount-fix enable
service init-overlay-watchdog enable
service mount-fix start
opkg update
opkg install inotifywait inotifywatch
service init-overlay-watchdog start
exit 0

View File

@@ -0,0 +1,13 @@
#!/bin/ash
# Check if /etc is mounted
if grep -qs '/etc ' /proc/mounts; then
echo "Unmounting /etc..."
umount -lf /etc
fi
# Remount original rootfs as read-write
echo "Mounting / as read-write"
mount -o remount,rw /
exit 0

View File

@@ -0,0 +1,8 @@
#!/bin/ash
service stop mount-fix
service stop init-overlay-watchdog
service disable mount-fix
service disable init-overlay-watchdog
exit 0