mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-21 10:18:58 +02:00
Avoid errors from 'status -i' when there are no optional interfaces
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
f95c67ec6b
commit
9aa915a5e0
@ -3272,9 +3272,11 @@ show_interfaces() {
|
||||
local printed
|
||||
|
||||
for f in ${VARDIR}/*.status; do
|
||||
interface=$(basename $f)
|
||||
echo " Interface ${interface%.status} is $(interface_status $f)"
|
||||
printed=Yes
|
||||
if [ -f $f ]; then
|
||||
interface=$(basename $f)
|
||||
echo " Interface ${interface%.status} is $(interface_status $f)"
|
||||
printed=Yes
|
||||
fi
|
||||
done
|
||||
|
||||
[ -n "$printed" ] && echo
|
||||
|
Loading…
x
Reference in New Issue
Block a user