Changeset 2173


Ignore:
Timestamp:
Sep 19, 2012, 3:25:33 PM (7 years ago)
Author:
matthijs
Message:

luci: Slightly restructure openvpn configuration saving.

This makes it easier to add new variables to be saved later on.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/luci/modules/admin-fon/root/sbin/save-config.sh

    r2167 r2173  
    116116config_clear
    117117
    118 # Keep OpenVPN network access settings
     118# Keep OpenVPN settings
    119119config_load 'openvpn'
    120120
    121121echo "uci import -m openvpn <<EOF"
    122122echo "config 'openvpn' 'openvpn'"
    123 echo "  option 'enable' '$(config_get openvpn enable)'"
    124 echo "  option 'lan' '$(config_get openvpn lan)'"
    125 echo "  option 'wan' '$(config_get openvpn wan)'"
     123for o in enable lan wan; do
     124        echo "  option '$o' '$(config_get openvpn $o)'"
     125done
    126126save_client() {
    127127    echo "config 'client' '$1'"
Note: See TracChangeset for help on using the changeset viewer.