summaryrefslogtreecommitdiff
path: root/package/busybox/files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-07-12 17:11:54 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2013-07-12 17:11:54 +0200
commit44f09b2c4ac51815b8996ff637b78c0a462e5382 (patch)
tree4d5837afe92f6a59470c7d99f83a54e23a68330a /package/busybox/files
parent1a70ec52e7a97c6255421bee8ec0341bec623085 (diff)
add ntpd support for mpdbox, fix smbclient package
Diffstat (limited to 'package/busybox/files')
-rw-r--r--package/busybox/files/busybox.postinst2
-rw-r--r--package/busybox/files/ntpd.init27
2 files changed, 29 insertions, 0 deletions
diff --git a/package/busybox/files/busybox.postinst b/package/busybox/files/busybox.postinst
index f9f8e212b..c71a536ce 100644
--- a/package/busybox/files/busybox.postinst
+++ b/package/busybox/files/busybox.postinst
@@ -7,3 +7,5 @@ add_rcconf watchdog watchdog NO
add_rcconf watchdog_flags watchdog_flags '-t 10 -T 20'
add_rcconf 'use "-C32" normally, "NO" to disable' syslogd_flags '-C32'
add_rcconf inetd inetd NO
+add_rcconf ntpd ntpd NO
+add_rcconf ntpd_flags ntpd_flags '-p time.fu-berlin.de'
diff --git a/package/busybox/files/ntpd.init b/package/busybox/files/ntpd.init
new file mode 100644
index 000000000..180f161a7
--- /dev/null
+++ b/package/busybox/files/ntpd.init
@@ -0,0 +1,27 @@
+#!/bin/sh
+#PKG busybox
+#INIT 60
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${ntpd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ /usr/sbin/ntpd $ntpd_flags
+ ;;
+stop)
+ kill $(pgrep -f /usr/sbin/ntpd)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?