From: kremlin Date: Wed, 15 Oct 2014 02:36:48 +0000 (-0400) Subject: add NTP property code. and timedated is done! (except for undocumented properties) X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systembsd.git;a=commitdiff_plain;h=1a3832891aadfbe96a6b25e2031c1d3de0467767 add NTP property code. and timedated is done! (except for undocumented properties) --- 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