Only run zfs command if command is present

zfs package is only installed under certain options, so
only run the zfs command in scripts-library if the command is
installed

Change-Id: I2ecfd4bac657f3bd2d901b85909e73f77e39e510
This commit is contained in:
Antony Messerli
2018-04-17 12:43:47 -05:00
parent 015171e9b1
commit 816f65be8f

View File

@@ -345,7 +345,9 @@ function get_instance_info {
"/openstack/log/instance-info/btrfs_${dir_name}_quotas_${TS}.log" || true
done
zfs list > "/openstack/log/instance-info/zfs_lxc_${TS}.log" || true
if command -v zfs >/dev/null; then
zfs list > "/openstack/log/instance-info/zfs_lxc_${TS}.log" || true
fi
df -h > "/openstack/log/instance-info/report_fs_df_${TS}.log" || true
}