From 14914f12514b5d9eb5ec73dff3101c02d66312f6 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Wed, 26 Aug 2020 03:35:18 -0600 Subject: [PATCH] executors: use set -e consistently --- executor-scripts/linux/bridge | 2 ++ executor-scripts/linux/gre | 2 ++ executor-scripts/linux/ipv6-ra | 2 ++ executor-scripts/linux/link | 2 ++ executor-scripts/linux/static | 2 ++ executor-scripts/linux/tunnel | 2 ++ executor-scripts/stub/bond | 1 + executor-scripts/stub/bridge | 1 + 8 files changed, 14 insertions(+) diff --git a/executor-scripts/linux/bridge b/executor-scripts/linux/bridge index 367e947..3a4a41c 100755 --- a/executor-scripts/linux/bridge +++ b/executor-scripts/linux/bridge @@ -1,5 +1,7 @@ #!/bin/sh +set -e + # Copyright (C) 2012, 2020 Natanael Copa # Copyright (C) 2020 Ariadne Conill # diff --git a/executor-scripts/linux/gre b/executor-scripts/linux/gre index c747aab..40b96e8 100755 --- a/executor-scripts/linux/gre +++ b/executor-scripts/linux/gre @@ -1,5 +1,7 @@ #!/bin/sh +set -e + # Executor for advanced GRE tunnel management. [ -z "$IF_GRE_LOCAL" ] && exit 1 diff --git a/executor-scripts/linux/ipv6-ra b/executor-scripts/linux/ipv6-ra index 95b5f64..fc6644a 100755 --- a/executor-scripts/linux/ipv6-ra +++ b/executor-scripts/linux/ipv6-ra @@ -1,5 +1,7 @@ #!/bin/sh +set -e + start() { ${MOCK} /bin/sh -c "echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra" } diff --git a/executor-scripts/linux/link b/executor-scripts/linux/link index f7ede1f..8b1b54b 100755 --- a/executor-scripts/linux/link +++ b/executor-scripts/linux/link @@ -1,5 +1,7 @@ #!/bin/sh +set -e + [ -n "$VERBOSE" ] && set -x IF_LINK_OPTIONS="$IF_LINK_OPTIONS" diff --git a/executor-scripts/linux/static b/executor-scripts/linux/static index b1c9f8d..04d3ae6 100755 --- a/executor-scripts/linux/static +++ b/executor-scripts/linux/static @@ -1,5 +1,7 @@ #!/bin/sh +set -e + [ -z "$IF_METRIC" ] && IF_METRIC="1" [ -n "$IF_VRF_TABLE" ] && VRF_TABLE="table $IF_VRF_TABLE" [ -n "$IF_METRIC" ] && METRIC="metric $IF_METRIC" diff --git a/executor-scripts/linux/tunnel b/executor-scripts/linux/tunnel index 6b6fa49..e370b2a 100755 --- a/executor-scripts/linux/tunnel +++ b/executor-scripts/linux/tunnel @@ -1,5 +1,7 @@ #!/bin/sh +set -e + # Based on alpine's tunnel configuration script. # Copyright (c) 2017 Kaarle Ritvanen # Copyright (c) 2020 Ariadne Conill (extended for ifupdown-ng) diff --git a/executor-scripts/stub/bond b/executor-scripts/stub/bond index 0548543..1869611 100755 --- a/executor-scripts/stub/bond +++ b/executor-scripts/stub/bond @@ -1,4 +1,5 @@ #!/bin/sh +set -e [ -z "$IF_BOND_MEMBERS" ] && IF_BOND_MEMBERS="$IF_BOND_SLAVES" case "$PHASE" in depend) echo "$IF_BOND_MEMBERS" ;; diff --git a/executor-scripts/stub/bridge b/executor-scripts/stub/bridge index 5eee08c..d09db3f 100755 --- a/executor-scripts/stub/bridge +++ b/executor-scripts/stub/bridge @@ -1,4 +1,5 @@ #!/bin/sh +set -e case "$PHASE" in depend) if [ "$IF_BRIDGE_PORTS" != "none" ]; then