projects
/
monkeysphere.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'dkg/master'
[monkeysphere.git]
/
src
/
common
diff --git
a/src/common
b/src/common
index 51b04708e1e34ca13dbc4d9d4d0a591211200c4d..5df8f6a7198a158db439ee0c1e124012fc6c87a4 100644
(file)
--- a/
src/common
+++ b/
src/common
@@
-1,4
+1,5
@@
# -*-shell-script-*-
# -*-shell-script-*-
+# This should be sourced by bash (though we welcome changes to make it POSIX sh compliant)
# Shared sh functions for the monkeysphere
#
# Shared sh functions for the monkeysphere
#
@@
-19,6
+20,9
@@
SYSCONFIGDIR=${MONKEYSPHERE_SYSCONFIGDIR:-"/etc/monkeysphere"}
export SYSCONFIGDIR
SYSCONFIGDIR=${MONKEYSPHERE_SYSCONFIGDIR:-"/etc/monkeysphere"}
export SYSCONFIGDIR
+# monkeysphere version
+VERSION=__VERSION__
+
########################################################################
### UTILITY FUNCTIONS
########################################################################
### UTILITY FUNCTIONS
@@
-147,7
+151,7
@@
advance_date() {
local shortunits
# try things the GNU way first
local shortunits
# try things the GNU way first
- if date -d "$number $longunits" "$format" >
&/dev/null
; then
+ if date -d "$number $longunits" "$format" >
/dev/null 2>&1
; then
date -d "$number $longunits" "$format"
else
# otherwise, convert to (a limited version of) BSD date syntax:
date -d "$number $longunits" "$format"
else
# otherwise, convert to (a limited version of) BSD date syntax:
@@
-671,7
+675,7
@@
process_user_id() {
else
log debug " - unacceptable primary key."
if [ -z "$sshKey" ] ; then
else
log debug " - unacceptable primary key."
if [ -z "$sshKey" ] ; then
- log
error
" ! primary key could not be translated (not RSA or DSA?)."
+ log
debug
" ! primary key could not be translated (not RSA or DSA?)."
else
echo "1:${sshKey}"
fi
else
echo "1:${sshKey}"
fi
@@
-729,7
+733,7
@@
process_user_id() {
else
log debug " - unacceptable sub key."
if [ -z "$sshKey" ] ; then
else
log debug " - unacceptable sub key."
if [ -z "$sshKey" ] ; then
- log
error
" ! sub key could not be translated (not RSA or DSA?)."
+ log
debug
" ! sub key could not be translated (not RSA or DSA?)."
else
echo "1:${sshKey}"
fi
else
echo "1:${sshKey}"
fi