Fix unbound variable errors
This commit is contained in:
@@ -73,7 +73,7 @@ step_2() {
|
||||
addConf -a "$v3AuthEntry" "$v3AuthLoc"
|
||||
|
||||
shift
|
||||
if [ ! -z $1 ] && [ "$1" == "-s" ] ; then
|
||||
if [ -n "${1:-}" ] && [ "$1" == "-s" ] ; then
|
||||
info "Stop after creating authentication config"
|
||||
exe service snmpd start
|
||||
return 0
|
||||
@@ -109,7 +109,7 @@ step_5_alias() { echo "ufw"; }
|
||||
step_5() {
|
||||
shift
|
||||
local lInterface="eth0"
|
||||
[ ! -z "$1" ] && lInterface="$1"
|
||||
[ -n "${1:-}" ] && lInterface="$1"
|
||||
# Check if interface exists
|
||||
ip -br a | grep -E "^$lInterface" >>/dev/null 2>&1
|
||||
endReturn -o $? "Interface $lInterface does not exist"
|
||||
|
Reference in New Issue
Block a user