Author: pierre
Date: Sat Mar 25 14:00:16 2017
New Revision: 3938

Log:
Existence of package management files is tested even if PKGMNGT=n. Fix that. 
Thanks to Michael D.L. for reporting.

Modified:
   jhalfs/trunk/common/libs/func_validate_configs.sh

Modified: jhalfs/trunk/common/libs/func_validate_configs.sh
==============================================================================
--- jhalfs/trunk/common/libs/func_validate_configs.sh   Mon Mar 20 08:38:05 
2017        (r3937)
+++ jhalfs/trunk/common/libs/func_validate_configs.sh   Sat Mar 25 14:00:16 
2017        (r3938)
@@ -194,25 +194,27 @@
                ;;
 
         # Case of PKGMNGT: two files, packageManager.xml and packInstall.sh
-        # must exist in $PKGMNGTDIR:
+        # must exist in $PKGMNGTDIR if PKGMNGT='y':
       PKGMNGT) echo -e "`eval echo $PARAM_VALS`"
-               if [ ! -e "$PKGMNGTDIR/packageManager.xml" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packageManager.xml does not 
exist
-               fi
-               if [ ! -e "$PKGMNGTDIR/packInstall.sh" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packInstall.sh does not exist
-               fi
-               if [ ! -s "$PKGMNGTDIR/packageManager.xml" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packageManager.xml has zero size
-               fi
-               if [ ! -s "$PKGMNGTDIR/packInstall.sh" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packInstall.sh has zero size
-               fi
-               if [ ! -r "$PKGMNGTDIR/packageManager.xml" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packageManager.xml is not 
readable
-               fi
-               if [ ! -r "$PKGMNGTDIR/packInstall.sh" ]; then
-                 write_pkg_and_die $PKGMNGTDIR/packInstall.sh is not readable
+               if [ "$PKGMNGT" = y ]; then
+                 if [ ! -e "$PKGMNGTDIR/packageManager.xml" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packageManager.xml does not 
exist
+                 fi
+                 if [ ! -e "$PKGMNGTDIR/packInstall.sh" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packInstall.sh does not exist
+                 fi
+                 if [ ! -s "$PKGMNGTDIR/packageManager.xml" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packageManager.xml has zero 
size
+                 fi
+                 if [ ! -s "$PKGMNGTDIR/packInstall.sh" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packInstall.sh has zero size
+                 fi
+                 if [ ! -r "$PKGMNGTDIR/packageManager.xml" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packageManager.xml is not 
readable
+                 fi
+                 if [ ! -r "$PKGMNGTDIR/packInstall.sh" ]; then
+                   write_pkg_and_die $PKGMNGTDIR/packInstall.sh is not readable
+                 fi
                fi
                ;;
       # Display non-validated envars found in ${PROGNAME}_PARAM_LIST
-- 
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page

Reply via email to