mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
ipsec-interfaces: Don't add any interfaces when IPsec is disabled
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -37,15 +37,14 @@ log() {
|
||||
}
|
||||
|
||||
main() {
|
||||
# We are done when IPsec is not enabled
|
||||
[ "${ENABLED}" = "on" ] || exit 0
|
||||
|
||||
# Register local variables
|
||||
local "${VARS[@]}"
|
||||
local action
|
||||
|
||||
local interfaces=()
|
||||
|
||||
# We are done when IPsec is not enabled
|
||||
if [ "${ENABLED}" = "on" ]; then
|
||||
while IFS="," read -r "${VARS[@]}"; do
|
||||
# Check if the connection is enabled
|
||||
[ "${status}" = "on" ] || continue
|
||||
@@ -98,6 +97,7 @@ main() {
|
||||
# Bring up the interface
|
||||
ip link set dev "${intf}" up
|
||||
done < "${VPN_CONFIG}"
|
||||
fi
|
||||
|
||||
# Delete all other interfaces
|
||||
local intf
|
||||
|
||||
Reference in New Issue
Block a user