From 505b5566930cd679242bf888590ec0bda2fb326d Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Tue, 6 Sep 2016 14:41:29 +0800 Subject: buildlive: prompt before installing GRUB --- buildlive | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'buildlive') diff --git a/buildlive b/buildlive index 4d5d52c..1831577 100755 --- a/buildlive +++ b/buildlive @@ -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 -- cgit v1.2.3