Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Fix: Use lf-activate-venv to reuse venv"
[releng/global-jjb.git]
/
shell
/
openstack-cleanup-orphaned-ports.sh
diff --git
a/shell/openstack-cleanup-orphaned-ports.sh
b/shell/openstack-cleanup-orphaned-ports.sh
index
8549737
..
b5c0af5
100755
(executable)
--- a/
shell/openstack-cleanup-orphaned-ports.sh
+++ b/
shell/openstack-cleanup-orphaned-ports.sh
@@
-55,7
+55,8
@@
_cleanup()
}
# Output the initial list of port UUIDs to a temporary file
}
# Output the initial list of port UUIDs to a temporary file
-openstack --os-cloud "$os_cloud" port list -f value -c ID -c status | grep -e DOWN | awk '{print $1}'> "$tmpfile"
+openstack --os-cloud "$os_cloud" port list -f value -c ID -c status \
+ | { grep -e DOWN || true; } | { awk '{print $1}' || true; } > "$tmpfile"
# Count the number to process
total=$(wc -l "$tmpfile" | awk '{print $1}')
# Count the number to process
total=$(wc -l "$tmpfile" | awk '{print $1}')