Removed the gnutls component from our APT repo, since gnutls 2.6 is now in debian...
[monkeysphere.git] / src / monkeysphere
index 36b44dd4a457f78a6f39ea901150776c005ae2df..dd689b5bfd45ca4b5dc6abbe97fe59b6096b7ac5 100755 (executable)
@@ -13,9 +13,9 @@
 ########################################################################
 PGRM=$(basename $0)
 
-SHARE=${MONKEYSPHERE_SHARE:-"/usr/share/monkeysphere"}
-export SHARE
-. "${SHARE}/common" || exit 1
+SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"/usr/share/monkeysphere"}
+export SYSSHAREDIR
+. "${SYSSHAREDIR}/common" || exit 1
 
 # UTC date in ISO 8601 format if needed
 DATE=$(date -u '+%FT%T')
@@ -36,7 +36,7 @@ umask 077
 usage() {
     cat <<EOF >&2
 usage: $PGRM <subcommand> [options] [args]
-MonkeySphere client tool.
+Monkeysphere client tool.
 
 subcommands:
  update-known_hosts (k) [HOST]...    update known_hosts file
@@ -63,7 +63,7 @@ gen_subkey(){
     keyExpire=
 
     # get options
-    TEMP=$(getopt -o l:e: -l length:,expire: -n "$PGRM" -- "$@")
+    TEMP=$(PATH="/usr/local/bin:$PATH" getopt -o l:e: -l length:,expire: -n "$PGRM" -- "$@") || failure "getopt failed!  Does your getopt support GNU-style long options?"
 
     if [ $? != 0 ] ; then
        exit 1
@@ -172,7 +172,7 @@ function subkey_to_ssh_agent() {
 
     if ! test_gnu_dummy_s2k_extension ; then
        failure "Your version of GnuTLS does not seem capable of using with gpg's exported subkeys.
-You may want to consider patching or upgrading.
+You may want to consider patching or upgrading to GnuTLS 2.6 or later.
 
 For more details, see:
  http://lists.gnu.org/archive/html/gnutls-devel/2008-08/msg00005.html"
@@ -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"}