mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-21 02:08:48 +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
|
local printed
|
||||||
|
|
||||||
for f in ${VARDIR}/*.status; do
|
for f in ${VARDIR}/*.status; do
|
||||||
interface=$(basename $f)
|
if [ -f $f ]; then
|
||||||
echo " Interface ${interface%.status} is $(interface_status $f)"
|
interface=$(basename $f)
|
||||||
printed=Yes
|
echo " Interface ${interface%.status} is $(interface_status $f)"
|
||||||
|
printed=Yes
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "$printed" ] && echo
|
[ -n "$printed" ] && echo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user