[packages] openvpn: load config only once in the init script up() and down() sections
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 13 Aug 2009 00:48:52 +0000 (00:48 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 13 Aug 2009 00:48:52 +0000 (00:48 +0000)
SVN-Revision: 17237

net/openvpn/files/openvpn.init

index 7368436..1f2fcc9 100644 (file)
@@ -148,8 +148,8 @@ restart() {
 up() {
        local exists
        local INSTANCE
+       config_load openvpn
        for INSTANCE in "$@"; do
-               config_load openvpn
                config_get exists "$INSTANCE" TYPE
                if [ "$exists" == "openvpn" ]; then
                        start_service "$INSTANCE"
@@ -160,8 +160,8 @@ up() {
 down() {
        local exists
        local INSTANCE
+       config_load openvpn
        for INSTANCE in "$@"; do
-               config_load openvpn
                config_get exists "$INSTANCE" TYPE
                if [ "$exists" == "openvpn" ]; then
                        stop_service "$INSTANCE"