diff options
Diffstat (limited to 'dracut')
-rwxr-xr-x | dracut/generate-initramfs | 26 | ||||
-rwxr-xr-x | dracut/systemv/module-setup.sh | 37 | ||||
-rwxr-xr-x | dracut/systemv/prepare-root.sh | 1 |
3 files changed, 9 insertions, 55 deletions
diff --git a/dracut/generate-initramfs b/dracut/generate-initramfs index 2e46f21..4471611 100755 --- a/dracut/generate-initramfs +++ b/dracut/generate-initramfs @@ -68,11 +68,10 @@ generate_initramfs() { MODULE_PATH=/usr/lib/dracut/modules.d/ - substring="No such file or directory" - output=$("${ADB}" shell ls /lib/systemd/systemd) - systemd=false - if [[ $output != *${substring}* ]] ; then - systemd=true + init_system=$(basename $("${ADB}" shell readlink -f /sbin/init) | tr -d '\r') + if [ "$init_system" != "systemd" ] ; then + echo "error: Failed to detected systemd init support on the image" + exit 1 fi options='/boot/initramfs.img @@ -82,18 +81,11 @@ generate_initramfs() --stdlog 3 --force' - if [ ${systemd} = true ] ; then - # OSTree ships with a dracut module for systemd based images. - echo "Generating initramfs for systemd based image ..." - "${ADB}" push "${ROOT}"/systemd/01-qt.conf /etc/dracut.conf.d/ - "${ADB}" push "${ROOT}"/systemd/e2fsck.conf /etc/ - custom_options="--add systemd --install /etc/e2fsck.conf" - else - # Deploy our custom dracut module for systemd-less images. - echo "WARNING: Failed to detect systemd init support. Using System V as a fallback init system ..." - "${ADB}" push "${ROOT}"/systemv/ "${MODULE_PATH}"/98ostree/ - custom_options="--omit systemd" - fi + # OSTree ships with a dracut module for systemd based images. + echo "Generating initramfs for systemd based image ..." + "${ADB}" push "${ROOT}"/systemd/01-qt.conf /etc/dracut.conf.d/ + "${ADB}" push "${ROOT}"/systemd/e2fsck.conf /etc/ + custom_options="--add systemd --install /etc/e2fsck.conf" # Recovery module parts #"${ADB}" push "${ROOT}"/recovery/ "${MODULE_PATH}"/98recovery/ diff --git a/dracut/systemv/module-setup.sh b/dracut/systemv/module-setup.sh deleted file mode 100755 index def4f70..0000000 --- a/dracut/systemv/module-setup.sh +++ /dev/null @@ -1,37 +0,0 @@ -############################################################################# -## -## Copyright (C) 2015 Digia Plc and/or its subsidiary(-ies). -## -## This file is part of the Qt Enterprise Embedded Scripts of the Qt -## framework. -## -## $QT_BEGIN_LICENSE$ -## Commercial License Usage Only -## Licensees holding valid commercial Qt license agreements with Digia -## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, -## may use this file in accordance with the terms contained in said license -## agreement. -## -## For further information use the contact form at -## http://www.qt.io/contact-us. -## -## -## $QT_END_LICENSE$ -## -############################################################################# -check() { - if [ -x /usr/sbin/ostree-prepare-root ]; then - return 255 - fi - - return 1 -} - -depends() { - return 0 -} - -install() { - inst_hook cleanup 20 "$moddir/prepare-root.sh" - inst_multiple ostree-prepare-root -} diff --git a/dracut/systemv/prepare-root.sh b/dracut/systemv/prepare-root.sh deleted file mode 100755 index a9b4b42..0000000 --- a/dracut/systemv/prepare-root.sh +++ /dev/null @@ -1 +0,0 @@ -/usr/sbin/ostree-prepare-root /sysroot |