diff options
Diffstat (limited to 'src/dns/nm-dns-unbound.c')
-rw-r--r-- | src/dns/nm-dns-unbound.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dns/nm-dns-unbound.c b/src/dns/nm-dns-unbound.c index 0d2dc0adb2..e86e51e08a 100644 --- a/src/dns/nm-dns-unbound.c +++ b/src/dns/nm-dns-unbound.c @@ -45,6 +45,7 @@ update (NMDnsPlugin *plugin, { char *argv[] = { DNSSEC_TRIGGER_SCRIPT, "--async", "--update", NULL }; int status; + gboolean success; /* TODO: We currently call a script installed with the dnssec-trigger * package that queries all information itself. Later, the dependency @@ -56,8 +57,14 @@ update (NMDnsPlugin *plugin, * may be eventually merged into NetworkManager. */ if (!g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, NULL, NULL, &status, NULL)) - return FALSE; - return (status == 0); + success = FALSE; + else + success = (status == 0); + + nm_dns_plugin_set_state (plugin, + success ? NM_DNS_PLUGIN_STATE_RUNNING : NM_DNS_PLUGIN_STATE_FAILED); + + return success; } static const char * |