VERSION="$(git describe | sed 's|^v||')"
else
VERSION="$(dpkg-query --show --showformat='${Version}' "$PN")"
VERSION="$(git describe | sed 's|^v||')"
else
VERSION="$(dpkg-query --show --showformat='${Version}' "$PN")"
einfo "Adjusting disk signature to a fixed (non-random) value"
MBRTMPFILE=$(mktemp)
dd if="${TARGET}" of="${MBRTMPFILE}" bs=512 count=1
einfo "Adjusting disk signature to a fixed (non-random) value"
MBRTMPFILE=$(mktemp)
dd if="${TARGET}" of="${MBRTMPFILE}" bs=512 count=1
# Has chroot-script installed GRUB to MBR using grub-install (successfully), already?
# chroot-script skips installation for unset ${GRUB}
# Has chroot-script installed GRUB to MBR using grub-install (successfully), already?
# chroot-script skips installation for unset ${GRUB}
einfo "Installing Grub as bootloader."
if ! chroot "${MNTPOINT}" dpkg --list grub-pc 2>/dev/null | grep -q '^ii' ; then
einfo "Installing Grub as bootloader."
if ! chroot "${MNTPOINT}" dpkg --list grub-pc 2>/dev/null | grep -q '^ii' ; then
ewarn "Please note that your system might NOT be able to properly boot."
else
einfo "Adjusting grub.cfg for successful boot sequence."
ewarn "Please note that your system might NOT be able to properly boot."
else
einfo "Adjusting grub.cfg for successful boot sequence."