From 90f822ab03370df8ce61cf90c84ccc22bd52f849 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sat, 25 Mar 2017 21:02:19 +0000 Subject: [PATCH] Merge trunk r3938: Existence of package management files is tested even if PKGMNGT=n. Fix that. Thanks to Michael D.L. for reporting --- common/libs/func_validate_configs.sh | 38 +++++++++++++++------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/common/libs/func_validate_configs.sh b/common/libs/func_validate_configs.sh index b3f4926..819758e 100644 --- a/common/libs/func_validate_configs.sh +++ b/common/libs/func_validate_configs.sh @@ -202,25 +202,27 @@ inline_doc ;; # 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