summaryrefslogtreecommitdiff
path: root/tui
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2013-12-18 12:54:27 -0500
committerDan Winship <danw@gnome.org>2014-01-16 09:19:06 -0500
commitbbb416a6a7e229375255fd22e198f03f0c469c67 (patch)
tree976bc5e5b04178d8c485aea106f6474057161471 /tui
parent034d812433e68054354b4b0f847089a7d55f2499 (diff)
downloadNetworkManager-bbb416a6a7e229375255fd22e198f03f0c469c67.tar.gz
tui: error out if NM is not running
Diffstat (limited to 'tui')
-rw-r--r--tui/nmtui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tui/nmtui.c b/tui/nmtui.c
index f79554a2e6..078141ece0 100644
--- a/tui/nmtui.c
+++ b/tui/nmtui.c
@@ -214,6 +214,10 @@ main (int argc, char **argv)
g_option_context_free (opts);
nm_client = nm_client_new ();
+ if (!nm_client_get_manager_running (nm_client)) {
+ g_printerr (_("NetworkManager is not running.\n"));
+ exit (1);
+ }
nm_settings = nm_remote_settings_new (NULL);
g_signal_connect (nm_settings, NM_REMOTE_SETTINGS_CONNECTIONS_READ,