Browse Source

aiccu: Add NTP hotplug hook

This hook simply writes current stratum to /var/run/aiccu_ntp_stratum,
from where it is read by aiccu proto script.

Signed-off-by: Ondrej Caletka <Ondrej@Caletka.cz>
Ondřej Caletka 10 years ago
parent
commit
6f70462952
2 changed files with 6 additions and 2 deletions
  1. 3
    2
      ipv6/aiccu/Makefile
  2. 3
    0
      ipv6/aiccu/files/aiccu.hotplug

+ 3
- 2
ipv6/aiccu/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=aiccu
11 11
 PKG_VERSION:=20070115
12
-PKG_RELEASE:=11
12
+PKG_RELEASE:=12
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=http://www.sixxs.net/archive/sixxs/aiccu/unix
@@ -47,9 +47,10 @@ define Package/aiccu/conffiles
47 47
 endef
48 48
 
49 49
 define Package/aiccu/install
50
-	$(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/netifd/proto
50
+	$(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/netifd/proto $(1)/etc/hotplug.d/ntp
51 51
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(1)/usr/sbin/
52 52
 	$(INSTALL_BIN) ./files/aiccu.sh $(1)/lib/netifd/proto/aiccu.sh
53
+	$(INSTALL_DATA) ./files/aiccu.hotplug $(1)/etc/hotplug.d/ntp/10-aiccu
53 54
 endef
54 55
 
55 56
 $(eval $(call BuildPackage,aiccu))

+ 3
- 0
ipv6/aiccu/files/aiccu.hotplug View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+NTPSTRATUMFILE="/var/run/aiccu_ntp_stratum"
3
+echo $stratum > "$NTPSTRATUMFILE"