aboutsummaryrefslogtreecommitdiff
path: root/init.d/sysctl.GNU.in
diff options
context:
space:
mode:
authorSvante Signell <svante.signell@gmail.com>2014-10-22 14:25:00 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2014-10-23 13:00:24 -0500
commit203b754f843fe6af0a40e983d557a9cdbc89f84b (patch)
treebc2cfdb441feb21382143baf22d49d1e8850e92a /init.d/sysctl.GNU.in
parent89c8a62a1078e770e12c47f06c8dbc9c2924e771 (diff)
add missing files for GNU/Hurd
Diffstat (limited to 'init.d/sysctl.GNU.in')
-rw-r--r--init.d/sysctl.GNU.in32
1 files changed, 32 insertions, 0 deletions
diff --git a/init.d/sysctl.GNU.in b/init.d/sysctl.GNU.in
new file mode 100644
index 00000000..71398246
--- /dev/null
+++ b/init.d/sysctl.GNU.in
@@ -0,0 +1,32 @@
+#!@PREFIX@/sbin/runscript
+# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
+# Released under the 2-clause BSD license.
+#FIXME: Modify for GNU/Hurd
+
+depend()
+{
+ before bootmisc logger
+ keyword -prefix
+}
+
+start()
+{
+ [ -e /etc/sysctl.conf ] || return 0
+ local retval=0 var= comments= conf=
+ ebegin "Configuring kernel parameters"
+ eindent
+ for conf in @SYSCONFDIR@/sysctl.conf @SYSCONFDIR@/sysctl.d/*.conf; do
+ if [ -r "$conf" ]; then
+ vebegin "applying $conf"
+ while read var comments; do
+ case "$var" in
+ ""|"#"*) continue;;
+ esac
+ sysctl -w "$var" >/dev/null || retval=1
+ done < "$conf"
+ veend $retval
+ fi
+ done
+ eoutdent
+ eend $retval "Some errors were encountered"
+}