Sync with development-SDXPINN
This commit is contained in:
BIN
ipk-source/sdxpinn-mount-fix/root/usr/bin/inotifywait
Executable file
BIN
ipk-source/sdxpinn-mount-fix/root/usr/bin/inotifywait
Executable file
Binary file not shown.
1
ipk-source/sdxpinn-mount-fix/root/usr/lib/libinotifytools.so
Symbolic link
1
ipk-source/sdxpinn-mount-fix/root/usr/lib/libinotifytools.so
Symbolic link
@@ -0,0 +1 @@
|
||||
libinotifytools.so.0.4.1
|
||||
1
ipk-source/sdxpinn-mount-fix/root/usr/lib/libinotifytools.so.0
Symbolic link
1
ipk-source/sdxpinn-mount-fix/root/usr/lib/libinotifytools.so.0
Symbolic link
@@ -0,0 +1 @@
|
||||
libinotifytools.so.0.4.1
|
||||
BIN
ipk-source/sdxpinn-mount-fix/root/usr/lib/libinotifytools.so.0.4.1
Executable file
BIN
ipk-source/sdxpinn-mount-fix/root/usr/lib/libinotifytools.so.0.4.1
Executable file
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
Package: inotifywait
|
||||
Version: 3.20.11.0-1
|
||||
Depends: libc, libinotifytools
|
||||
Source: feeds/packages/utils/inotify-tools
|
||||
SourceName: inotifywait
|
||||
License: GPLv2
|
||||
LicenseFiles: COPYING
|
||||
Section: utils
|
||||
SourceDateEpoch: 1605477462
|
||||
Maintainer: Daniel Golle <daniel@makrotopia.org>
|
||||
Architecture: aarch64_cortex-a53
|
||||
Installed-Size: 9023
|
||||
Description: inotify-tools is a C library and a set of command-line programs for
|
||||
Linux providing a simple interface to inotify. These programs can be
|
||||
used to monitor and act upon filesystem events. A more detailed
|
||||
description of the programs is further down the page. The programs are
|
||||
written in C and have no dependencies other than a Linux kernel
|
||||
supporting inotify.
|
||||
|
||||
This package provides the inotifywait tool.
|
||||
@@ -0,0 +1 @@
|
||||
/usr/bin/inotifywait
|
||||
5
ipk-source/sdxpinn-mount-fix/root/usr/lib/opkg/info/inotifywait.postinst
Executable file
5
ipk-source/sdxpinn-mount-fix/root/usr/lib/opkg/info/inotifywait.postinst
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
|
||||
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
|
||||
. ${IPKG_INSTROOT}/lib/functions.sh
|
||||
default_postinst $0 $@
|
||||
4
ipk-source/sdxpinn-mount-fix/root/usr/lib/opkg/info/inotifywait.prerm
Executable file
4
ipk-source/sdxpinn-mount-fix/root/usr/lib/opkg/info/inotifywait.prerm
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
|
||||
. ${IPKG_INSTROOT}/lib/functions.sh
|
||||
default_prerm $0 $@
|
||||
@@ -0,0 +1,20 @@
|
||||
Package: libinotifytools
|
||||
Version: 3.20.11.0-1
|
||||
Depends: libc
|
||||
Source: feeds/packages/utils/inotify-tools
|
||||
SourceName: libinotifytools
|
||||
License: GPLv2
|
||||
LicenseFiles: COPYING
|
||||
Section: libs
|
||||
SourceDateEpoch: 1605477462
|
||||
Maintainer: Daniel Golle <daniel@makrotopia.org>
|
||||
Architecture: aarch64_cortex-a53
|
||||
Installed-Size: 13142
|
||||
Description: inotify-tools is a C library and a set of command-line programs for
|
||||
Linux providing a simple interface to inotify. These programs can be
|
||||
used to monitor and act upon filesystem events. A more detailed
|
||||
description of the programs is further down the page. The programs are
|
||||
written in C and have no dependencies other than a Linux kernel
|
||||
supporting inotify.
|
||||
|
||||
This package provides the libinotifytools shared library.
|
||||
@@ -0,0 +1,3 @@
|
||||
/usr/lib/libinotifytools.so.0.4.1
|
||||
/usr/lib/libinotifytools.so
|
||||
/usr/lib/libinotifytools.so.0
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
|
||||
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
|
||||
. ${IPKG_INSTROOT}/lib/functions.sh
|
||||
default_postinst $0 $@
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
[ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
|
||||
. ${IPKG_INSTROOT}/lib/functions.sh
|
||||
default_prerm $0 $@
|
||||
39
ipk-source/sdxpinn-mount-fix/root/usr/sbin/init-overlay-watchdog.sh
Executable file
39
ipk-source/sdxpinn-mount-fix/root/usr/sbin/init-overlay-watchdog.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/ash
|
||||
|
||||
# Paths to monitor and synchronize
|
||||
WATCH_DIR="/etc/rc.d"
|
||||
TARGET_DIR="/real_rootfs/etc/rc.d"
|
||||
|
||||
# Function to synchronize init scripts
|
||||
synchronize_init_scripts() {
|
||||
mount -o remount,rw /real_rootfs
|
||||
# Copy new or updated symlinks from WATCH_DIR to TARGET_DIR
|
||||
for link in "$WATCH_DIR"/*; do
|
||||
if [ -L "$link" ]; then
|
||||
link_name=$(basename "$link")
|
||||
if [ ! -e "$TARGET_DIR/$link_name" ] || [ "$link" -nt "$TARGET_DIR/$link_name" ]; then
|
||||
cp -af "$link" "$TARGET_DIR/$link_name"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove symlinks in TARGET_DIR that no longer exist in WATCH_DIR
|
||||
for link in "$TARGET_DIR"/*; do
|
||||
if [ -L "$link" ]; then
|
||||
link_name=$(basename "$link")
|
||||
if [ ! -e "$WATCH_DIR/$link_name" ]; then
|
||||
rm -f "$TARGET_DIR/$link_name"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
mount -o remount,ro /real_rootfs
|
||||
}
|
||||
|
||||
# Initial synchronization
|
||||
synchronize_init_scripts
|
||||
|
||||
# Monitor WATCH_DIR for changes using inotifywait
|
||||
while true; do
|
||||
inotifywait -e create,delete,modify,move "$WATCH_DIR"
|
||||
synchronize_init_scripts
|
||||
done
|
||||
Reference in New Issue
Block a user