#! /bin/sh # Copyright (c) 1995-1998 S.u.S.E. GmbH Fuerth, Germany. # Original Author: Mike Klinkert # New Author: Manos Tsagias # Modified to suit redhat distribution 12/08/2001 # Modified for Mandrake-compliance Buchan Milne 20030303 # chkconfig: 345 93 36 # description: Starts and stops the linesrv \ # used to provide Internet access. # /etc/rc.d/init.d/linesrv SERVICE=linesrv LOCKFILE=/var/lock/subsys/$SERVICE # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 # Check that mserver.conf exists. [ -f /etc/linesrv.conf ] || exit 0 start() { gprintf "Starting LineControl:" daemon /usr/sbin/linesrv RETVAL=$? echo touch $LOCKFILE return $RETVAL } stop() { gprintf "Shutting down LineControl: " killproc /usr/sbin/linesrv RETVAL=$? echo rm -f $LOCKFILE return $RETVAL } mdkstatus() { status $SERVICE } case "$1" in start) start ;; stop) stop ;; restart|reload) stop start ;; check|status) mdkstatus ;; condrestart) [ -f /var/lock/subsys/$SERVICE ] && restart || : ;; *) gprintf "Usage: %s {start|stop|restart|check|condrestart}\n" "$0" exit 1 ;; esac exit 0