diff --git a/cf-check/cf-check.c b/cf-check/cf-check.c index 46520c69d9..1fbdb69cab 100644 --- a/cf-check/cf-check.c +++ b/cf-check/cf-check.c @@ -130,7 +130,7 @@ int main(int argc, const char *const *argv) int c = 0; int start_index = 1; - const char *optstr = "+hMg:dvI"; // + means stop for non opt arg. :) + const char *optstr = "+hMVg:dvI"; // + means stop for non opt arg. :) while ((c = getopt_long(argc, (char *const *) argv, optstr, OPTIONS, &start_index)) != -1) { diff --git a/cf-execd/cf-execd.c b/cf-execd/cf-execd.c index 56ac5d7a58..d3b084ce60 100644 --- a/cf-execd/cf-execd.c +++ b/cf-execd/cf-execd.c @@ -240,7 +240,7 @@ static GenericAgentConfig *CheckOpts(int argc, char **argv) int longopt_idx; - while ((c = getopt_long(argc, argv, "dvnKIf:g:D:N:VxL:hFOV1gMWC::l", + while ((c = getopt_long(argc, argv, "dvnKIf:g:D:N:VxL:hFOVgMWC::l", OPTIONS, &longopt_idx)) != -1) { diff --git a/cf-monitord/cf-monitord.c b/cf-monitord/cf-monitord.c index bc3c787164..d4281b2475 100644 --- a/cf-monitord/cf-monitord.c +++ b/cf-monitord/cf-monitord.c @@ -163,7 +163,7 @@ static GenericAgentConfig *CheckOpts(int argc, char **argv) GenericAgentConfig *config = GenericAgentConfigNewDefault(AGENT_TYPE_MONITOR, GetTTYInteractive()); int longopt_idx; - while ((c = getopt_long(argc, argv, "dvnIf:g:VSxHTKMFhC::l", + while ((c = getopt_long(argc, argv, "dvnIf:g:VxHTKMFhC::l", OPTIONS, &longopt_idx)) != -1) { switch (c) diff --git a/cf-net/cf-net.c b/cf-net/cf-net.c index c20254035b..aaf8c7f4d2 100644 --- a/cf-net/cf-net.c +++ b/cf-net/cf-net.c @@ -304,7 +304,7 @@ static int CFNetParse(int argc, char **argv, *hostnames = NULL; int c = 0; int start_index = 1; - const char *optstr = "+hMg:H:p:sdvI"; // + means stop for non opt arg. :) + const char *optstr = "+hMg:H:p:sdvIt:c:"; // + means stop for non opt arg. :) while ((c = getopt_long(argc, argv, optstr, OPTIONS, &start_index)) != -1) { diff --git a/cf-promises/cf-promises.c b/cf-promises/cf-promises.c index 022fe5b64f..ce10c61574 100644 --- a/cf-promises/cf-promises.c +++ b/cf-promises/cf-promises.c @@ -263,7 +263,7 @@ GenericAgentConfig *CheckOpts(int argc, char **argv) GenericAgentConfig *config = GenericAgentConfigNewDefault(AGENT_TYPE_COMMON, GetTTYInteractive()); int longopt_idx; - while ((c = getopt_long(argc, argv, "dvnIw:f:g:D:N:VSrxMb:i:p:s:cg:hW:C::T:l", + while ((c = getopt_long(argc, argv, "dvnIw:f:g:D:N:VrxMb:p:s:cg:hW:C::T:l", OPTIONS, &longopt_idx)) != -1) { diff --git a/cf-runagent/cf-runagent.c b/cf-runagent/cf-runagent.c index b465afb361..ae0f85d4b9 100644 --- a/cf-runagent/cf-runagent.c +++ b/cf-runagent/cf-runagent.c @@ -111,6 +111,7 @@ static const struct option OPTIONS[] = {"verbose", no_argument, 0, 'v'}, {"log-level", required_argument, 0, 'g'}, {"dry-run", no_argument, 0, 'n'}, + {"no-lock", no_argument, 0, 'K'}, {"version", no_argument, 0, 'V'}, {"file", required_argument, 0, 'f'}, {"define-class", required_argument, 0, 'D'}, @@ -138,6 +139,7 @@ static const char *const HINTS[] = "Output verbose information about the behaviour of cf-runagent", "Specify how detailed logs should be. Possible values: 'error', 'warning', 'notice', 'info', 'verbose', 'debug'", "All talk and no action mode - make no changes, only inform of promises not kept", + "Ignore locking constraints during execution (ifelapsed/expireafter) if \"too soon\" to run", "Output the version of the software", "Specify an alternative input file than the default. This option is overridden by FILE if supplied as argument.", "Define a list of comma separated classes to be sent to a remote agent", @@ -326,7 +328,7 @@ static GenericAgentConfig *CheckOpts(int argc, char **argv) REMOTEBUNDLES[0] = '\0'; int longopt_idx; - while ((c = getopt_long(argc, argv, "t:q:db::vnKhIif:g:D:VSxo:s:MH:C::l", + while ((c = getopt_long(argc, argv, "t:db::vnKhIif:g:D:Vxo:s:MH:C::l", OPTIONS, &longopt_idx)) != -1) { diff --git a/cf-secret/cf-secret.c b/cf-secret/cf-secret.c index d446117e93..9d40269bb7 100644 --- a/cf-secret/cf-secret.c +++ b/cf-secret/cf-secret.c @@ -888,7 +888,7 @@ int main(int argc, char *argv[]) } int c = 0; - while ((c = getopt_long(argc - offset, argv + offset, "hMedk:o:H:", OPTIONS, NULL)) != -1) + while ((c = getopt_long(argc - offset, argv + offset, "hMdvIg:k:o:H:", OPTIONS, NULL)) != -1) { switch (c) { diff --git a/cf-serverd/cf-serverd-functions.c b/cf-serverd/cf-serverd-functions.c index 8e4d352780..b52be4d7c7 100644 --- a/cf-serverd/cf-serverd-functions.c +++ b/cf-serverd/cf-serverd-functions.c @@ -174,7 +174,7 @@ GenericAgentConfig *CheckOpts(int argc, char **argv) GenericAgentConfig *config = GenericAgentConfigNewDefault(AGENT_TYPE_SERVER, GetTTYInteractive()); int longopt_idx; - while ((c = getopt_long(argc, argv, "dvIKf:g:D:N:VSxLFMhAC::lt::", + while ((c = getopt_long(argc, argv, "dvIKf:g:D:N:VxL:FMhAC::lt::", OPTIONS, &longopt_idx)) != -1) { diff --git a/cf-testd/cf-testd.c b/cf-testd/cf-testd.c index d195a46142..f5cde968b6 100644 --- a/cf-testd/cf-testd.c +++ b/cf-testd/cf-testd.c @@ -163,7 +163,7 @@ CFTestD_Config *CFTestD_CheckOpts(int argc, char **argv, long *n_threads) CFTestD_Config *config = CFTestD_ConfigInit(); assert(config != NULL); - while ((c = getopt_long(argc, argv, "a:df:g:hIj:k:lp:vV", OPTIONS, NULL)) != -1) + while ((c = getopt_long(argc, argv, "a:dg:hIj:k:lp:r:vV", OPTIONS, NULL)) != -1) { switch (c) {