On Fri, May 5, 2017 at 11:48 AM, michael c <[email protected]> wrote:
> udisks2 to the rescue.
> basic usage i suppose.
> here's my rule
> /etc/udev/rules.d/99-mount-sd-card.rules
> SUBSYSTEM=="block", ACTION=="remove", RUN+="/bin/sh -c
> '/home/scripts/sdunmounted'"
> SUBSYSTEM=="block", ACTION=="add", RUN+="/bin/sh -c
> '/home/scripts/sdmounted'"
>
> /home/scripts/sdmounted
> mount -v /dev/mmcblk0p1 /media/sd-card
>
> it is a closed, headless, embedded system. i believe the card should always
> appear as mmcblk0p1

Yeah, this fix was back-ported to v4.4.x, so as long as it's v4.4.x+
based system, that will be true..

>
> my software detects a functioning card on boot,
> but i guess it will notice it's not there during operation by failing.
> or i could send a signal into my c code program that alerts it to it's
> removal? or insertion?
> not sure how that would work without the c code polling something.

idk, directly using the hot-swapping sd card is going to be risky..

I think it would be better to have a local cache, and just rsync it to
the card when it get plugged in.  Then have some sort of active
sync/mirror operation..

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYj1U23xgMzVy9GtfFFuamckraBVHY6UqEKwvwVBwaaj0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to