diff --git a/0589-Fix-displaying-text-on-emergency-consoles.patch b/0589-Fix-displaying-text-on-emergency-consoles.patch new file mode 100644 index 0000000..c2c2abc --- /dev/null +++ b/0589-Fix-displaying-text-on-emergency-consoles.patch @@ -0,0 +1,26 @@ +From 71ac8784994c2703ec4313821b3a314326255b65 Mon Sep 17 00:00:00 2001 +From: Daniel Molkentin +Date: Mon, 4 Feb 2019 14:43:04 +0100 +Subject: [PATCH] Fix displaying text on emergency consoles + +Reference: boo#1124088 +--- + modules.d/98dracut-systemd/dracut-emergency.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/98dracut-systemd/dracut-emergency.sh b/modules.d/98dracut-systemd/dracut-emergency.sh +index 1a11220b..b9156d2f 100755 +--- a/modules.d/98dracut-systemd/dracut-emergency.sh ++++ b/modules.d/98dracut-systemd/dracut-emergency.sh +@@ -31,7 +31,7 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then + echo + [ -f "$FSTXT" ] && cat "$FSTXT" + ) > /dev/$_tty +- done < /dev/consoles ++ done < /dev/console + [ -f /etc/profile ] && . /etc/profile + [ -z "$PS1" ] && export PS1="$_name:\${PWD}# " + exec sulogin -e +-- +2.16.4 + diff --git a/0590-00systemd-check-if-systemd-version-is-a-number.patch b/0590-00systemd-check-if-systemd-version-is-a-number.patch new file mode 100644 index 0000000..7d1b4f1 --- /dev/null +++ b/0590-00systemd-check-if-systemd-version-is-a-number.patch @@ -0,0 +1,37 @@ +From 53cb081b4c3afa843022d8e6156bdbd4808db4a2 Mon Sep 17 00:00:00 2001 +From: Frantisek Sumsal +Date: Fri, 4 Jan 2019 16:51:15 +0100 +Subject: [PATCH] 00systemd: check if systemd version is a number + +The recent systemd upstream introduced a slightly modified version +string which included information about a git commit, which however +broke the version check in dracut. Unfortunately, the (( )) bash syntax +went along with it in certain cases and introduced a pretty nasty issue, +when the systemd would boot up but with slightly changed environment. + +To prevent this from happening in the future, let's at least check if +the version parsed from the `systemd --version` output is a comparable +number. +--- + modules.d/00systemd/module-setup.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh +index 1ed4b34f..3583062b 100755 +--- a/modules.d/00systemd/module-setup.sh ++++ b/modules.d/00systemd/module-setup.sh +@@ -5,6 +5,11 @@ check() { + [[ $mount_needs ]] && return 1 + if require_binaries $systemdutildir/systemd; then + SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; }) ++ # Check if the systemd version is a valid number ++ if ! [[ $SYSTEMD_VERSION =~ ^[0-9]+$ ]]; then ++ dfatal "systemd version is not a number ($SYSTEMD_VERSION)" ++ exit 1 ++ fi + (( $SYSTEMD_VERSION >= 198 )) && return 0 + return 255 + fi +-- +2.16.4 + diff --git a/dracut.changes b/dracut.changes index 4fa83e2..9560dcf 100644 --- a/dracut.changes +++ b/dracut.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Feb 4 16:12:16 UTC 2019 - Daniel Molkentin + +- Fix displaying text on emergency consoles (boo#1124088) + - adds 0589-Fix-displaying-text-on-emergency-consoles.patch + +- Fix systemd version check, will be required for systemd v241 + - 0590-00systemd-check-if-systemd-version-is-a-number.patch + ------------------------------------------------------------------- Fri Jan 25 16:03:09 UTC 2019 - Daniel Molkentin diff --git a/dracut.spec b/dracut.spec index fd177d5..11daa84 100644 --- a/dracut.spec +++ b/dracut.spec @@ -421,6 +421,8 @@ Patch586: 0586-95zfcp_rules-parse-zfcp.sh-remove-rule-existence-check.patc Patch587: 0587-Fix-a-missing-space-in-example-configs.patch # Fix for 0562-Adjust-driver-list-to-modern-kernels.patch Patch588: 0588-Ensure-mmc-host-modules-get-included-properly.patch +Patch589: 0589-Fix-displaying-text-on-emergency-consoles.patch +Patch590: 0590-00systemd-check-if-systemd-version-is-a-number.patch BuildRequires: asciidoc BuildRequires: bash @@ -727,6 +729,8 @@ chmod a+x modules.d/95qeth_rules/module-setup.sh %patch586 -p1 %patch587 -p1 %patch588 -p1 +%patch589 -p1 +%patch590 -p1 %build %configure\