Use the new onl-onie-boot-mode tool.

This commit is contained in:
Jeffrey Townsend
2016-11-17 19:30:39 +00:00
parent d6d89cc3cb
commit 877fff69e0

View File

@@ -3,26 +3,13 @@ set -e
uninstall_x86_64()
{
#
# Set ONIE boot selection to uninstall
#
mkdir -p /mnt/onie-boot
mount -L ONIE-BOOT /mnt/onie-boot > /dev/null 2>&1
if [ "$1" = "factory" ]; then
/mnt/onie-boot/onie/tools/bin/onie-boot-mode -o uninstall
mode=uninstall
else
/mnt/onie-boot/onie/tools/bin/onie-boot-mode -o install
mode=install
fi
umount /mnt/onie-boot
#
# Select ONIE as the boot default
#
onl-mounts mount boot --rw
echo "set default=ONIE" >> /mnt/onl/boot/grub/grub.cfg
onl-mounts mount boot
onl-onie-boot-mode $mode
}
uninstall_uboot()