some preparatory changes in preparation for a test suite: not tested!
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 11 Oct 2008 17:35:30 +0000 (13:35 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 11 Oct 2008 17:35:30 +0000 (13:35 -0400)
src/common
src/monkeysphere
src/monkeysphere-server

index 22ed1b15dd5580e318d5fd20ae3b201f6679f213..ef70ef6c0909bec4807f9b8c65511fe0ebdc5d61 100644 (file)
@@ -16,8 +16,8 @@
 ### COMMON VARIABLES
 
 # managed directories
-ETC="/etc/monkeysphere"
-export ETC
+SYSCONFIGDIR=${MONKEYSPHERE_SYSCONFIGDIR:-"/etc/monkeysphere"}
+export SYSCONFIGDIR
 
 ########################################################################
 ### UTILITY FUNCTIONS
index 089c06e6e8e59ac2e72e7df9e6613b4a0e53490e..78bf50ddac503388fe600bbf7751e40fa381f4ba 100755 (executable)
@@ -270,7 +270,7 @@ unset HASH_KNOWN_HOSTS
 unset AUTHORIZED_KEYS
 
 # load global config
-[ -r "${ETC}/monkeysphere.conf" ] && . "${ETC}/monkeysphere.conf"
+[ -r "${SYSCONFIGDIR}/monkeysphere.conf" ] && . "${SYSCONFIGDIR}/monkeysphere.conf"
 
 # set monkeysphere home directory
 MONKEYSPHERE_HOME=${MONKEYSPHERE_HOME:="${HOME}/.monkeysphere"}
index db3687bda3b7c185c7bc1e34f63f853afaa1e1eb..6cef8974693e60abfccfc4ff97ea350c32d13673 100755 (executable)
 ########################################################################
 PGRM=$(basename $0)
 
-SHARE=${MONKEYSPHERE_SHARE:="/usr/share/monkeysphere"}
+SHARE=${MONKEYSPHERE_SHARE:-"/usr/share/monkeysphere"}
 export SHARE
 . "${SHARE}/common" || exit 1
 
-VARLIB="/var/lib/monkeysphere"
-export VARLIB
+SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"/var/lib/monkeysphere"
+export SYSDATADIR
 
 # UTC date in ISO 8601 format if needed
 DATE=$(date -u '+%FT%T')
@@ -914,7 +914,7 @@ unset RAW_AUTHORIZED_KEYS
 unset MONKEYSPHERE_USER
 
 # load configuration file
-[ -e ${MONKEYSPHERE_SERVER_CONFIG:="${ETC}/monkeysphere-server.conf"} ] && . "$MONKEYSPHERE_SERVER_CONFIG"
+[ -e ${MONKEYSPHERE_SERVER_CONFIG:="${SYSCONFIGDIR}/monkeysphere-server.conf"} ] && . "$MONKEYSPHERE_SERVER_CONFIG"
 
 # set empty config variable with ones from the environment, or with
 # defaults