From edf198485a635903cb46d75ce0a9c15047c096d0 Mon Sep 17 00:00:00 2001 From: Paul Philppov Date: Fri, 17 Jan 2025 02:23:41 -0500 Subject: [PATCH] automount: kill processes writing to the card on unmounting. --- overlay/lower/usr/lib/mdev/automount | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/overlay/lower/usr/lib/mdev/automount b/overlay/lower/usr/lib/mdev/automount index db2329e3f..72a2c4b43 100755 --- a/overlay/lower/usr/lib/mdev/automount +++ b/overlay/lower/usr/lib/mdev/automount @@ -75,7 +75,7 @@ do_mount() { } do_umount() { - stop_recording + lsof | awk '/\/mnt\/mmcblk0p1/{print $1}' | xargs kill -9 if grep -qs "^$devicenode " /proc/mounts; then if umount "$mountpoint"; then @@ -122,12 +122,6 @@ do_run_once() { fi } -stop_recording() { - while pidof openRTSP > /dev/null; do - killall openRTSP - done -} - case "$ACTION" in add | "") do_umount