netplug / scripts / rc.netplugd

#!/bin/sh
#
# netplugd     This shell script takes care of starting and stopping
#              the network plug management daemon.
#
# chkconfig: 2345 11 89
# description: netplugd is a daemon for managing non-static network \
#              interfaces.
# processname: netplugd
# pidfile: /var/run/netplugd.pid

# Copyright 2003 Key Research, Inc.

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -x /sbin/netplugd ] || exit 0

if [ -f /etc/sysconfig/netplugd ]; then
    . /etc/sysconfig/netplugd
fi

# See how we were called.
case "$1" in
  start)
	# Start daemon.
	echo -n $"Starting network plug daemon: "
	daemon /sbin/netplugd ${NETPLUGDARGS} -p /var/run/netplugd.pid
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/netplugd
	;;
  stop)
	# Stop daemon.
	echo -n $"Shutting down network plug daemon: "
	killproc netplugd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/netplugd
	;;
  status)
	status netplugd
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart}"
	RETVAL=1
	;;
esac

exit $RETVAL
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.