summaryrefslogtreecommitdiffabout
path: root/src/startstop.c
authorSergey Poznyakoff <gray@gnu.org.ua>2015-02-02 12:53:19 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2015-02-02 13:12:25 (GMT)
commit4a72c67c34b1c5b348e61ab900fb0b64305b9f97 (patch) (side-by-side diff)
treebd3c91c42a14ac50f2406ba8153b04d2099cd9ab /src/startstop.c
parentf9536d8285625d4263c5b2dd0ab2a6773dd2b618 (diff)
downloadeclat-4a72c67c34b1c5b348e61ab900fb0b64305b9f97.tar.gz
eclat-4a72c67c34b1c5b348e61ab900fb0b64305b9f97.tar.bz2
New options: --check-permissions and --add-parameter
* NEWS: Update. * doc/eclat-stop.1: Update. * doc/eclat.1man: Update. * etc/default.fln: Special handling for DryRunOperation and UnauthorizedOperation codes. * lib/paramlist.c: New file. * lib/Makefile.am (libeclat_a_SOURCES): Add paramlist.c * lib/forlan.c: New function dequote. * lib/libeclat.h (eclat_request_add_param0) (ec2_param_free, ec2_param_list_create) (ec2_param_list_append) (eclat_request_add_param_list): New protos. * lib/reqcreat.c (ec2_param_free): Remove static qualifier. * src/stop-cl.opt: New file. * src/Makefile.am (OPTFILES): Add stop-cl.opt * src/cmdline.opt: New options: --check-permissions and --add-parameter. * src/eclat.c (extra_param): New global. (find_format): print error message if no such format is found. * src/startstop.c (eclat_stop_instance): Use parse_stop_options
Diffstat (limited to 'src/startstop.c') (more/less context) (show whitespace changes)
-rw-r--r--src/startstop.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/startstop.c b/src/startstop.c
index f5346c4..98f4e12 100644
--- a/src/startstop.c
+++ b/src/startstop.c
@@ -58,22 +58,26 @@ eclat_start_instance(eclat_command_env_t *env, int argc, char **argv)
argc, argv, &i);
debug(ECLAT_DEBCAT_MAIN, 1, ("starting instances"));
return start_stop_instance(env, argc - i, argv + i);
}
+
+static int force;
+
+#include "stop-cl.h"
+
int
eclat_stop_instance(eclat_command_env_t *env, int argc, char **argv)
{
int i;
- parse_options(env->cmd,
- "Stop named instances",
- argc, argv, &i);
-
+ parse_stop_options(env, argc, argv, &i);
debug(ECLAT_DEBCAT_MAIN, 1, ("stopping instances"));
+ if (force)
+ eclat_request_add_param(env->request, "Force", "1");
return start_stop_instance(env, argc - i, argv + i);
}
int
eclat_reboot_instance(eclat_command_env_t *env, int argc, char **argv)
{

Return to:

Send suggestions and report system problems to the System administrator.