Fix postinstallation script errors
[openwrt/svn-archive/archive.git] / net / ntpd / Makefile
index 181ad0e1239491a90cf0116aa3886aa7fc16094c..70c37d3e962d99e3aef15d8dcb89031dabaa93d3 100644 (file)
@@ -35,6 +35,12 @@ define Package/ntpd/conffiles
 /etc/ntp.conf
 endef
 
 /etc/ntp.conf
 endef
 
+define Package/ntpd/postinst
+#!/bin/sh
+echo "ntp             123/udp     # Network Time Protocol
+ntp             123/tcp     # Network Time Protocol" >> $${IPKG_INSTROOT}/etc/services
+endef
+
 define Build/Configure
        $(call Build/Configure/Default, \
                 --disable-all-clocks \
 define Build/Configure
        $(call Build/Configure/Default, \
                 --disable-all-clocks \
@@ -60,9 +66,9 @@ define Package/ntpd/install
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DATA) ./files/ntp.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DATA) ./files/ntp.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_DATA) ./files/ntpd.init $(1)/etc/init.d/ntpd
+       $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
        $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
        $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
-       $(INSTALL_DATA) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
+       $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
 endef
 
 $(eval $(call BuildPackage,ntpd))
 endef
 
 $(eval $(call BuildPackage,ntpd))