From 1a3832891aadfbe96a6b25e2031c1d3de0467767 Mon Sep 17 00:00:00 2001 From: kremlin Date: Tue, 14 Oct 2014 22:36:48 -0400 Subject: [PATCH] add NTP property code. and timedated is done! (except for undocumented properties) --- src/interfaces/timedated/timedated.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/interfaces/timedated/timedated.c b/src/interfaces/timedated/timedated.c index 59ed12b..dfe5b73 100644 --- a/src/interfaces/timedated/timedated.c +++ b/src/interfaces/timedated/timedated.c @@ -396,9 +396,7 @@ our_get_timezone() { if(hash_to_match) g_free(hash_to_match); } - - - + return ret; } @@ -422,9 +420,18 @@ our_get_can_ntp() { gboolean our_get_ntp() { - const gboolean ret = FALSE; + int system_ret; - return ret; + if((system_ret = system("rcctl check ntpd > /dev/null 2>&1")) == -1) { + + g_printf("failed to check NTP status with rcctl\n"); + return FALSE; + } + + if(system_ret) + return FALSE; + + return TRUE; } gboolean -- 2.41.0