From 1d9dc068500ef767655688134acb89cfc3d458c5 Mon Sep 17 00:00:00 2001 From: Rui Lopes Date: Sat, 23 Mar 2024 14:05:37 +0000 Subject: [PATCH] tidy the fix uefi boot autoinstall late-command regex and make it case-insensitive --- autoinstall-cloud-init-data/user-data | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoinstall-cloud-init-data/user-data b/autoinstall-cloud-init-data/user-data index 3cea42a..a8dc212 100644 --- a/autoinstall-cloud-init-data/user-data +++ b/autoinstall-cloud-init-data/user-data @@ -22,7 +22,8 @@ write_files: # see https://bugs.launchpad.net/subiquity/+bug/1901397 if [ -d /sys/firmware/efi ]; then apt-get install -y efibootmgr - efibootmgr -o $(efibootmgr | perl -n -e '/Boot(.+)\* ubuntu/ && print $1') + ubuntu_boot_option="$(efibootmgr | perl -ne '/^Boot(\d+)\* Ubuntu/i && print $1')" + efibootmgr -o "$ubuntu_boot_option" fi permissions: '0755' snippets: