Set exit on error
Since some of the functions are getting called in subshells. Calling exit in a subshell just quits the subshell but not the whole programm. As some of the functions should lead to a programm termination, a fix is required. Setting "set -e" ensures that the whole programm is being exited in such cases. Change-Id: I3269534029e40109e7cec580a83a27f489acbe17
This commit is contained in:
parent
de4742b980
commit
9c6c952b62
|
@ -21,6 +21,9 @@
|
|||
# or
|
||||
# <devno>,<port>,<mac>;
|
||||
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
LOG_PREFIX=$(basename "$0")
|
||||
REGEX_DEV_NO="[0-9A-Fa-f]{4}"
|
||||
REGEX_MAC="[0-9A-Fa-f]{12}"
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
# The format of the cmdline parameters must be
|
||||
# <devno>,<port>,<mac>;
|
||||
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
# Matches MAC in format: xxxxxxxxxxxx
|
||||
REGEX_MAC="[0-9A-Fa-f]{12}"
|
||||
|
|
Loading…
Reference in New Issue