network: don't use "ifup -m"
[dracut.git] / modules.d / 95udev-rules / module-setup.sh
blob141d29d070c365909cfcb3ce556b032dfd2519f7
1 #!/bin/bash
3 # called by dracut
4 install() {
5 local _i
7 # Fixme: would be nice if we didn't have to guess, which rules to grab....
8 # ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
9 # of the rules we want so that we just copy those in would be best
10 inst_multiple udevadm cat uname blkid
11 inst_dir /etc/udev
12 inst_multiple -o /etc/udev/udev.conf
14 [ -d ${initdir}/$systemdutildir ] || mkdir -p ${initdir}/$systemdutildir
15 for _i in ${systemdutildir}/systemd-udevd ${udevdir}/udevd /sbin/udevd; do
16 [ -x "$_i" ] || continue
17 inst "$_i"
19 if ! [[ -f ${initdir}${systemdutildir}/systemd-udevd ]]; then
20 ln -fs "$_i" ${initdir}${systemdutildir}/systemd-udevd
22 break
23 done
24 if ! [[ -e ${initdir}${systemdutildir}/systemd-udevd ]]; then
25 derror "Cannot find [systemd-]udevd binary!"
26 exit 1
29 inst_rules \
30 50-firmware.rules \
31 50-udev.rules \
32 50-udev-default.rules \
33 55-scsi-sg3_id.rules \
34 58-scsi-sg3_symlink.rules \
35 59-scsi-sg3_utils.rules \
36 60-block.rules \
37 60-pcmcia.rules \
38 60-persistent-storage.rules \
39 61-persistent-storage-edd.rules \
40 70-uaccess.rules \
41 71-seat.rules \
42 73-seat-late.rules \
43 75-net-description.rules \
44 80-drivers.rules 95-udev-late.rules \
45 80-net-name-slot.rules\
46 80-net-setup-link.rules \
47 95-late.rules \
48 "$moddir/59-persistent-storage.rules" \
49 "$moddir/61-persistent-storage.rules"
51 prepare_udev_rules 59-persistent-storage.rules 61-persistent-storage.rules
52 # debian udev rules
53 inst_rules 91-permissions.rules
54 # eudev rules
55 inst_rules 80-drivers-modprobe.rules
57 inst_multiple -o ${systemdutildir}/network/*.link
58 [[ $hostonly ]] && inst_multiple -H -o /etc/systemd/network/*.link
61 for i in cdrom tape dialout floppy; do
62 if ! egrep -q "^$i:" "$initdir/etc/group" 2>/dev/null; then
63 if ! egrep "^$i:" /etc/group 2>/dev/null; then
64 case $i in
65 cdrom) echo "$i:x:11:";;
66 dialout) echo "$i:x:18:";;
67 floppy) echo "$i:x:19:";;
68 tape) echo "$i:x:33:";;
69 esac
72 done
73 } >> "$initdir/etc/group"
75 inst_multiple -o \
76 ${udevdir}/ata_id \
77 ${udevdir}/cdrom_id \
78 ${udevdir}/create_floppy_devices \
79 ${udevdir}/edd_id \
80 ${udevdir}/firmware.sh \
81 ${udevdir}/firmware \
82 ${udevdir}/firmware.agent \
83 ${udevdir}/hotplug.functions \
84 ${udevdir}/fw_unit_symlinks.sh \
85 ${udevdir}/hid2hci \
86 ${udevdir}/path_id \
87 ${udevdir}/input_id \
88 ${udevdir}/scsi_id \
89 ${udevdir}/usb_id \
90 ${udevdir}/pcmcia-socket-startup \
91 ${udevdir}/pcmcia-check-broken-cis
93 inst_multiple -o /etc/pcmcia/config.opts
95 [ -f /etc/arch-release ] && \
96 inst_script "$moddir/load-modules.sh" /lib/udev/load-modules.sh
98 inst_libdir_file "libnss_files*"