Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.