iopsys-feed/inotify-tools/files/usr/bin/iop_write_monitor
2016-02-25 18:19:22 +01:00

13 lines
340 B
Bash
Executable file

#! /bin/sh
# is the real root mounted ?
if [ ! -f /tmp/inotify_real_root/etc/preinit ]
then
ubivol=$( cat /proc/cmdline | sed -e "s/.*root=\(ubi:rootfs_.\).*/\1/" )
mkdir /tmp/inotify_real_root
mount -t ubifs $ubivol /tmp/inotify_real_root
fi
inotifywait -r -m -e modify -e create -e attrib -e delete -e move /tmp/inotify_real_root