Check for systemd before installing systemd specific files
https://bugzilla.redhat.com/show_bug.cgi?id=1282010master
parent
63a44c8dc3
commit
2da041d672
16
dracut.sh
16
dracut.sh
|
@ -1481,13 +1481,15 @@ if [[ $kernel_only != yes ]]; then
|
||||||
cat "$f" >> "${initdir}/etc/fstab"
|
cat "$f" >> "${initdir}/etc/fstab"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -d ${initdir}/$systemdutildir ]; then
|
if dracut_module_included "systemd"; then
|
||||||
mkdir -p ${initdir}/etc/conf.d
|
if [ -d ${initdir}/$systemdutildir ]; then
|
||||||
{
|
mkdir -p ${initdir}/etc/conf.d
|
||||||
printf "%s\n" "systemdutildir=\"$systemdutildir\""
|
{
|
||||||
printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\""
|
printf "%s\n" "systemdutildir=\"$systemdutildir\""
|
||||||
printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\""
|
printf "%s\n" "systemdsystemunitdir=\"$systemdsystemunitdir\""
|
||||||
} > ${initdir}/etc/conf.d/systemd.conf
|
printf "%s\n" "systemdsystemconfdir=\"$systemdsystemconfdir\""
|
||||||
|
} > ${initdir}/etc/conf.d/systemd.conf
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
|
if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
|
||||||
|
|
|
@ -86,14 +86,17 @@ install() {
|
||||||
|
|
||||||
inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
|
inst_simple "$moddir/crypt-lib.sh" "/lib/dracut-crypt-lib.sh"
|
||||||
|
|
||||||
inst_multiple -o \
|
if dracut_module_included "systemd"; then
|
||||||
$systemdutildir/system-generators/systemd-cryptsetup-generator \
|
inst_multiple -o \
|
||||||
$systemdutildir/systemd-cryptsetup \
|
$systemdutildir/system-generators/systemd-cryptsetup-generator \
|
||||||
$systemdsystemunitdir/systemd-ask-password-console.path \
|
$systemdutildir/systemd-cryptsetup \
|
||||||
$systemdsystemunitdir/systemd-ask-password-console.service \
|
$systemdsystemunitdir/systemd-ask-password-console.path \
|
||||||
$systemdsystemunitdir/cryptsetup.target \
|
$systemdsystemunitdir/systemd-ask-password-console.service \
|
||||||
$systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
|
$systemdsystemunitdir/cryptsetup.target \
|
||||||
systemd-ask-password systemd-tty-ask-password-agent
|
$systemdsystemunitdir/sysinit.target.wants/cryptsetup.target \
|
||||||
inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator
|
systemd-ask-password systemd-tty-ask-password-agent
|
||||||
|
inst_script "$moddir"/crypt-run-generator.sh /sbin/crypt-run-generator
|
||||||
|
fi
|
||||||
|
|
||||||
dracut_need_initqueue
|
dracut_need_initqueue
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,8 +56,10 @@ install() {
|
||||||
# eudev rules
|
# eudev rules
|
||||||
inst_rules 80-drivers-modprobe.rules
|
inst_rules 80-drivers-modprobe.rules
|
||||||
|
|
||||||
inst_multiple -o ${systemdutildir}/network/*.link
|
if dracut_module_included "systemd"; then
|
||||||
[[ $hostonly ]] && inst_multiple -H -o /etc/systemd/network/*.link
|
inst_multiple -o ${systemdutildir}/network/*.link
|
||||||
|
[[ $hostonly ]] && inst_multiple -H -o /etc/systemd/network/*.link
|
||||||
|
fi
|
||||||
|
|
||||||
{
|
{
|
||||||
for i in cdrom tape dialout floppy; do
|
for i in cdrom tape dialout floppy; do
|
||||||
|
|
Loading…
Reference in New Issue