[csw-devel] SF.net SVN: opencsw:[441] catalog_signatures/bin/catalog_daemon

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Thu Jul 21 05:13:46 CEST 2011


Revision: 441
          http://opencsw.svn.sourceforge.net/opencsw/?rev=441&view=rev
Author:   bdwalton
Date:     2011-07-21 03:13:46 +0000 (Thu, 21 Jul 2011)

Log Message:
-----------
streamline catalog_daemon to use vars from env (inherited)

Signed-off-by: Ben Walton <bwalton at opencsw.org>

Modified Paths:
--------------
    catalog_signatures/bin/catalog_daemon

Modified: catalog_signatures/bin/catalog_daemon
===================================================================
--- catalog_signatures/bin/catalog_daemon	2011-07-21 03:13:26 UTC (rev 440)
+++ catalog_signatures/bin/catalog_daemon	2011-07-21 03:13:46 UTC (rev 441)
@@ -1,30 +1,11 @@
 #!/opt/csw/bin/bash
 
+# APP_* should be inherited from the initialization script
+
 PATH=/opt/csw/bin:/opt/csw/gnu:$PATH
+DAEMON=${APP_BIN}/catalog_gpg
 
-DAEMON_BIN="$(dirname $0)"
-DAEMON_HOME="${DAEMON_BIN}/.."
-DAEMON_GPG="${DAEMON_HOME}/etc/gpg"
-DAEMON_TMP="${DAEMON_HOME}/tmp"
-GPG_ENV="${DAEMON_TMP}/gpg-agent.conf"
-DAEMON=${DAEMON_BIN}/catalog_gpg
-
-if [ -f "${GPG_ENV}" ]; then
-    source "${GPG_ENV}"
-    if [ ! -d "$(dirname ${GPG_AGENT_INFO})" ]; then
-	unset GPG_AGENT_INFO
-    fi
-fi
-
-if [ -z "${GPG_AGENT_INFO}" ]; then
-    gpg-agent --daemon --homedir "${DAEMON_GPG}" --write-env-file "${GPG_ENV}"
-    source "${GPG_ENV}"
-fi
-
-export GPG_AGENT_INFO
-export DAEMON_GPG
-
 # warm up the passphrase...
-gpg --yes --homedir "${DAEMON_GPG}" --clearsign --armor --output "${DAEMON_TMP}/$(basename ${DAEMON}).asc" "${DAEMON}"
+gpg --yes --homedir "${APP_GPG}" --clearsign --armor --output "${APP_TMP}/$(basename ${DAEMON}).asc" "${DAEMON}"
 
 exec "${DAEMON}"


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list