#!/bin/bash

### BEGIN INIT INFO
# Provides:          grsec-lock
# Required-Start:    $all
# Required-Stop:     
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Lock grsecurity
# Description:       Lock grsecurity modifications and kernel module loading
#		     at the very end of the boot process
### END INIT INFO

case $1 in
    start)
	#disable module loading
	sysctl -w kernel.modules_disabled=1

	#end
	#lock grsecurity
	#sysctl -w kernel.grsecurity.grsec_lock=1

	#system secured
    ;;

    *)
	echo "grsec-lock: nothing to do"
    ;;
esac

