diff options
author | kremlin <ian@kremlin.cc> | 2014-10-15 10:36:48 +0800 |
---|---|---|
committer | kremlin <ian@kremlin.cc> | 2014-10-15 10:36:48 +0800 |
commit | 1a3832891aadfbe96a6b25e2031c1d3de0467767 (patch) | |
tree | a5b10b1fb017773b9eb4103c80903f983ad77a33 /src/interfaces | |
parent | 0280f7d263465dbe043b354815b5ba1602ff17ae (diff) | |
download | systembsd-1a3832891aadfbe96a6b25e2031c1d3de0467767.tar systembsd-1a3832891aadfbe96a6b25e2031c1d3de0467767.tar.gz systembsd-1a3832891aadfbe96a6b25e2031c1d3de0467767.tar.bz2 systembsd-1a3832891aadfbe96a6b25e2031c1d3de0467767.tar.lz systembsd-1a3832891aadfbe96a6b25e2031c1d3de0467767.tar.xz systembsd-1a3832891aadfbe96a6b25e2031c1d3de0467767.tar.zst systembsd-1a3832891aadfbe96a6b25e2031c1d3de0467767.zip |
add NTP property code. and timedated is done! (except for undocumented properties)
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/timedated/timedated.c | 17 |
1 files 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 |