mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
pptp: utilize coldplug_interface_pptp() to automatically launch pptp instances on boot
SVN-Revision: 21390
This commit is contained in:
parent
6a3cbba92e
commit
dcbb5a19e7
@ -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
|
|
||||||
}
|
|
||||||
|
|
@ -6,10 +6,14 @@ stop_interface_pptp() {
|
|||||||
stop_interface_ppp "$1"
|
stop_interface_ppp "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
coldplug_interface_pptp() {
|
||||||
|
setup_interface_pptp "pptp-$1" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
setup_interface_pptp() {
|
setup_interface_pptp() {
|
||||||
local config="$2"
|
local config="$2"
|
||||||
local ifname
|
local ifname
|
||||||
|
|
||||||
config_get device "$config" device
|
config_get device "$config" device
|
||||||
config_get ipproto "$config" ipproto
|
config_get ipproto "$config" ipproto
|
||||||
config_get server "$config" server
|
config_get server "$config" server
|
||||||
|
Loading…
Reference in New Issue
Block a user