be needed by both m-host and m-auth for communicating with keyservers.
-# function to run command as monkeysphere user
-su_monkeysphere_user() {
- # if the current user is the monkeysphere user, then just eval
- # command
- if [ $(id -un) = "$MONKEYSPHERE_USER" ] ; then
- eval "$@"
-
- # otherwise su command as monkeysphere user
- else
- su "$MONKEYSPHERE_USER" -c "$@"
- fi
-}
-
# function to interact with the gpg core keyring
gpg_core() {
GNUPGHOME="$GNUPGHOME_CORE"
# function to interact with the gpg core keyring
gpg_core() {
GNUPGHOME="$GNUPGHOME_CORE"
SUBCOMMAND="$1"
shift
case "$SUBCOMMAND" in
SUBCOMMAND="$1"
shift
case "$SUBCOMMAND" in
-# function to run command as monkeysphere user
-su_monkeysphere_user() {
- # if the current user is the monkeysphere user, then just eval
- # command
- if [ $(id -un) = "$MONKEYSPHERE_USER" ] ; then
- eval "$@"
-
- # otherwise su command as monkeysphere user
- else
- su "$MONKEYSPHERE_USER" -c "$@"
- fi
-}
-
# function to interact with the gpg keyring
gpg_host() {
GNUPGHOME="$GNUPGHOME_HOST" gpg "$@"
# function to interact with the gpg keyring
gpg_host() {
GNUPGHOME="$GNUPGHOME_HOST" gpg "$@"
+# run command as monkeysphere user
+su_monkeysphere_user() {
+ # if the current user is the monkeysphere user, then just eval
+ # command
+ if [ $(id -un) = "$MONKEYSPHERE_USER" ] ; then
+ eval "$@"
+
+ # otherwise su command as monkeysphere user
+ else
+ su "$MONKEYSPHERE_USER" -c "$@"
+ fi
+}
+
# cut out all comments(#) and blank lines from standard input
meat() {
grep -v -e "^[[:space:]]*#" -e '^$' "$1"
# cut out all comments(#) and blank lines from standard input
meat() {
grep -v -e "^[[:space:]]*#" -e '^$' "$1"