devd doesn't fire event on boot

Ronald Klop ronald-freebsd8 at klop.yi.org
Wed May 6 10:03:17 UTC 2009


Hello,

Running 7.2-STABLE/amd64. I have a USB-disk and added stuff to devd to  
mount it readonly on attach. This does work if I attach it after booting  
up, but not if it is attached before booting.

[root at sjakie ~]# cat /etc/devd/philips.conf
attach 10 {
         device-name "umass[0-9]+";
         match "vendor" "0x0471";
         match "product" "0x083a";
         match "sernum" "20521126";
         action "/root/bin/mountphilips.sh";
};

[root at sjakie ~]# cat /root/bin/mountphilips.sh
#! /bin/sh
(
# Sleep, so geom and other kernel stuff can handle the disk
# before we try to mount it.
sleep 10
mount -v /mnt/backupdisk
) &

[root at sjakie ~]# grep backupdisk /etc/fstab
/dev/ufs/Extern /mnt/backupdisk ufs     ro,noauto       0       0

What can be wrong? Is it possible devd misses events which happened before  
devd was started?
Is this known behaviour?

Ronald.


More information about the freebsd-stable mailing list