diff options
Diffstat (limited to 'app-admin/grsecurity-scripts/files/grsecurity-sysctl')
-rwxr-xr-x | app-admin/grsecurity-scripts/files/grsecurity-sysctl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/app-admin/grsecurity-scripts/files/grsecurity-sysctl b/app-admin/grsecurity-scripts/files/grsecurity-sysctl new file mode 100755 index 0000000..56241e8 --- /dev/null +++ b/app-admin/grsecurity-scripts/files/grsecurity-sysctl @@ -0,0 +1,34 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ +# +# Created by Wolfram Schlich <wschlich@gentoo.org> +# Feedback is greatly appreciated! +# + +depend() { + after modules + before net.* +} + +checkconfig() { + if [[ ! -f /etc/grsec/sysctl.conf ]]; then + eerror + eerror "The grsecurity sysctl.conf file is missing!" + eerror " -> /etc/grsec/sysctl.conf" + eerror + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Configuring grsecurity kernel parameters" + sysctl -q -p /etc/grsec/sysctl.conf + eend $? +} + +stop() { + : NOP +} |