2006-12-19 00:17:32 +01:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
2011-05-28 22:50:18 +02:00
|
|
|
# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany.
|
|
|
|
# Copyright (c) 2011 SUSE Linux Products GmbH Nuernberg, Germany.
|
2006-12-19 00:17:32 +01:00
|
|
|
#
|
|
|
|
# /etc/init.d/boot.sysctl
|
|
|
|
#
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: boot.sysctl
|
2011-05-28 22:50:18 +02:00
|
|
|
# Required-Start: $null
|
|
|
|
# Should-Start: $null
|
|
|
|
# Required-Stop: $null
|
2008-08-02 05:29:33 +02:00
|
|
|
# Should-Stop: $null
|
2006-12-19 00:17:32 +01:00
|
|
|
# Default-Start: B
|
|
|
|
# Default-Stop:
|
2011-05-28 22:50:18 +02:00
|
|
|
# Short-Description: Apply sysctl settings
|
|
|
|
# Description: Apply sysctl settings
|
2006-12-19 00:17:32 +01:00
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
. /etc/rc.status
|
|
|
|
|
|
|
|
rc_reset
|
|
|
|
|
|
|
|
case "$1" in
|
2012-10-30 14:13:12 +01:00
|
|
|
start)
|
2011-05-28 22:50:18 +02:00
|
|
|
echo -n "Applying sysctl settings"
|
|
|
|
/sbin/sysctl -e -q --system
|
2009-02-09 12:25:17 +01:00
|
|
|
rc_status -v -r
|
2012-10-30 14:13:12 +01:00
|
|
|
if test -s /etc/sysconfig/sysctl -a -x /lib/aaa_base/convert_sysctl ; then
|
2011-05-28 22:50:18 +02:00
|
|
|
echo -n " Warning: applying settings from obsolete /etc/sysconfig/sysctl"
|
|
|
|
/lib/aaa_base/convert_sysctl --stdout | sysctl -e -q -f -
|
|
|
|
rc_status -v -r
|
|
|
|
fi
|
2006-12-19 00:17:32 +01:00
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
# skip / do nothing
|
|
|
|
;;
|
|
|
|
status)
|
|
|
|
rc_failed 4
|
|
|
|
rc_status -v
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|status}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
rc_exit
|