-if [ -x /sbin/chpax ]; then
- if [ -x /usr/sbin/grub ]; then
- chpax -spmrx /usr/sbin/grub || true
+if uname -a | grep -q grsec; then
+ if [ -x /sbin/chpax ]; then
+ # grub
+ if [ -x /usr/sbin/grub.real ]; then
+ chpax -spmrx /usr/sbin/grub.real >/dev/null 2>&1 || true
+ elif [ -x /usr/sbin/grub ]; then
+ chpax -spmrx /usr/sbin/grub >/dev/null 2>&1 || true
+ fi
+
+ # grub-probe
+ if [ -x /usr/sbin/grub-probe.real ]; then
+ chpax -spmrx /usr/sbin/grub-probe.real >/dev/null 2>&1 || true
+ elif [ -x /usr/sbin/grub-probe ]; then
+ chpax -spmrx /usr/sbin/grub-probe >/dev/null 2>&1 || true
+ fi
+
+ echo -n " grsec"