[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel][PATCH] Udev integration: udev rules 1/3

On Wed, Apr 08, 2009 at 02:34:02PM +0200, Peter Rajnoha wrote:
> # udev rules for DM devices
> # This will create nodes in /dev/mapper directory.
/dev and mapper are (separately) configurable, so this script should perhaps
be generated from a template for consistency.
(DM_DIR is fixed at compile time and must match the kernel - set in dm-ioctl.h)
(/dev gets interesting if people invoked lvm with a private lvm.conf with a
private devices/dir - as a minimum assumptions made by the script should be
noted in comments.)

> # "dm" sysfs subdirectory is available in newer DM versions only.

"newer" ?  Be precise - give the version.

> # You can define your own permissions for DM devices here.
> # ENV{DM_NAME}=="my_device", OWNER="peter", GROUP="peter", MODE="0644"
Can that be read from a separate file to avoid the need for manual editing
when updating?  (Otherwise add markers so that a postinstall script
can automatically update the file.)

> # We won't send notifications for known subsystems since
> # these have their own dedicated rules and the notification
> # will be done after they finish their own actions.
> ENV{DM_UUID}=="LVM-?*", GOTO="dm_end"
Again, how are these prefixes defined?
- Each package will want to install it's own prefix handler.
  Can that be done without having to edit files?

> ENV{COOKIE}=="[0-9]*", RUN+="/sbin/dmsetup notify $env{COOKIE}", OPTIONS+="last_rule"
Since this is external input being passed to a trusted program, what is validating it?
- Does that regex have implicit ^ and $ anchors around it?  (If not, add them.)
- What if the variable is defined but empty?  (Change * to +) ?

agk redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]