[test-API PATCH] utils: Make ipget.sh more portable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change the test for existence of nmap to be a little more cross-distro
portable.
---
 utils/ipget.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/ipget.sh b/utils/ipget.sh
index cc1949b..8d44b14 100755
--- a/utils/ipget.sh
+++ b/utils/ipget.sh
@@ -6,8 +6,8 @@ if [[ -z $mac ]]; then
    exit 1
 fi

-if ! rpm -qa |grep -q nmap ;then
-   echo "need nmap rpmball installed."
+if ! type nmap >/dev/null 2>&1; then
+   echo "nmap package needs to be installed."
    exit 1
 fi

-- 
1.7.3.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]