Skip to content

Commit d423036

Browse files
committed
Imporve support for old boot arguments
Signed-off-by: David Cassany <dcassany@suse.com>
1 parent cfcae7c commit d423036

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • pkg/features/embedded/elemental-sysroot/usr/lib/dracut/modules.d/20elemental-sysroot

pkg/features/embedded/elemental-sysroot/usr/lib/dracut/modules.d/20elemental-sysroot/sysroot-generator.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ if getargbool 0 elemental.disable; then
1010
fi
1111

1212
# Omit any immutable rootfs module logic if no image path provided
13-
elemental_image=$(getarg elemental.image=)
14-
[ -z "${elemental_image}" ] && exit 0
13+
cos_img=$(getarg cos-img/filename=)
14+
elemental_img=$(getarg elemental.image=)
15+
[ -z "${cos_img}" && -z "${elemental_img}" ] && exit 0
16+
[ -z "${cos_img}" ] && cos_img="/cOS/${elemental_img}.img"
1517

1618
[ -z "${root}" ] && root=$(getarg root=)
1719

18-
img=/cOS/${elemental_image}.img
19-
2020
root_perm="ro"
2121

2222
GENERATOR_DIR="$2"
@@ -71,7 +71,7 @@ mkdir -p "$GENERATOR_DIR/$dev.device.d"
7171
echo "RequiresMountsFor=${root_part_mnt}"
7272
echo "[Mount]"
7373
echo "Where=/sysroot"
74-
echo "What=${root_part_mnt}/${img#/}"
74+
echo "What=${root_part_mnt}/${cos_img#/}"
7575
echo "Options=${root_perm},suid,dev,exec,auto,nouser,async"
7676
} > "$GENERATOR_DIR"/sysroot.mount
7777

0 commit comments

Comments
 (0)