summaryrefslogtreecommitdiff
path: root/modules.d/95udev-rules
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-06-27 09:32:22 +0200
committerHarald Hoyer <harald@redhat.com>2012-06-29 12:41:27 +0200
commit53fe81e752c59bf526237ea2a1a3e7879d479c9b (patch)
treec0ac7959467b32c0e66bc13cb14060a2680962ca /modules.d/95udev-rules
parente716c0f121d876b381f9cd9841267959732f975d (diff)
downloaddracut-53fe81e752c59bf526237ea2a1a3e7879d479c9b.tar.gz
dracut-53fe81e752c59bf526237ea2a1a3e7879d479c9b.tar.bz2
dracut-53fe81e752c59bf526237ea2a1a3e7879d479c9b.zip
modules.d/*/module-setup.sh: combine and specify type for installs
To speedup image creation, combine dracut_install calls and specify the exact type. E.g. inst_script instead of the generic inst.
Diffstat (limited to 'modules.d/95udev-rules')
-rwxr-xr-xmodules.d/95udev-rules/module-setup.sh66
1 files changed, 26 insertions, 40 deletions
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
index f98de576..90d43369 100755
--- a/modules.d/95udev-rules/module-setup.sh
+++ b/modules.d/95udev-rules/module-setup.sh
@@ -8,7 +8,9 @@ install() {
# Fixme: would be nice if we didn't have to know which rules to grab....
# ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
# of the rules we want so that we just copy those in would be best
- dracut_install udevadm
+ dracut_install udevadm cat uname basename blkid \
+ /etc/udev/udev.conf /etc/group
+
[ -d ${initdir}/lib/systemd ] || mkdir -p ${initdir}/lib/systemd
for _i in ${systemdutildir}/systemd-udevd ${udevdir}/udevd /sbin/udevd; do
[ -x "$_i" ] || continue
@@ -20,53 +22,37 @@ install() {
break
done
- for i in /etc/udev/udev.conf /etc/group; do
- inst_simple $i
- done
-
- dracut_install basename
-
inst_rules 50-udev-default.rules 60-persistent-storage.rules \
61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \
- 60-pcmcia.rules
- #Some debian udev rules are named differently
- inst_rules 50-udev.rules 95-late.rules
-
- # for firmware loading
- inst_rules 50-firmware.rules
- dracut_install cat uname
-
+ 60-pcmcia.rules \
+ 50-udev.rules 95-late.rules \
+ 50-firmware.rules \
+ "$moddir/59-persistent-storage.rules" \
+ "$moddir/61-persistent-storage.rules"
inst_dir /run/udev
inst_dir /run/udev/rules.d
- dracut_install blkid
- inst_rules "$moddir/59-persistent-storage.rules"
- inst_rules "$moddir/61-persistent-storage.rules"
-
- for _i in \
- ata_id \
- cdrom_id \
- create_floppy_devices \
- edd_id \
- firmware.sh \
- firmware \
- firmware.agent \
- hotplug.functions \
- fw_unit_symlinks.sh \
- hid2hci \
- path_id \
- input_id \
- scsi_id \
- usb_id \
- pcmcia-socket-startup \
- pcmcia-check-broken-cis \
- ; do
- [ -e ${udevdir}/$_i ] && dracut_install ${udevdir}/$_i
- done
+ dracut_install -o \
+ ${udevdir}/ata_id \
+ ${udevdir}/cdrom_id \
+ ${udevdir}/create_floppy_devices \
+ ${udevdir}/edd_id \
+ ${udevdir}/firmware.sh \
+ ${udevdir}/firmware \
+ ${udevdir}/firmware.agent \
+ ${udevdir}/hotplug.functions \
+ ${udevdir}/fw_unit_symlinks.sh \
+ ${udevdir}/hid2hci \
+ ${udevdir}/path_id \
+ ${udevdir}/input_id \
+ ${udevdir}/scsi_id \
+ ${udevdir}/usb_id \
+ ${udevdir}/pcmcia-socket-startup \
+ ${udevdir}/pcmcia-check-broken-cis
[ -f /etc/arch-release ] && \
- inst "$moddir/load-modules.sh" /lib/udev/load-modules.sh
+ inst_script "$moddir/load-modules.sh" /lib/udev/load-modules.sh
inst_libdir_file "libnss_files*"
}