ln -sfn $(convert_abs_rel "${_target}" "${_realsrc}") "$initdir/$_target"
}
-udevdir=$(pkg-config udev --variable=udevdir 2>/dev/null)
-if ! [[ -d "$udevdir" ]]; then
- [[ -d /lib/udev ]] && udevdir=/lib/udev
- [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
-fi
-
# attempt to install any programs specified in a udev rule
inst_rule_programs() {
local _prog _bin
realinitpath="/usr/lib/systemd/systemd"
install_items+=" vi /etc/virc ps grep cat rm "
prefix="/"
+systemdutildir=/usr/lib/systemd
+systemdsystemunitdir=/usr/lib/systemd/system
+udevdir=/usr/lib/udev
done
done
+[[ -d $udevdir ]] \
+ || udevdir=$(pkg-config udev --variable=udevdir 2>/dev/null)
+if ! [[ -d "$udevdir" ]]; then
+ [[ -d /lib/udev ]] && udevdir=/lib/udev
+ [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
+fi
+
+[[ -d $systemdutildir ]] \
+ || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null)
+[[ -d $systemdsystemunitdir ]] \
+ || systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir 2>/dev/null)
+
+if ! [[ -d "$systemdutildir" ]]; then
+ [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd
+ [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd
+fi
+[[ -d "$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system
+
export initdir dracutbasedir dracutmodules drivers \
fw_dir drivers_dir debug no_kernel kernel_only \
add_drivers omit_drivers mdadmconf lvmconf filesystems \
use_fstab fstab_lines libdirs fscks nofscks \
stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \
debug host_fs_types host_devs sshkey add_fstab \
- DRACUT_VERSION
+ DRACUT_VERSION udevdir systemdutildir systemdsystemunitdir
# Create some directory structure first
[[ $prefix ]] && mkdir -m 0755 -p "${initdir}${prefix}"
install() {
local _i
- systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null)
- if ! [[ -d "$systemdutildir" ]]; then
- [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd
- [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd
- fi
-
- udevdir=$(pkg-config udev --variable=udevdir 2>/dev/null)
- if ! [[ -d "$udevdir" ]]; then
- [[ -d /lib/udev ]] && udevdir=/lib/udev
- [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
- fi
-
# 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
}
install() {
- local systemdutildir systemdsystemunitdir
-
- systemdutildir=$(pkg-config systemd --variable=systemdutildir)
- systemdsystemunitdir=$(pkg-config systemd --variable=systemdsystemunitdir)
-
- if ! [[ -d "$systemdutildir" ]]; then
- [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd
- [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd
- fi
- [[ -d "$systemdsystemunitdir" ]] || systemdsystemunitdir=${systemdutildir}/system
-
dracut_install -o "$i" \
$systemdutildir/systemd \
$systemdutildir/systemd-cgroups-agent \