OMSA: /etc/udev/rules.d/95-srvadmin-dataeng.rules: not smart

Giulio Orsero giulioo at gmail.com
Thu Apr 30 08:06:03 CDT 2009


Centos5.3, OMSA 5.5

/etc/udev/rules.d/95-srvadmin-dataeng.rules contains:
  # get Data Engine install path
  IMPORT{program}="/bin/grep '^OMDataEngine.installpath' /etc/omreg.cfg"
 
  # run hotplug event script
  RUN+="$ENV{OMDataEngine.installpath}/bin/dataeng.hotplug $ENV{SUBSYSTEM}"

This means "grep" and "dataeng.hotplug" (and all of its child processes) are
run for every event, whatever its origin is, so this happens thousands of
times; this add a delay to the boot process and clutter the udev log (ie:
you boot with udevdebug to debug something and all you see is line after
line of "dataeng.hotplug ...").

Since by looking at dataeng.hotplug I see it cares for pci and usb only,
could we at least change the content of the rules file to be:

=========
BUS=="pci", IMPORT{program}="/bin/grep '^OMDataEngine.installpath'
/etc/omreg.cfg"
BUS=="usb", IMPORT{program}="/bin/grep '^OMDataEngine.installpath'
/etc/omreg.cfg"
 
# run hotplug event script
BUS=="pci", RUN+="$ENV{OMDataEngine.installpath}/bin/dataeng.hotplug
$ENV{SUBSYSTEM}"
BUS=="usb", RUN+="$ENV{OMDataEngine.installpath}/bin/dataeng.hotplug
$ENV{SUBSYSTEM}"
=========

It would be even better if a more granular filter could be applied, what's
the purpose of dataeng.hotplug?

Thanks
-- 
giulioo at pobox.com



More information about the Linux-PowerEdge mailing list