r3106 - jhalfs/branches/experimental

georgeb at linuxfromscratch.org georgeb at linuxfromscratch.org
Tue Sep 12 14:03:41 PDT 2006


Author: georgeb
Date: 2006-09-12 15:03:40 -0600 (Tue, 12 Sep 2006)
New Revision: 3106

Modified:
   jhalfs/branches/experimental/jhalfs
Log:
Added test for the existance of sudo on the host system. This is a requirement for the new makefile format

Modified: jhalfs/branches/experimental/jhalfs
===================================================================
--- jhalfs/branches/experimental/jhalfs	2006-09-11 19:51:24 UTC (rev 3105)
+++ jhalfs/branches/experimental/jhalfs	2006-09-12 21:03:40 UTC (rev 3106)
@@ -247,7 +247,16 @@
 check_version "3.0"   "$BASH_VERSION"      "BASH"
 check_version "3.0"   "`gcc -dumpversion`" "GCC"
 tarVer=`tar --version | head -n1 | cut -d " " -f4`
-check_version "1.15.0" "${tarVer}"      "TAR"
+check_version "1.15.0"  "${tarVer}"      "TAR"
+
+SUDO_LOC="`whereis -b sudo | cut -d " " -f2`"
+if [ -x $SUDO_LOC ]; then
+  sudoVer=`sudo -V | head -n1 | cut -d " " -f3`
+  echo "SUDO    ${L_arrow}${BOLD}${sudoVer}${R_arrow}${OFF} ..OK"
+else
+  echo "${nl_}\"${RED}sudo${OFF}\" ${BOLD}must be installed on your system for jhalfs to run"
+  exit 1
+fi
 echo "${SD_BORDER}${nl_}"
 
 validate_config




More information about the alfs-log mailing list