livecd-rootfs/live-build/ubuntu-core/hooks/01-divert-grub-install.chro...

20 lines
414 B

#!/bin/sh -ex
ARCH=$(dpkg --print-architecture)
case $ARCH in
i386|amd64)
dpkg-divert --quiet --add \
--divert /usr/sbin/grub-install.REAL --rename \
/usr/sbin/grub-install
cat > /usr/sbin/grub-install <<'EOF'
#! /bin/sh
echo "grub-install: diverted by livecd-rootfs (will be called later)" >&2
exit 0
EOF
chmod +x /usr/sbin/grub-install
;;
esac