]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/misc-progs/restartntpd.c
Timectrl geschrieben.
[people/pmueller/ipfire-2.x.git] / src / misc-progs / restartntpd.c
diff --git a/src/misc-progs/restartntpd.c b/src/misc-progs/restartntpd.c
deleted file mode 100644 (file)
index 416f5ce..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* IPFire helper program - restartntpd
- *
- * Starts or stops the ntpd daemon
- * 
- */
-         
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include "setuid.h"
-
-
-int main(void)
-{
-       int fd = -1;
-       int enable = 0;
-
-       if (!(initsetuid()))
-               exit(1);
-       
-       safe_system("/etc/rc.d/init.d/ntp stop 2>&1 >/dev/null");
-       sleep(3);
-
-       if ((fd = open(CONFIG_ROOT "/time/allowclients", O_RDONLY)) != -1)
-       {
-               close(fd);
-               enable = 1;
-       }
-
-       if (enable)
-       {
-               safe_system("/etc/rc.d/init.d/ntp start 2>&1 >/dev/null");
-       }
-       return 0;
-}