HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //usr/share/doc/rp-pppoe-3.11/pppoe-init
#!/bin/sh
#
# pppoe                     This script starts or stops a PPPoE connection
#
# chkconfig: 2345 99 01
# description: Connects to PPPoE provider
#
# LIC: GPL
#
# Copyright (C) 2000 Roaring Penguin Software Inc.  This software may
# be distributed under the terms of the GNU General Public License, version
# 2 or any later version.

# Source function library if it exists
test -r /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions

# From AUTOCONF
prefix=/usr
exec_prefix=/usr

# Paths to programs
START=/usr/sbin/pppoe-start
STOP=/usr/sbin/pppoe-stop
STATUS=/usr/sbin/pppoe-status
case "$1" in
    start)
        echo -n "Bringing up PPPoE link"

	$START
	if [ $? = 0 ] ; then
		touch /var/lock/subsys/pppoe
	        echo_success
	else
		echo_failure
	fi
        echo ""
        ;;

    stop)
        echo -n "Shutting down PPPoE link"

	$STOP > /dev/null 2>&1
	if [ $? = 0 ] ; then
		rm -f /var/lock/subsys/pppoe
	        echo_success
	else
		echo_failure
	fi
        echo ""
        ;;

    restart)
	$0 stop
	$0 start
	;;

    status)
	$STATUS
	;;

    *)
        echo "Usage: pppoe {start|stop|restart|status}"
        exit 1
esac

exit 0