From b0fb1a7856d46738b2bad5a0c117f58ec29237ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Mon, 16 Oct 2023 20:55:31 +0200 Subject: [PATCH 1/2] Allow test-image-disk-ramdisk to be build locally --- .../x86/tumbleweed/test-image-disk-ramdisk/appliance.kiwi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-tests/x86/tumbleweed/test-image-disk-ramdisk/appliance.kiwi b/build-tests/x86/tumbleweed/test-image-disk-ramdisk/appliance.kiwi index 2fe04e94b69..39848080763 100644 --- a/build-tests/x86/tumbleweed/test-image-disk-ramdisk/appliance.kiwi +++ b/build-tests/x86/tumbleweed/test-image-disk-ramdisk/appliance.kiwi @@ -73,5 +73,8 @@ + + + From 91189f990d146af4201df36cb2b14c3215a847f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Mon, 16 Oct 2023 20:55:59 +0200 Subject: [PATCH 2/2] Fixed argument processing of config.bootoptions Instead of adding an extra space to make the subsequent reading to work, use an awk script that does it without nasty workarounds --- .../90kiwi-dump/kiwi-ramdisk-deployment-generator.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dracut/modules.d/90kiwi-dump/kiwi-ramdisk-deployment-generator.sh b/dracut/modules.d/90kiwi-dump/kiwi-ramdisk-deployment-generator.sh index d0eadcc60e5..bd2965a2936 100755 --- a/dracut/modules.d/90kiwi-dump/kiwi-ramdisk-deployment-generator.sh +++ b/dracut/modules.d/90kiwi-dump/kiwi-ramdisk-deployment-generator.sh @@ -26,16 +26,12 @@ GENERATOR_DIR="$1" [ -e /config.bootoptions ] || exit 1 -# Add a space to /config.bootoptions to make sure the -# following token based read captures all entries -echo -n ' ' >> /config.bootoptions - root_uuid=$( - while read -r -d ' ' opt; do echo "${opt}";done < /config.bootoptions |\ + awk '{ for(i=1; i <= NF; i++) {print $i } }' /config.bootoptions |\ grep root= | cut -f2- -d= ) -[ -z "${root_uuid}" ] && exit 1 +[ -z "${root_uuid}" ] && exit 2 { echo "[Unit]"