[asterisk-commits] eliel: branch eliel/cli-permissions r151876 - /team/eliel/cli-permissions/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 24 08:44:48 CDT 2008


Author: eliel
Date: Fri Oct 24 08:44:47 2008
New Revision: 151876

URL: http://svn.digium.com/view/asterisk?view=rev&rev=151876
Log:
Set cli command names based on naming convention.

Modified:
    team/eliel/cli-permissions/main/cli.c

Modified: team/eliel/cli-permissions/main/cli.c
URL: http://svn.digium.com/view/asterisk/team/eliel/cli-permissions/main/cli.c?view=diff&rev=151876&r1=151875&r2=151876
==============================================================================
--- team/eliel/cli-permissions/main/cli.c (original)
+++ team/eliel/cli-permissions/main/cli.c Fri Oct 24 08:44:47 2008
@@ -72,7 +72,7 @@
 static const char perms_config[] = "permissions.conf";	/*!< CLI permissions config file. */
 int default_perm = 1;				/*!< Default permissions value 1=Permit 0=Deny */
 
-/* mutex used to prevent a user from running the 'cli permissions reload' command while
+/* mutex used to prevent a user from running the 'cli reload permissions' command while
  * it is already running. */
 AST_MUTEX_DEFINE_STATIC(permsconfiglock);
 /* List of users and permissions. */
@@ -873,7 +873,7 @@
 	return CLI_SUCCESS;
 }
 
-/*! \brief handles CLI command 'cli permissions show' */
+/*! \brief handles CLI command 'cli show permissions' */
 static char *handle_cli_permissions_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	struct usergroup_cli_perm *cp;
@@ -883,9 +883,9 @@
 
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "cli permissions show";
+		e->command = "cli show permissions";
 		e->usage =
-			"Usage: cli permissions show\n"
+			"Usage: cli show permissions\n"
 			"       Shows CLI configured permissions.\n";
 		return NULL;
 	case CLI_GENERATE:
@@ -916,14 +916,14 @@
 	return CLI_SUCCESS;
 }
 
-/*! \brief handles CLI command 'cli permissions reload' */
+/*! \brief handles CLI command 'cli reload permissions' */
 static char *handle_cli_permissions_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "cli permissions reload";
+		e->command = "cli reload permissions";
 		e->usage =
-			"Usage: cli permissions reload\n"
+			"Usage: cli reload permissions\n"
 			"       Reload the 'permissions.conf' file.\n";
 		return NULL;
 	case CLI_GENERATE:
@@ -935,7 +935,7 @@
 	return CLI_SUCCESS;
 }
 
-/*! \brief handles CLI command 'cli permissions check' */
+/*! \brief handles CLI command 'cli check permissions' */
 static char *handle_cli_permissions_check(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	struct passwd *pw = NULL;
@@ -948,9 +948,9 @@
 
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "cli permissions check";
+		e->command = "cli check permissions";
 		e->usage =
-			"Usage: cli permissions check {<username>|@<groupname>|<username>@<groupname>} [<command>]\n"
+			"Usage: cli check permissions {<username>|@<groupname>|<username>@<groupname>} [<command>]\n"
 			"       Check permissions config for a user at group or list the allowed commands for the specified user.\n"
 			"       The username or the groupname may be omitted.\n"; 
 		return NULL;
@@ -1517,7 +1517,7 @@
 	struct group *gr;
 
 	if (ast_mutex_trylock(&permsconfiglock)) {
-		ast_log(LOG_NOTICE, "You must wait until last 'cli permissions reload' command finish\n");
+		ast_log(LOG_NOTICE, "You must wait until last 'cli reload permissions' command finish\n");
 		return 1;
 	}
 




More information about the asterisk-commits mailing list