users: Improve diagnostics

- Move diagnostics into main module instead of action script.

- Ability run diagnostics as non-root user (because it runs in Plinth
  instead of action).

- Diagnose whether LDAP server is listening.

- Diagnose directory entities created during setup.
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2015-08-29 06:22:01 -04:00
1 parent 0febeb7244
commit 4210332bf6
3 files changed
+31 -19

No files matched your search

-14
View File
@@ -121,17 +121,6 @@ remove_user_from_group()
}
diagnose()
{
result="failed"
if lsldap | grep 'dn: dc=thisbox' > /dev/null; then
result="passed"
fi
echo "[[\"Access LDAP server locally\", \"$result\"]]"
}
setup()
{
# XXX: Password setting on users is disabled as changing passwords
@@ -174,9 +163,6 @@ case $command in
remove-user-from-group)
remove_user_from_group "$@"
;;
diagnose)
diagnose "$@"
;;
*)
echo "Invalid sub-command"
exit -1