/usr/sbin/update-grub >/dev/null 2>&1 || true
fi
+# install grub loader
+SHIELD=$(sysctl -e -n kernel.exec-shield)
+if [ ! -z "$SHIELD" ]; then
+ sysctl -w -e kernel.exec-shield=0 >/dev/null 2>&1
+fi
if ! grub-install --no-floppy '(hd0)' >/dev/null 2>&1; then
echo "."
echo "CN: FATAL ERROR running grub-install!"
echo "CN: Do not reboot your server and report this to OTRS immediately!"
exit 1
fi
-echo -n " grub"
+if [ ! -z "$SHIELD" ]; then
+ sysctl -w -e "kernel.exec-shield=$SHIELD" >/dev/null 2>&1
+fi
# disable lilo
if [ -e /etc/lilo.conf ]; then