add setup subcommand call to ms-authentication, and more fixes to tests
[monkeysphere.git] / src / monkeysphere-authentication
index 56a8877d4293bf811fe7833c681ed8506ae2dcc8..4aaf02d41d18b19dfe28445689cc604d9b245aa5 100755 (executable)
@@ -12,8 +12,6 @@
 # version 3 or later.
 
 ########################################################################
-set -e
-
 PGRM=$(basename $0)
 
 SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"/usr/share/monkeysphere"}
@@ -49,6 +47,7 @@ usage: $PGRM <subcommand> [options] [args]
 Monkeysphere authentication admin tool.
 
 subcommands:
+ setup (s)                           setup monkeysphere user authentication
  update-users (u) [USER]...          update user authorized_keys files
  add-id-certifier (c+) KEYID         import and tsign a certification key
    --domain (-n) DOMAIN                limit ID certifications to DOMAIN
@@ -57,9 +56,8 @@ subcommands:
  remove-id-certifier (c-) KEYID      remove a certification key
  list-id-certifiers (c)              list certification keys
 
- expert
-  diagnostics (d)                    monkeysphere authentication status
-  gpg-cmd CMD                        execute gpg command
+ expert <expert-subcommand>          run expert command
+ expert help                         expert command help
 
  version (v)                         show version number
  help (h,?)                          this help
@@ -158,6 +156,11 @@ COMMAND="$1"
 shift
 
 case $COMMAND in
+    'setup'|'setup'|'s')
+       source "${MASHAREDIR}/setup"
+       setup "$@"
+       ;;
+
     'update-users'|'update-user'|'u')
        source "${MASHAREDIR}/update_users"
        update_users "$@"
@@ -182,6 +185,17 @@ case $COMMAND in
        SUBCOMMAND="$1"
        shift
        case "$SUBCOMMAND" in
+           'help'|'h'|'?')
+               cat <<EOF
+usage: $PGRM expert <subcommand> [options] [args]
+
+expert subcommands:
+ diagnostics (d)                     monkeysphere authentication status
+ gpg-cmd CMD                         execute gpg command
+
+EOF
+               ;;
+
            'diagnostics'|'d')
                source "${MASHAREDIR}/diagnostics"
                diagnostics