Bug in hotplug.sdcard script
Ronny Nilsson
rln-nard at arbetsmyra.dyndns.org
Mon Nov 16 11:53:40 CET 2015
Hi
I think you are right. Thanks! :) I'll fix in the git devel branch.
The script is always used as default. If a process has a file open on the
sdcard it will get a HUP signal event if the user removes the sdcard during
operation. The script also informes the automounter which will do an unmount.
/Ronny
------------------------------------------
> Hi,
>
> I guess I've found a bug in the hotplug.sdcard script of raspi_x_revx.
> You're looking for the PIDs of processes using a mount by
>
> ls -l /proc/*/fd/ /proc/*/cwd 2>/dev/null | \
> grep "sdcard/" | grep -oE "/proc/[[:digit:]]+" | \
> grep -oE "[[:digit:]]+"
>
> Unfortunately a line of ls -l looks like:
>
> lr-x------ 1 root root 64 Nov 14 15:39 9 -> /mnt/sdcard
>
> So the actual PID is not shown. If you change the ls to
>
> ls -ld /proc/*/fd/*
>
> it should work like intended.
> Anyway, I guess the script is not used in the default setup, since
> autofs takes care of mounting and re-mounting, correct?
>
> BR,
> Manuel
More information about the Nard
mailing list