From 44f09b2c4ac51815b8996ff637b78c0a462e5382 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 12 Jul 2013 17:11:54 +0200 Subject: add ntpd support for mpdbox, fix smbclient package --- package/busybox/Makefile | 2 +- package/busybox/config/networking/Config.in | 2 +- package/busybox/files/busybox.postinst | 2 ++ package/busybox/files/ntpd.init | 27 +++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 package/busybox/files/ntpd.init (limited to 'package/busybox') diff --git a/package/busybox/Makefile b/package/busybox/Makefile index 9fe1ef52a..7ab3da9db 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= busybox PKG_VERSION:= 1.20.2 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= e025414bc6cd79579cc7a32a45d3ae1c PKG_DESCR:= Core utilities for embedded systems PKG_SECTION:= base diff --git a/package/busybox/config/networking/Config.in b/package/busybox/config/networking/Config.in index 233ee996d..0ca0c3525 100644 --- a/package/busybox/config/networking/Config.in +++ b/package/busybox/config/networking/Config.in @@ -755,7 +755,7 @@ config BUSYBOX_NTPD config BUSYBOX_FEATURE_NTPD_SERVER bool "Make ntpd usable as a NTP server" - default y + default n depends on BUSYBOX_NTPD help Make ntpd usable as a NTP server. If you disable this option 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 $? -- cgit v1.2.3