mirror of
https://github.com/openwrt/packages.git
synced 2026-10-14 14:17:12 +04:00
strongswan: rename lifetime to life_time in child
Rename uci option 'lifetime' to 'life_time' in child via upgrade script to match the 'swanctl.conf' '<child>.life_time' key. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
1 parent
2d4c8ac5b7
commit
6bba5f54b1
2 files changed
+9
-4
No files matched your search
@@ -339,6 +339,11 @@ migrate_option_child_values() {
|
||||
[ -z "$value" ] || {
|
||||
uci -q rename "ipsec.${cfg}.rekeytime=rekey_time"
|
||||
}
|
||||
|
||||
config_get value "$cfg" lifetime ""
|
||||
[ -z "$value" ] || {
|
||||
uci -q rename "ipsec.${cfg}.lifetime=life_time"
|
||||
}
|
||||
}
|
||||
|
||||
migrate_options() {
|
||||
|
||||
@@ -251,7 +251,7 @@ config_child() {
|
||||
local start_action
|
||||
local updown
|
||||
local firewall
|
||||
local lifetime
|
||||
local life_time
|
||||
local dpd_action
|
||||
local close_action
|
||||
local if_id
|
||||
@@ -272,7 +272,7 @@ config_child() {
|
||||
config_get start_action "$conf" start_action "none"
|
||||
config_get updown "$conf" updown ""
|
||||
config_get firewall "$conf" firewall ""
|
||||
config_get lifetime "$conf" lifetime ""
|
||||
config_get life_time "$conf" life_time ""
|
||||
config_get dpd_action "$conf" dpd_action "clear"
|
||||
config_get close_action "$conf" close_action "none"
|
||||
config_get if_id "$conf" if_id ""
|
||||
@@ -355,8 +355,8 @@ config_child() {
|
||||
swanctl_xappend4 "esp_proposals = $esp_proposal"
|
||||
swanctl_xappend4 "mode = $mode"
|
||||
|
||||
if [ -n "$lifetime" ]; then
|
||||
swanctl_xappend4 "life_time = $lifetime"
|
||||
if [ -n "$life_time" ]; then
|
||||
swanctl_xappend4 "life_time = $life_time"
|
||||
elif [ -n "$rekey_time" ]; then
|
||||
swanctl_xappend4 "life_time = $(seconds2time $(((110 * $(time2seconds $rekey_time)) / 100)))"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user