Add sdxpinn-mount-fix
-Source Added -build-ipk executable script added -ipk added
This commit is contained in:
6
ipk-source/sdxpinn-mount-fix/CONTROL/control
Normal file
6
ipk-source/sdxpinn-mount-fix/CONTROL/control
Normal 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
|
||||
33
ipk-source/sdxpinn-mount-fix/CONTROL/postinst
Normal file
33
ipk-source/sdxpinn-mount-fix/CONTROL/postinst
Normal 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
|
||||
13
ipk-source/sdxpinn-mount-fix/CONTROL/preinst
Normal file
13
ipk-source/sdxpinn-mount-fix/CONTROL/preinst
Normal 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
|
||||
8
ipk-source/sdxpinn-mount-fix/CONTROL/prerm
Normal file
8
ipk-source/sdxpinn-mount-fix/CONTROL/prerm
Normal 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
|
||||
Reference in New Issue
Block a user