0

I have added the rule

$ cat /etc/udev/rules.d/00-my.rules 
ACTION=="add",    KERNEL=="sd[a-z]", SUBSYSTEM=="block", PROGRAM="/usr/sbin/mytool add %r/%k"

on my RHEL 5.8 to check the disk's partition table on disk appearance event.

After I connect the disk mytool is called by udev subsystem and udev is pass something like /dev/sdb to mytool. But mytool unable to fopen the /dev/sdb because there are no /dev/sdb file at the time of mytool executing by udev on RHEL.

How can I fopen the file /dev/sdb/ in mine mytool?

1 Answer 1

2

You should be using RUN, not PROGRAM.

You must log in to answer this question.