2 # Grub shell ExecShield wrapper
4 # Copyright (C) 2009 Dinko Korunic, CARNet, Grupa za izradu paketa
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by the
8 # Free Software Foundation; either version 2 of the License, or (at your
9 # option) any later version.
11 SHIELD=$(sysctl -e -n kernel.exec-shield)
14 if [ ! -z "$SHIELD" ]; then
15 sysctl -e -w kernel.exec-shield=0 >/dev/null 2>&1 || true
18 if [ -x "$0.real" ]; then
19 "$0.real" $@ || _retval=$?
22 if [ ! -z "$SHIELD" ]; then
23 sysctl -e -w "kernel.exec-shield=$SHIELD" >/dev/null 2>&1 || true