fixed the chroot commands
This commit is contained in:
parent
e7594e2556
commit
e2a1d5fa18
1 changed files with 4 additions and 4 deletions
|
@ -23,15 +23,15 @@ mount --bind /dev /mnt/dev
|
|||
mount --bind /proc /mnt/proc
|
||||
mount --bind /sys /mnt/sys
|
||||
|
||||
if command -v grub2-mkconfig &>/dev/null; then
|
||||
if chroot /mnt /bin/bash -c "command -v grub2-mkconfig &>/dev/null;" then
|
||||
chroot /mnt /bin/bash -c "grub2-mkconfig -o /boot/grub/grub.cfg"
|
||||
elif command -v grub-mkconfig &>/dev/null; then
|
||||
elif chroot /mnt /bin/bash -c "command -v grub-mkconfig &>/dev/null;" then
|
||||
chroot /mnt /bin/bash -c "grub-mkconfig -o /boot/grub/grub.cfg"
|
||||
fi
|
||||
|
||||
if command -v grub2-install &>/dev/null; then
|
||||
if chroot /mnt /bin/bash -c "command -v grub2-install &>/dev/null;" then
|
||||
chroot /mnt /bin/bash -c "grub2-install /dev/sda"
|
||||
elif command -v grub-install &>/dev/null; then
|
||||
elif chroot /mnt /bin/bash -c "command -v grub-install &>/dev/null;" then
|
||||
chroot /mnt /bin/bash -c "grub-install /dev/sda"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue