@ -44,12 +44,21 @@ let
# called by 50-firmware.rules works properly.
echo ' ENV { FIRMWARE_DIRS } = " ${ toString config . hardware . firmware } " ' > > $ out/00-path.rules
# Fix some paths in the standard udev rules.
# Add the udev rules from other packages.
for i in $ { toString cfg . packages } ; do
for j in $ i /* / u d e v / r u l e s . d / * ; d o
ln - s $ j $ out / $ ( basename $ j )
done
done
# Fix some paths in the standard udev rules. Hacky.
for i in $ out /* . r u l e s ; d o
substituteInPlace $ i \
- - replace /sbin/modprobe $ { modprobe } /sbin/modprobe \
- - replace /sbin/blkid $ { pkgs . utillinux } /sbin/blkid \
- - replace /sbin/mdadm $ { pkgs . mdadm } /sbin/madm
- - replace /sbin/mdadm $ { pkgs . mdadm } /sbin/madm \
- - replace ' $ env { DM_SBIN_PATH } /blkid ' $ { pkgs . utillinux } /sbin/blkid \
- - replace ' ENV { DM_SBIN_PATH } = " / s b i n " ' ' ENV { DM_SBIN_PATH } = " ${ pkgs . lvm2 } / s b i n " '
done
# If auto-configuration is disabled, then remove
@ -57,13 +66,6 @@ let
# automatically calling modprobe.
$ { if ! config . boot . hardwareScan then " r m $ o u t / 8 0 - d r i v e r s . r u l e s " else " " }
# Add the udev rules from other packages.
for i in $ { toString cfg . packages } ; do
for j in $ i /* / u d e v / r u l e s . d / * ; d o
ln - s $ j $ out / $ ( basename $ j )
done
done
# Use the persistent device rules (naming for CD/DVD and
# network devices) stored in
# /var/lib/udev/rules.d/70-persistent-{cd,net}.rules. These are
@ -186,8 +188,12 @@ in
''
# Let udev create device nodes for all modules that have already
# been loaded into the kernel (or for which support is built into
# the kernel).
# the kernel). The `STARTUP' variable is needed to force
# the LVM rules to create device nodes. See
# http://www.mail-archive.com/fedora-devel-list@redhat.com/msg10261.html
$ { udev } /sbin/udevadm control - - env = STARTUP = 1
$ { udev } /sbin/udevadm trigger
$ { udev } /sbin/udevadm control - - env = STARTUP =
$ { udev } /sbin/udevadm settle # wait for udev to finish
initctl emit - n new-devices