File grub-install of Package trustedgrub

#!/bin/sh

# Instead of the unsupported guessing method of the original grub-install
# script, use the grub installation scriptlet generated by yast.

# Sanity check
test -x /usr/sbin/grub && \
    grep -q quit /etc/grub.conf 2>/dev/null && \
    grub --batch < /etc/grub.conf && exit 0

# Sanity check failed -- call yast2
/sbin/yast2 bootloader

# Try again. This time it must succeed, otherwise return the error.
grub --batch < /etc/grub.conf