This commit is contained in:
Valeria Fadeeva 2023-10-18 13:27:26 +05:00
parent 1890db4fd9
commit 2c03628332
1 changed files with 4 additions and 0 deletions

View File

@ -207,6 +207,10 @@ function gen_image() {
cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "/etc/kernel/cmdline")
elif [ -f "/boot/refind_linux.conf" ]; then
cmdline=$(cat "/boot/refind_linux.conf" | head -n 1 | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
elif [ -f "/efi/refind_linux.conf" ]; then
cmdline=$(cat "/efi/refind_linux.conf" | head -n 1 | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
elif [ -f "/boot/efi/refind_linux.conf" ]; then
cmdline=$(cat "/boot/efi/refind_linux.conf" | head -n 1 | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g')
else
cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' -e 's/initrd.*$//g' "/proc/cmdline")
fi