[ALL] Small fixes to the update mechnism
This commit is contained in:
parent
4280abe4d6
commit
5c43befc3e
|
@ -18,10 +18,14 @@ file_env -f ($root)/cmdline.txt cmdline
|
|||
regexp --set 1:boothd (.+),.+ ${root}
|
||||
|
||||
menuentry "OpenVoiceOS - Slot A" {
|
||||
set default="0"
|
||||
set fallback="1"
|
||||
linux (${boothd},gpt2)/boot/kernel root=PARTUUID=c0932a41-44cf-463b-8152-d43188553ed4 ro $default_cmdline $cmdline
|
||||
}
|
||||
|
||||
menuentry "OpenVoiceOS - Slot B" {
|
||||
set default="1"
|
||||
set fallback="0"
|
||||
linux (${boothd},gpt3)/boot/kernel root=PARTUUID=3adea996-45ad-4928-920e-ffb5aedd00cb ro $default_cmdline $cmdline
|
||||
}
|
||||
|
||||
|
|
|
@ -18,10 +18,14 @@ file_env -f ($root)/cmdline.txt cmdline
|
|||
regexp --set 1:boothd (.+),.+ ${root}
|
||||
|
||||
menuentry "OpenVoiceOS - Slot A" {
|
||||
set default="0"
|
||||
set fallback="1"
|
||||
linux (${boothd},gpt2)/boot/kernel root=PARTUUID=c0932a41-44cf-463b-8152-d43188553ed4 ro $default_cmdline $cmdline
|
||||
}
|
||||
|
||||
menuentry "OpenVoiceOS - Slot B" {
|
||||
set default="1"
|
||||
set fallback="0"
|
||||
linux (${boothd},gpt3)/boot/kernel root=PARTUUID=3adea996-45ad-4928-920e-ffb5aedd00cb ro $default_cmdline $cmdline
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@ fi
|
|||
|
||||
function get_current_root_device
|
||||
{
|
||||
PARTUUID=$(swupdate -g | sed 's/PARTUUID=\([^ ]*\).*/\1/');
|
||||
CURRENT_ROOT=$(readlink -f /dev/disk/by-partuuid/$PARTUUID);
|
||||
CURRENT_ROOT=$(swupdate -g);
|
||||
}
|
||||
|
||||
function get_update_part
|
||||
|
@ -39,11 +38,7 @@ if [ $1 == "preinst" ]; then
|
|||
|
||||
# create a symlink for the update process
|
||||
ln -sf $UPDATE_ROOT /dev/update
|
||||
fi
|
||||
|
||||
if [ $1 == "postinst" ]; then
|
||||
get_current_root_device
|
||||
get_update_part
|
||||
sync; /usr/bin/grub-editenv /boot/efi/EFI/BOOT/grubenv set default=$GRUB_DEFAULT; sync;
|
||||
sync; /usr/bin/grub-editenv /boot/efi/EFI/BOOT/grubenv set fallback=$GRUB_FALLBACK; sync;
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue