|
@ -517,10 +517,6 @@ config_ipsec() { |
|
|
local interface |
|
|
local interface |
|
|
local device_list |
|
|
local device_list |
|
|
|
|
|
|
|
|
swan_reset |
|
|
|
|
|
swanctl_reset |
|
|
|
|
|
do_preamble |
|
|
|
|
|
|
|
|
|
|
|
config_get debug "$1" debug 0 |
|
|
config_get debug "$1" debug 0 |
|
|
config_get_bool rtinstall_enabled "$1" rtinstall_enabled 1 |
|
|
config_get_bool rtinstall_enabled "$1" rtinstall_enabled 1 |
|
|
[ $rtinstall_enabled -eq 1 ] && install_routes=yes || install_routes=no |
|
|
[ $rtinstall_enabled -eq 1 ] && install_routes=yes || install_routes=no |
|
@ -546,7 +542,9 @@ config_ipsec() { |
|
|
done |
|
|
done |
|
|
[ -n "$device_list" ] && WAIT_FOR_INTF=0 || WAIT_FOR_INTF=1 |
|
|
[ -n "$device_list" ] && WAIT_FOR_INTF=0 || WAIT_FOR_INTF=1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
do_postamble() { |
|
|
swan_xappend0 "# generated by /etc/init.d/swanctl" |
|
|
swan_xappend0 "# generated by /etc/init.d/swanctl" |
|
|
swan_xappend0 "charon {" |
|
|
swan_xappend0 "charon {" |
|
|
swan_xappend1 "install_routes = $install_routes" |
|
|
swan_xappend1 "install_routes = $install_routes" |
|
@ -566,9 +564,16 @@ config_ipsec() { |
|
|
|
|
|
|
|
|
prepare_env() { |
|
|
prepare_env() { |
|
|
mkdir -p /var/ipsec /var/swanctl |
|
|
mkdir -p /var/ipsec /var/swanctl |
|
|
|
|
|
|
|
|
|
|
|
swan_reset |
|
|
|
|
|
swanctl_reset |
|
|
|
|
|
do_preamble |
|
|
|
|
|
|
|
|
config_load ipsec |
|
|
config_load ipsec |
|
|
config_foreach config_ipsec ipsec |
|
|
config_foreach config_ipsec ipsec |
|
|
config_foreach config_remote remote |
|
|
config_foreach config_remote remote |
|
|
|
|
|
|
|
|
|
|
|
do_postamble |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
service_running() { |
|
|
service_running() { |
|
|