mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Fix the efibootmgr override logic
Fully realize the chroot invocation of efibootmgr and also bail out if no new boot number is detected.
This commit is contained in:
parent
1cb5efae75
commit
3a911acb81
@ -64,11 +64,13 @@ echo "Match LocalPort 22" >> /etc/ssh/sshd_config
|
||||
echo " ChrootDirectory /target" >> /etc/ssh/sshd_config
|
||||
kill -HUP $(cat /run/sshd.pid)
|
||||
if [ -e /sys/firmware/efi ]; then
|
||||
bootnum=$(efibootmgr | grep ubuntu | sed -e 's/ .*//' -e 's/\*//' -e s/Boot//)
|
||||
currboot=$(efibootmgr | grep ^BootOrder: | awk '{print $2}')
|
||||
nextboot=$(echo $currboot| awk -F, '{print $1}')
|
||||
[ "$nextboot" = "$bootnum" ] || chroot /target efibootmgr -o $bootnum,$currboot
|
||||
chroot /target efibootmgr -D
|
||||
bootnum=$(chroot /target efibootmgr | grep ubuntu | sed -e 's/ .*//' -e 's/\*//' -e s/Boot//)
|
||||
if [ ! -z "$bootnum" ]; then
|
||||
currboot=$(chroot /target efibootmgr | grep ^BootOrder: | awk '{print $2}')
|
||||
nextboot=$(echo $currboot| awk -F, '{print $1}')
|
||||
[ "$nextboot" = "$bootnum" ] || chroot /target efibootmgr -o $bootnum,$currboot
|
||||
chroot /target efibootmgr -D
|
||||
fi
|
||||
fi
|
||||
cat /target/etc/confluent/tls/*.pem > /target/etc/confluent/ca.pem
|
||||
cat /target/etc/confluent/tls/*.pem > /etc/confluent/ca.pem
|
||||
|
Loading…
Reference in New Issue
Block a user