summaryrefslogtreecommitdiff
path: root/net.Linux/pppd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'net.Linux/pppd.sh')
-rw-r--r--net.Linux/pppd.sh43
1 files changed, 13 insertions, 30 deletions
diff --git a/net.Linux/pppd.sh b/net.Linux/pppd.sh
index 510a63a..4ab2007 100644
--- a/net.Linux/pppd.sh
+++ b/net.Linux/pppd.sh
@@ -1,44 +1,27 @@
# Copyright 2005-2007 Gentoo Foundation
-# Copyright 2007 Roy Marples
+# Copyright 2007-2008 Roy Marples
# All rights reserved
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-
-pppd_depend() {
+pppd_depend()
+{
program /usr/sbin/pppd
after interface
before dhcp
provide ppp
}
-is_ppp() {
+is_ppp()
+{
[ -e /var/run/ppp-"${IFACE}".pid ]
}
-requote() {
+requote()
+{
printf "'%s' " "$@"
}
-pppd_pre_start() {
+pppd_pre_start()
+{
# Interface has to be called ppp
[ "${IFACE%%[0-9]*}" = "ppp" ] || return 0
@@ -240,11 +223,13 @@ pppd_pre_start() {
}
# Dummy function for users that still have config_ppp0="ppp"
-pppd_start() {
+pppd_start()
+{
return 0
}
-pppd_stop() {
+pppd_stop()
+{
yesno ${IN_BACKGROUND} && return 0
local pidfile="/var/run/ppp-${IFACE}.pid"
@@ -256,5 +241,3 @@ pppd_stop() {
--pidfile "${pidfile}" --retry 30
eend $?
}
-
-# vim: set ts=4 :