Skip to content

Commit

Permalink
automount: kill processes writing to the card on unmounting.
Browse files Browse the repository at this point in the history
  • Loading branch information
themactep committed Jan 17, 2025
1 parent 79894af commit edf1984
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions overlay/lower/usr/lib/mdev/automount
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit edf1984

Please sign in to comment.