2013-04-02 00:25:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# The grub post-kernel install hook will barf if the block device can't be
|
|
|
|
# found (as happens in a chroot).
|
|
|
|
# Temporarily remove grub, to avoid that confusion.
|
|
|
|
|
2014-09-04 04:56:29 +00:00
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2014-04-03 02:24:15 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
2013-04-02 00:25:25 +00:00
|
|
|
|
2013-11-18 23:12:27 +00:00
|
|
|
if dpkg-query -W grub-pc; then
|
2014-05-02 17:02:38 +00:00
|
|
|
apt-get -y remove grub-pc
|
2013-11-18 23:12:27 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if dpkg-query -W grub2-common; then
|
2014-05-02 17:02:38 +00:00
|
|
|
apt-get -y remove grub2-common
|
2013-11-18 23:12:27 +00:00
|
|
|
fi
|