nm-online: fix considering the --quiet option

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-03-12 14:44:27 +01:00 committed by Jiří Klimeš
parent ea962ce411
commit 0a85bff70a

View file

@ -106,7 +106,6 @@ main (int argc, char *argv[])
{
gint t_secs = -1;
gboolean exit_no_nm = FALSE;
gboolean quiet = FALSE;
gboolean wait_startup = FALSE;
Timeout timeout;
GOptionContext *opt_ctx = NULL;
@ -118,11 +117,13 @@ main (int argc, char *argv[])
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>"},
{"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},
{NULL}
};
timeout.quiet = FALSE;
/* Set locale to be able to use environment variables */
setlocale (LC_ALL, "");