Commit 0a85bff7 authored by Thomas Haller's avatar Thomas Haller Committed by Jiří Klimeš
Browse files

nm-online: fix considering the --quiet option


Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
parent ea962ce4
...@@ -106,7 +106,6 @@ main (int argc, char *argv[]) ...@@ -106,7 +106,6 @@ main (int argc, char *argv[])
{ {
gint t_secs = -1; gint t_secs = -1;
gboolean exit_no_nm = FALSE; gboolean exit_no_nm = FALSE;
gboolean quiet = FALSE;
gboolean wait_startup = FALSE; gboolean wait_startup = FALSE;
Timeout timeout; Timeout timeout;
GOptionContext *opt_ctx = NULL; GOptionContext *opt_ctx = NULL;
...@@ -118,11 +117,13 @@ main (int argc, char *argv[]) ...@@ -118,11 +117,13 @@ main (int argc, char *argv[])
GOptionEntry options[] = { GOptionEntry options[] = {
{"timeout", 't', 0, G_OPTION_ARG_INT, &t_secs, N_("Time to wait for a connection, in seconds (without the option, default value is 30)"), "<timeout>"}, {"timeout", 't', 0, G_OPTION_ARG_INT, &t_secs, N_("Time to wait for a connection, in seconds (without the option, default value is 30)"), "<timeout>"},
{"exit", 'x', 0, G_OPTION_ARG_NONE, &exit_no_nm, N_("Exit immediately if NetworkManager is not running or connecting"), NULL}, {"exit", 'x', 0, G_OPTION_ARG_NONE, &exit_no_nm, N_("Exit immediately if NetworkManager is not running or connecting"), NULL},
{"quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, N_("Don't print anything"), NULL}, {"quiet", 'q', 0, G_OPTION_ARG_NONE, &timeout.quiet, N_("Don't print anything"), NULL},
{"wait-for-startup", 's', 0, G_OPTION_ARG_NONE, &wait_startup, N_("Wait for NetworkManager startup instead of a connection"), NULL}, {"wait-for-startup", 's', 0, G_OPTION_ARG_NONE, &wait_startup, N_("Wait for NetworkManager startup instead of a connection"), NULL},
{NULL} {NULL}
}; };
timeout.quiet = FALSE;
/* Set locale to be able to use environment variables */ /* Set locale to be able to use environment variables */
setlocale (LC_ALL, ""); setlocale (LC_ALL, "");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment