From fc01224da04e169844b12dcc2aeebe63f86241bc Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 16 Nov 2018 11:31:54 -0500 Subject: [PATCH] Add a test to make sure we are not running this on debian based operating systems --- builddep.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/builddep.sh b/builddep.sh index 08036c887..ca4206c42 100755 --- a/builddep.sh +++ b/builddep.sh @@ -19,6 +19,14 @@ # of the FRS area. # VERBOSE=1 - Set to 1 to see more VERBOSE output +# This script should only be run on RPM based machines +# This test is not foolproof, but at least tries to detect +if [ `/bin/rpm -q -f /bin/rpm >/dev/null 2>&1; echo $?` != 0 ]; then + echo "ERROR: This script should only be executed on a RPM based Operation System." + exit 1 +fi + +exit 0 # you can change this if you need to USER=xcat TARGET_MACHINE=xcat.org