ready for PR
This commit is contained in:
6
opkg-source/SDXPINN-mount-fix/CONTROL/control
Normal file
6
opkg-source/SDXPINN-mount-fix/CONTROL/control
Normal file
@@ -0,0 +1,6 @@
|
||||
Package: SDXPINN-mount-fix
|
||||
Version: 1.0
|
||||
Architecture: arm64
|
||||
Maintainer: Cameron Thompson iamromulan@github.com
|
||||
Description: Creates a usable mount space and overlay for SDXPINN modems
|
||||
Depends: libc
|
||||
15
opkg-source/SDXPINN-mount-fix/CONTROL/postinst
Normal file
15
opkg-source/SDXPINN-mount-fix/CONTROL/postinst
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/ash
|
||||
|
||||
# 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
|
||||
15
opkg-source/SDXPINN-mount-fix/CONTROL/preinst
Normal file
15
opkg-source/SDXPINN-mount-fix/CONTROL/preinst
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/ash
|
||||
|
||||
# Check if /etc is mounted
|
||||
if grep -qs '/etc ' /proc/mounts; then
|
||||
echo "Unmounting /etc..."
|
||||
umount -lf /etc
|
||||
fi
|
||||
|
||||
# Check if root filesystem is mounted as read-only
|
||||
if grep -qs " / " /proc/mounts | grep "(ro,"; then
|
||||
echo "Remounting root filesystem as read-write..."
|
||||
mount -o remount,rw /
|
||||
fi
|
||||
|
||||
exit 0
|
||||
8
opkg-source/SDXPINN-mount-fix/CONTROL/prerm
Normal file
8
opkg-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