Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > main-src > by-pkgid > 730a2a6628cb3180e03ac77b0315ab58 > files > 6

diald-1.0-2mdk.src.rpm

#!/bin/sh
#
# diald   The on demand TCP/IP networking program
#              
#
# chkconfig: 2345 57 5
# description: Diald is the smart demand-dial PPP/SLIP networking daemon. \
#      It selectively activates the SLIP/PPP link to the Internet when \
#      traffic is detected that is considered important.
#

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

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

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

[ -f /usr/sbin/diald ] || exit 0

[ -f /etc/diald/diald.conf ] || exit 0
CONFIG=/etc/diald/diald.conf


# See how we were called.
case "$1" in
  start)
	# Start daemons.
	echo -n "Starting diald: "
	daemon /usr/sbin/diald  -f $CONFIG
	echo
	touch /var/lock/subsys/diald
	;;
  stop)
	# Stop daemons.
	echo -n "Shutting down diald: "
	killproc /usr/sbin/diald
	echo
	rm -f /var/lock/subsys/diald
	;;
  restart)
    	$0 stop
	$0 start
	;;
  status)
	status diald
	;;
  reload)
  	echo -n "Reloading diald: "
        $0 start
	echo
	;;
 *)
	echo "Usage: $0 {start|stop|restart|status}"
	exit 1
esac

exit 0