diff options
author | Iru Cai <mytbk920423@gmail.com> | 2016-09-06 14:41:29 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2016-09-06 14:41:29 +0800 |
commit | 505b5566930cd679242bf888590ec0bda2fb326d (patch) | |
tree | 6be93718f73bf16a578b5c488ddde9615fdf7e68 /buildlive | |
parent | 46beeb65d563d6b12383429368fa1408d468217d (diff) | |
download | liveusb-builder-505b5566930cd679242bf888590ec0bda2fb326d.tar.xz |
buildlive: prompt before installing GRUB
Diffstat (limited to 'buildlive')
-rwxr-xr-x | buildlive | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -111,6 +111,9 @@ do done if [ "$INSTALL_GRUB" == 1 ]; then - as-root grub-install --boot-directory="$ROOTPATH" --target=i386-pc "$DEVNAME" - as-root grub-install --boot-directory="$ROOTPATH" --efi-directory="$ROOTPATH" --bootloader-id=grub --target=x86_64-efi --removable --no-nvram "$DEVNAME" + read -p 'Answer Y to install GRUB.[Y/n] ' + if [[ "$REPLY" =~ ^[Yy]|^$ ]]; then + as-root grub-install --boot-directory="$ROOTPATH" --target=i386-pc "$DEVNAME" + as-root grub-install --boot-directory="$ROOTPATH" --efi-directory="$ROOTPATH" --bootloader-id=grub --target=x86_64-efi --removable --no-nvram "$DEVNAME" + fi fi |