Fix broken logic for detecting if executable exists

Code was checking if $(executable) was executable. But $(executable)
would run the executable and get the output from the executable. This
output was not the path to the executable.

Fix this and also use correct name for iptables-save (was iptable-save)

Change-Id: Ie2ccd405cd01acea7201a199b4c8c12922e46e4f
This commit is contained in:
John L. Villalovos 2016-11-12 09:26:07 -08:00
parent ed53369a6d
commit 88eab6757a
1 changed files with 3 additions and 3 deletions

View File

@ -47,11 +47,11 @@ save_data $BASE_RELEASE $BASE_DEVSTACK_DIR
# Save ebtables/iptables
# ----------------------
# NOTE(sileht): If nova is not installed this tools are not present
if [ -x "$(iptable-save)" ]; then
# NOTE(sileht): If nova is not installed these tools are not present
if [[ $(type -P iptables-save) != "" ]]; then
sudo iptables-save >$SAVE_DIR/iptables.$BASE_RELEASE
fi
if [ -x "$(ebtables)" ]; then
if [[ $(type -P ebtables) != "" ]]; then
sudo ebtables -t broute -L >$SAVE_DIR/ebtables-broute.$BASE_RELEASE
sudo ebtables -t filter -L >$SAVE_DIR/ebtables-filter.$BASE_RELEASE
sudo ebtables -t nat -L >$SAVE_DIR/ebtables-nat.$BASE_RELEASE