I'm running SGI's XFS-based version of RH 7.1, which in turn uses your
patched version of devfsd. Since this version of devfsd has a home with the
Mandrake distribution, I figured this would be the most appropriate way to
report a bug.
The code for saving and restoring the permissions has got it *half* right.
Yup, the event is triggered and the copy happens. But it happens *before*
the underlying device node has been altered. The semantics thus become,
"save the previous state to restore, and then modify the device node". This
leaves something to be desired.
The work around, of course, is if you need to change the perms on anything
under /dev, do it *twice*. Then the first changed device node will get
copied before the second (identical, hence no-op) change is applied.
I'll try to work up a patch in a day or two; OTOH if you know where the
culprit lies already, please advise me and send me (and SGI) the patch you
come up with.
Oh, and another thing.... :)
I'm not sure if this is a bug or a feature, but if you have cases where
a device name would match more than one event regexp, it seems that only the
(first? last? I can't remember which) one happens.
So, order notwithstanding, if you've got, e.g.,
REGISTER ^cdroms/cdrom.$ EXECUTE /bin/ln -s $devpath $mntpath
REGISTER ^cdroms/cdrom0$ EXECUTE /bin/ln -s $devname cdrom
only one of those two things is going to happen (I think the latter). This
kinda sucks, especially for the exact case I used. There's fsck-all
different names for cdrom devices (cdrom, cdrom0, scd0, sr0, cdroms/cdrom0,
your/mommas/cdrom/0, scsi/host0/bus0/target3/lun0/{cd,generic}), and
wouldn't you know there's gotta be some piece of software that is going to
want *each* possible variation... (think: RedHat's kudzu and "updfstab").
It would be ever so nice if the multiple matching case thing performed all
matching actions, instead of the one most recent. It would also be *really*
nice to have a way to get at the regex match parts:
REGISTER ^cdroms/cdrom.$ EXECUTE /bin/ln -s $devpath scd$1
or something like that. (I know, I know, matching the bits of the RE can be
a royal PITA, and this isn't really meant to be "sed", but some way to pick
out the matching numeric portion of the name would really help.)
Okay. I'm done. :)
--
Alan Eldridge
import std_disclaimer
|