livecd-rootfs/live-build/ubuntu-core/hooks/01-divert-grub-install.chroot_early
Oliver Grawert 8c606962fa Import patches-unapplied version 2.348 to ubuntu/wily-proposed
Imported using git-ubuntu import.

Changelog parent: 0682fffca187ed3d1686d3802e50785b54eee3fc

New changelog entries:
  * limit grub-install diversion on snappy images to x86 architectures
  * divert grub-install on snappy images during rootfs build
2015-10-09 12:48:49 +00:00

20 lines
414 B
Bash
Executable File

#!/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