Complete.Org: Mailing Lists: Archives: discussion: September 1999:
[aclug-L] Re: starting pppd by a normal user
Home

[aclug-L] Re: starting pppd by a normal user

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: [aclug-L] Re: starting pppd by a normal user
From: Jeff <schaller@xxxxxxxxxxxxx>
Date: Sun, 19 Sep 1999 18:21:10 -0500 (CDT)
Reply-to: aclug-L@xxxxxxxxxxxx

In case it helps, I attached the 'ppp' script I use with 'sudo'.
/usr/local/bin/ is in my $PATH, so I do:

$ sudo ppp start

and wait until I hear the beep/see the wall message.

When I want to pull it down,

$ sudo ppp stop

Included inline are /etc/ppp/ip-down.local and /etc/ppp/ip-up.local.
They get called by ip-down and ip-up (in /etc/ppp) respectively.

ip-down.local:
#!/bin/sh
wall "ppp down"


ip-up.local:
/etc/rc.d/init.d/xntpd start >/dev/null 2>&1 &;
/usr/bin/wall "ppp up"

-jeff
-- 
The Kansas BoE approved new science standards which de-emphasize the teaching
of evolution. What do you think? "As a Kansan, I just ask myself, 'WWJD?' I 
figure he'd want to wear white button-up shirts, drink beer, cheer the 
Jayhawks, and set education in this state back about 100 years."
Stan Crouse, Appliance Repairer. http://www.theonion.com


-- Attached file included as plaintext by Listar --
-- File: ppp
-- Desc: ppp

#!/bin/sh
#
# ppp      This shell script takes care of starting and stopping ppp
#

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

# See how we were called.
case "$1" in
        sta* | on)
                /usr/sbin/pppd /dev/modem 115200
                ;;

        sto* | off)
                # Stop daemon.
                . /etc/rc.d/init.d/functions
                killproc pppd
                echo
                hostname lisa.schaller.net
                ;;

        re*)
                $0 stop
                sleep 1
                $0 start
                ;;

        #status)
        #       . /etc/rc.d/init.d/functions
        #       status pppd
        #       ;;

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

exit 0


[Prev in Thread] Current Thread [Next in Thread]