diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-11-11 16:26:58 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-11-11 16:26:58 +0100 |
commit | bc7aeab868bf4d94dde2ff5d6eb97daede5975b9 (patch) | |
tree | d8023c33c7509c0b43fc1379cbabaa08ad3855cc /setup-disk.in | |
parent | d2ef9b431cbc998efb6b39686e4c98a129f098a2 (diff) | |
download | alpine-conf-bc7aeab868bf4d94dde2ff5d6eb97daede5975b9.zip |
setup-disk: minor clean up of install to mounted root
Only give warning about MBR on x86 and x86_64 and when in legacy bios
mode. (syslinux or grub).
Make sure grub is installed if needed, by using select_bootloader_pkg.
Diffstat (limited to 'setup-disk.in')
-rw-r--r-- | setup-disk.in | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/setup-disk.in b/setup-disk.in index 11bb5be..d2d4417 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -1530,11 +1530,12 @@ esac if [ -d "$1" ]; then # install to given mounted root - [ "$BOOTLOADER" = "syslinux" ] && apk add --quiet syslinux - [ "$BOOTLOADER" = "u-boot" ] && apk add --quiet u-boot - install_mounted_root "${1%/}" \ - && echo "You might need fix the MBR to be able to boot" >&2 - exit $? + apk add --quiet $(select_bootloader_pkg) + install_mounted_root "${1%/}" || exit + if [ -z "$USE_EFI" ] && [ "$ARCH" = "x86_64" -o "$ARCH" = x86 ]; then + echo "You might need fix the MBR to be able to boot" >&2 + fi + exit 0 fi reset_var |