File boot.sysctl of Package procps

#! /bin/sh
#
# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany.  All rights reserved.
#
# /etc/init.d/boot.sysctl
#
### BEGIN INIT INFO
# Provides:          boot.sysctl
# Required-Start:    boot.proc $local_fs
# Should-Start:      setserial boot.isapnp
# Required-Stop:     boot.proc $local_fs
# Should-Stop:       $null
# Default-Start:     B
# Default-Stop:
# Description:       run sysctl with a given config file or create it
### END INIT INFO

test -x /sbin/sysctl || exit 0

. /etc/rc.status
. /etc/sysconfig/sysctl

rc_reset

case "$1" in
  start)
	#
	# run sysctl if the config file exists
	# otherwise generate it
	# the values set here might be overridden by the settings
	# in /etc/sysconfig/sysctl
	#
	if test ! -e /etc/sysctl.conf ; then
	    echo -n "Sysctl: no file /etc/sysctl.conf"
	    rc_failed 5
	else
	    echo -n "Setting current sysctl status from /etc/sysctl.conf"
	    sysctl -e -q -p /etc/sysctl.conf
	fi
	rc_status -v -r
	;;
    stop)
	# skip / do nothing
	;;
    status)
	rc_failed 4
	rc_status -v
	;;
    *)
	echo "Usage: $0 {start|stop|status}"
	exit 1
	;;
esac

rc_exit
openSUSE Build Service is sponsored by