[packages] ntpd: allow coexistence with BusyBox ntpd by placing the deamon into /sbin and removing/adding the busybox ntpd symlink in postinst/prerm
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28572 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
6b74935a23
commit
09884cfef8
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ntp
|
||||
PKG_VERSION:=4.2.6p4
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
|
||||
@ -117,8 +117,8 @@ ifeq ($(BUILD_VARIANT),ssl)
|
||||
endif
|
||||
|
||||
define Package/ntpd/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_CONF) ./files/ntp.conf $(1)/etc/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
@ -127,6 +127,18 @@ define Package/ntpd/install
|
||||
$(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
|
||||
endef
|
||||
|
||||
define Package/ntpd/postinst
|
||||
#!/bin/sh
|
||||
[ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd"
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/ntpd/postrm
|
||||
#!/bin/sh
|
||||
/bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd
|
||||
exit 0
|
||||
endef
|
||||
|
||||
Package/ntpd-ssl/conffiles = $(Package/ntpd/conffiles)
|
||||
Package/ntpd-ssl/install = $(Package/ntpd/install)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2006-2008 OpenWrt.org
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
|
||||
START=65
|
||||
|
||||
@ -9,7 +9,7 @@ start() {
|
||||
# ln -sf /dev/ttyS0 /dev/gps0
|
||||
# /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
|
||||
stop
|
||||
/usr/sbin/ntpd -g -p $PIDFILE
|
||||
/sbin/ntpd -g -p $PIDFILE
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user