[package] pptp: utilize coldplug_interface_pptp() to automatically launch pptp instances on boot

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21390 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Jo-Philipp Wich 2010-05-06 19:51:27 +00:00
parent 94b8d4ddc8
commit 52daa0e967
2 changed files with 5 additions and 34 deletions

View File

@ -1,33 +0,0 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=41
STOP=30
updown_pptp_interface () {
config_get proto "$1" proto
if [ "$proto" = "pptp" ]; then
if$2 "$1"
fi
}
boot () {
start
}
start() {
config_load network
config_foreach updown_pptp_interface interface up
}
restart() {
config_load network
config_foreach updown_pptp_interface interface down
config_foreach updown_pptp_interface interface up
}
stop() {
config_load network
config_foreach updown_pptp_interface interface down
}

View File

@ -6,6 +6,10 @@ stop_interface_pptp() {
stop_interface_ppp "$1"
}
coldplug_interface_pptp() {
setup_interface_pptp "pptp-$1" "$1"
}
setup_interface_pptp() {
local config="$2"
local ifname