From 816f65be8fde357cdc3070f58b5844c02890362a Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Tue, 17 Apr 2018 12:43:47 -0500 Subject: [PATCH] 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 --- scripts/scripts-library.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index 654e8dad41..c3da93520c 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -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 }