Update
This commit is contained in:
parent
2c03628332
commit
6d2df689d9
|
@ -71,7 +71,7 @@ EOF
|
|||
echo "Check Secure Boot keys"
|
||||
declare -a keys=("/etc/kernel/secure-boot.key.pem" "/etc/kernel/secure-boot.cert.pem" "/etc/kernel/pcr-initrd.key.pem" "/etc/kernel/pcr-initrd.pub.pem" "/etc/kernel/pcr-system.key.pem" "/etc/kernel/pcr-system.pub.pem")
|
||||
|
||||
for i in ${keys[@]}
|
||||
for i in "${keys[@]}"
|
||||
do
|
||||
if [ -f "${i}" ]
|
||||
then
|
||||
|
@ -80,9 +80,9 @@ EOF
|
|||
fi
|
||||
done
|
||||
|
||||
if [[ $keys_count < 6 ]]
|
||||
if [[ $keys_count -lt 6 ]]
|
||||
then
|
||||
for i in ${keys[@]}
|
||||
for i in "${keys[@]}"
|
||||
do
|
||||
if [ -f "${i}" ]
|
||||
then
|
||||
|
@ -142,12 +142,12 @@ while getopts ":hag:xyz" arg; do
|
|||
efi_image_fallback="$BOOT_PATH/$kernel_name-fallback.efi"
|
||||
|
||||
declare -a images=()
|
||||
images+=($efi_image)
|
||||
images+=($efi_image_fallback)
|
||||
images+=("$efi_image")
|
||||
images+=("$efi_image_fallback")
|
||||
|
||||
for image in "${images[@]}";
|
||||
do
|
||||
if [ -f ]; then
|
||||
if [ -f "$image" ]; then
|
||||
echo "==> Removing $image..."
|
||||
rm -f $image
|
||||
fi
|
||||
|
@ -205,12 +205,16 @@ function gen_image() {
|
|||
|
||||
if [ -f "/etc/kernel/cmdline" ]; then
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue