Skip to content

Commit f9c81f5

Browse files
committed
Fix an oversight on interface presence check code
1 parent 574774c commit f9c81f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routertools

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ trap 'trap_ctl' SIGINT SIGTERM
4141

4242
# Initialize variables and language setting for compatibility
4343
LANG=C
44-
version="1.5.1"
44+
version="1.5.1a"
4545
error_count=0
4646
crit_count=0
4747
crit_add=0
@@ -1834,7 +1834,7 @@ check_iface_present(){
18341834

18351835
local i=$1
18361836

1837-
if [[ $(ifconfig -a | grep "flags=" | cut -d" " -f1 | grep -c "$i") -eq 1 ]]; then
1837+
if [[ $(ifconfig -a | grep "flags=" | cut -d" " -f1 | grep -c "$i") -ne 0 ]]; then
18381838
return 0
18391839
else
18401840
return 1

0 commit comments

Comments
 (0)