Fix 'show saves' when there are no saves

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2018-05-05 13:27:37 -07:00
parent 07654d8f8d
commit 2039f38faf
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -1201,11 +1201,17 @@ show_saves_command() {
echo
for f in ${VARDIR}/*-iptables; do
fn=$(basename $f)
fn=${fn%-iptables}
mtime=$(ls -lt $f | tail -n 1 | cut -d ' ' -f '6 7 8' )
[ $fn = "$RESTOREFILE" ] && fn="$fn (default)"
echo " $mtime ${fn%-iptables}"
case $f in
*\**)
;;
*)
fn=$(basename $f)
fn=${fn%-iptables}
mtime=$(ls -lt $f | tail -n 1 | cut -d ' ' -f '6 7 8' )
[ $fn = "$RESTOREFILE" ] && fn="$fn (default)"
echo " $mtime ${fn%-iptables}"
;;
esac
done
echo