mkimage-profiles/features.in/bootloader/rootfs/image-scripts.d/50-bootargs
Mikhail Gordeev fa19e83e90 Add BASE_BOOTARGS -- variable containing arguments to bootloader
The case at hand was the need to pass serial console parameters,
see the next commit.
2020-01-13 12:09:30 +03:00

10 lines
249 B
Bash
Executable File

#!/bin/sh -eu
if [ -n "${GLOBAL_BASE_BOOTARGS-}" ]; then
if [ -s /etc/sysconfig/grub2 ]; then
sed -Ei \
"s/(GRUB_CMDLINE_LINUX_DEFAULT=)(.*)(['\"])/\1\2 $GLOBAL_BASE_BOOTARGS\3/" \
/etc/sysconfig/grub2
fi
fi