diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-06 19:51:27 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-05-06 19:51:27 +0000 |
commit | 52daa0e967cbc738f9133bfb9f42a8a1a7a4d8bb (patch) | |
tree | 95657ccf5b145a9f40c5cf0324e79fefb9313642 /package/pptp/files | |
parent | 94b8d4ddc8d7864906acb1e466a372d574925ea8 (diff) | |
download | upstream-52daa0e967cbc738f9133bfb9f42a8a1a7a4d8bb.tar.gz upstream-52daa0e967cbc738f9133bfb9f42a8a1a7a4d8bb.tar.bz2 upstream-52daa0e967cbc738f9133bfb9f42a8a1a7a4d8bb.zip |
[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
Diffstat (limited to 'package/pptp/files')
-rw-r--r-- | package/pptp/files/pptp.init | 33 | ||||
-rw-r--r-- | package/pptp/files/pptp.sh | 6 |
2 files changed, 5 insertions, 34 deletions
diff --git a/package/pptp/files/pptp.init b/package/pptp/files/pptp.init deleted file mode 100644 index 024b8ceea2..0000000000 --- a/package/pptp/files/pptp.init +++ /dev/null @@ -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 -} - diff --git a/package/pptp/files/pptp.sh b/package/pptp/files/pptp.sh index ed5f46fff3..5151f72733 100644 --- a/package/pptp/files/pptp.sh +++ b/package/pptp/files/pptp.sh @@ -6,10 +6,14 @@ stop_interface_pptp() { stop_interface_ppp "$1" } +coldplug_interface_pptp() { + setup_interface_pptp "pptp-$1" "$1" +} + setup_interface_pptp() { local config="$2" local ifname - + config_get device "$config" device config_get ipproto "$config" ipproto config_get server "$config" server |