[yocto] udev automount.rules not running on boot

Paul Knopf pknopf at medxchange.com
Thu May 5 12:56:56 PDT 2016


It appears that /dev isn't mounted by the time the rules fire.

What I winded up doing is creating a init.d script that re-triggers an
"add" command for any block device partitions.

-------------------------

#!/bin/sh

for line in `cat /proc/partitions |grep -e [s]d[a-z][0-9]$ |awk '{print
$4}'`; do
  block_number=`expr "$line" : '[a-z]\{3\}\(.\)*'`
  block_name=`expr "$line" : '\([a-z]\{3\}\).*'`
  echo $block_number
  echo $block_name
  echo add > /sys/block/$block_name/$block_name$block_number/uevent
done

-------------------------

This causes the "add' event to be re-triggered, making the USB mount on
boot.

On Thu, May 5, 2016 at 1:57 PM Paul Knopf <pknopf at medxchange.com> wrote:

> I am using the automount.rules in udev-extra-conf.
>
> If I boot up with a block device plugged in, nothing is mounted. If I plug
> in the device AFTER the machine is booted, it shows up (in /run/media/*).
>
> How do I get these rules to be applied on boot?
> --
>
> Thanks,
> Paul Knopf
> Software Engineer
> Med X Change, Inc
> pknopf at medxchange.com
>
-- 

Thanks,
Paul Knopf
Software Engineer
Med X Change, Inc
pknopf at medxchange.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160505/cae413d4/attachment.html>


More information about the yocto mailing list