From d2bcbea5f95377043b0dcdba330501d7b81a4561 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Mon, 13 Jan 2014 11:22:41 -0600 Subject: [PATCH] Updates for tools/info.sh * Handle local.conf localrc section * remove blank lines * rather than removing password lines, just remove the password itself to at least show which password vars have been set Change-Id: Ieca9baaf03e53b23e336944ad0ed2581c9bee460 --- tools/info.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/info.sh b/tools/info.sh index 14ab8f6306..3ab7966ab4 100755 --- a/tools/info.sh +++ b/tools/info.sh @@ -85,8 +85,8 @@ done # Packages # -------- -# - We are going to check packages only for the services needed. -# - We are parsing the packages files and detecting metadatas. +# - Only check packages for the services enabled +# - Parse version info from the package metadata, not the package/file names for p in $(get_packages $ENABLED_SERVICES); do if [[ "$os_PACKAGE" = "deb" ]]; then @@ -141,9 +141,15 @@ rm $FREEZE_FILE # Dump localrc with 'localrc|' prepended and comments and passwords left out if [[ -r $TOP_DIR/localrc ]]; then + RC=$TOP_DIR/localrc +elif [[ -f $RC_DIR/.localrc.auto ]]; then + RC=$TOP_DIR/.localrc.auto +fi +if [[ -n $RC ]]; then sed -e ' - /PASSWORD/d; + /^[ \t]*$/d; + /PASSWORD/s/=.*$/=\/; /^#/d; s/^/localrc\|/; - ' $TOP_DIR/localrc + ' $RC fi