cat "$f" >> "${initdir}/etc/fstab"
done
- if [ -d ${initdir}/$systemdutildir ]; then
- mkdir -p ${initdir}/etc/conf.d
- {
- printf "%s\n" "systemdutildir=\"$systemdutildir\""
- printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\""
- printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\""
- } > ${initdir}/etc/conf.d/systemd.conf
+ if dracut_module_included "systemd"; then
+ if [ -d ${initdir}/$systemdutildir ]; then
+ mkdir -p ${initdir}/etc/conf.d
+ {
+ printf "%s\n" "systemdutildir=\"$systemdutildir\""
+ printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\""
+ printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\""
+ } > ${initdir}/etc/conf.d/systemd.conf
+ fi
fi
if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
- inst_multiple -o \
- $systemdutildir/system-generators/systemd-cryptsetup-generator \
- $systemdutildir/systemd-cryptsetup \
- $systemdsystemunitdir/systemd-ask-password-console.path \
- $systemdsystemunitdir/systemd-ask-password-console.service \
- $systemdsystemunitdir/cryptsetup.target \
- $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
- systemd-ask-password systemd-tty-ask-password-agent
- inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator
+ if dracut_module_included "systemd"; then
+ inst_multiple -o \
+ $systemdutildir/system-generators/systemd-cryptsetup-generator \
+ $systemdutildir/systemd-cryptsetup \
+ $systemdsystemunitdir/systemd-ask-password-console.path \
+ $systemdsystemunitdir/systemd-ask-password-console.service \
+ $systemdsystemunitdir/cryptsetup.target \
+ $systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
+ systemd-ask-password systemd-tty-ask-password-agent
+ inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator
+ fi
+
dracut_need_initqueue
}
# eudev rules
inst_rules 80-drivers-modprobe.rules
- inst_multiple -o ${systemdutildir}/network/*.link
- [[ $hostonly ]] && inst_multiple -H -o /etc/systemd/network/*.link
+ if dracut_module_included "systemd"; then
+ inst_multiple -o ${systemdutildir}/network/*.link
+ [[ $hostonly ]] && inst_multiple -H -o /etc/systemd/network/*.link
+ fi
{
for i in cdrom tape dialout floppy; do