projects
/
systembsd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0280f7d
)
add NTP property code. and timedated is done! (except for undocumented properties)
author
kremlin
<ian@kremlin.cc>
Wed, 15 Oct 2014 02:36:48 +0000
(22:36 -0400)
committer
kremlin
<ian@kremlin.cc>
Wed, 15 Oct 2014 02:36:48 +0000
(22:36 -0400)
src/interfaces/timedated/timedated.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/timedated/timedated.c
b/src/interfaces/timedated/timedated.c
index 59ed12bc60b3c32f31208eb75e6e1182288b9631..dfe5b7347c4a67b2591427909b17ecc4a97dbf34 100644
(file)
--- 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