ACC SHELL
Path : /usr/sbin/ |
|
Current File : //usr/sbin/grub-install |
#!/bin/sh
# Instead of the unsupported guessing method of the original grub-install
# script, use the grub installation scriptlet generated by yast.
if [ $# -gt 0 ]; then
echo 'WARNING! You are trying to invoke the unsupported grub-install script'
echo 'with a parameter. To really do this, call grub-install.unsupported.'
echo 'You should rather call "yast2 bootloader" or create configuration files'
echo 'appropriate for the intended target.'
exit 1
fi
# 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
ACC SHELL 2018