Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > by-pkgid > 4aadd45f221424a24a93e5fc1e8faba3 > files > 6

diald-1.0-12mdv2010.0.x86_64.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.
#
### BEGIN INIT INFO
# Provides: diald
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Short-Description: PPP/SLIP networking daemon
# 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.
### END INIT INFO

# 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.
	gprintf "Starting diald: "
	daemon /usr/sbin/diald  -f $CONFIG
	echo
	touch /var/lock/subsys/diald
	;;
  stop)
	# Stop daemons.
	gprintf "Shutting down diald: "
	killproc /usr/sbin/diald
	echo
	rm -f /var/lock/subsys/diald
	;;
  restart)
    	$0 stop
	$0 start
	;;
  status)
	status diald
	;;
  reload)
  	gprintf "Reloading diald: "
        $0 start
	echo
	;;
 *)
	gprintf "Usage: %s {start|stop|restart|status}\n" "$0"
	exit 1
esac

exit 0