Merge pull request #20725 from pprindeville/fix-indent-strongswan
strongswan: Fix indent for hw_offload, interface, priority
This commit is contained in:
commit
ddffc76e08
2 changed files with 20 additions and 17 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=strongswan
|
||||
PKG_VERSION:=5.9.10
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/
|
||||
|
|
|
@ -63,9 +63,12 @@ file_reset() {
|
|||
|
||||
xappend() {
|
||||
local file="$1"
|
||||
shift
|
||||
local indent="$2"
|
||||
shift 2
|
||||
|
||||
echo "$@" >> "$file"
|
||||
for cmd in "$@"; do
|
||||
echo "$indent$cmd" >> "$file"
|
||||
done
|
||||
}
|
||||
|
||||
swan_reset() {
|
||||
|
@ -77,7 +80,7 @@ swan_xappend() {
|
|||
}
|
||||
|
||||
swan_xappend0() {
|
||||
swan_xappend "$@"
|
||||
swan_xappend "" "$@"
|
||||
}
|
||||
|
||||
swan_xappend1() {
|
||||
|
@ -105,7 +108,7 @@ swanctl_xappend() {
|
|||
}
|
||||
|
||||
swanctl_xappend0() {
|
||||
swanctl_xappend "$@"
|
||||
swanctl_xappend "" "$@"
|
||||
}
|
||||
|
||||
swanctl_xappend1() {
|
||||
|
@ -331,11 +334,11 @@ config_child() {
|
|||
[ -n "$local_subnet" ] && swanctl_xappend4 "local_ts = $local_subnet"
|
||||
[ -n "$remote_subnet" ] && swanctl_xappend4 "remote_ts = $remote_subnet"
|
||||
|
||||
[ -n "$hw_offload" ] && swanctl_append4 "hw_offload = $hw_offload"
|
||||
[ -n "$hw_offload" ] && swanctl_xappend4 "hw_offload = $hw_offload"
|
||||
[ $ipcomp -eq 1 ] && swanctl_xappend4 "ipcomp = 1"
|
||||
[ -n "$interface" ] && swanctl_append4 "interface = $interface"
|
||||
[ -n "$priority" ] && swanctl_append4 "priority = $priority"
|
||||
[ -n "$if_id" ] && { swanctl_xappend4 "if_id_in = $if_id" ; swanctl_xappend4 "if_id_out = $if_id" ; }
|
||||
[ -n "$interface" ] && swanctl_xappend4 "interface = $interface"
|
||||
[ -n "$priority" ] && swanctl_xappend4 "priority = $priority"
|
||||
[ -n "$if_id" ] && swanctl_xappend4 "if_id_in = $if_id" "if_id_out = $if_id"
|
||||
[ -n "$startaction" -a "$startaction" != "none" ] && swanctl_xappend4 "start_action = $startaction"
|
||||
[ -n "$closeaction" -a "$closeaction" != "none" ] && swanctl_xappend4 "close_action = $closeaction"
|
||||
swanctl_xappend4 "esp_proposals = $esp_proposal"
|
||||
|
|
Loading…
Reference in a new issue