#!/bin/sh
# The following two lines enable chkconfig(1) to manipulate this script
# chkconfig: 345 87 13
# description: Boa is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
# processname: boa
# config: /etc/boa/boa.conf
#  There is no pid file

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

# See how we were called.
case "$1" in
  start)
	for file in /etc/sysconfig/netconfig/*.conf; do
	    dev=`echo $file | cut -f1 -d'.' | sed 's/\/etc\/sysconfig\/netconfig\///'`
	    ifconfig $dev 2>/dev/null >/dev/null && action "Starting network $dev:" ifup $dev
	done
	;;
  stop)
	for file in /etc/sysconfig/netconfig/*.conf; do
	    dev=`echo $file | cut -f1 -d'.' | sed 's/\/etc\/sysconfig\/netconfig\///'`
	    ifconfig $dev 2>/dev/null >/dev/null && action "Shutting down network $dev:" ifdown $dev
	done
	;;
  restart)
	$0 stop
	$0 start
	;;
  *)
	echo "Usage: $0 {start|stop|restart}"
	exit 1
esac

exit 0
