Skip to content

Commit

Permalink
Avoid @set -e@ for anything but simple commands
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrains1 committed Sep 16, 2024
1 parent eca82c4 commit fe915fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hitl-setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# SPDX-License-Identifier: Apache-2.0

FORCE="$1"
set -exuo pipefail
set -xuo pipefail
HERE=$(realpath $(dirname "$0"))
source "$HERE/fpganet"
source "$HERE/fpganet" || exit $?

echo Checking that all INTERFACES exist
for INTERFACE in $INTERFACES; do
ip addr show $INTERFACE > /dev/null || exit 1
ip addr show $INTERFACE > /dev/null || exit $?
done
echo All INTERFACES exist

Expand All @@ -28,6 +28,7 @@ if [ -n "$EXISTS" -a "$FORCE" = "-f" ]; then
exit 1
fi

set -e
apt-get install -y isc-dhcp-server iproute2

cp "$HERE/fpganet.service" /etc/systemd/system
Expand Down

0 comments on commit fe915fa

Please sign in to comment.