Merge pull request #20725 from pprindeville/fix-indent-strongswan

strongswan: Fix indent for hw_offload, interface, priority
This commit is contained in:
Philip Prindeville 2023-03-28 13:30:23 -06:00 committed by GitHub
commit ddffc76e08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 17 deletions

View file

@ -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/

View file

@ -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"