X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systembsd.git;a=blobdiff_plain;f=src%2Finterfaces%2Ftimedated%2Ftimedated.c;h=dfe5b7347c4a67b2591427909b17ecc4a97dbf34;hp=59ed12bc60b3c32f31208eb75e6e1182288b9631;hb=1a3832891aadfbe96a6b25e2031c1d3de0467767;hpb=0280f7d263465dbe043b354815b5ba1602ff17ae 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