[packages_10.03.2] bird: merge r28243, r29079, r29199
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 15:04:57 +0000 (15:04 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Feb 2012 15:04:57 +0000 (15:04 +0000)
SVN-Revision: 30196

net/bird/Makefile
net/bird/files/bird4.init
net/bird/files/bird4loop
net/bird/files/bird6.init
net/bird/files/bird6loop

index fa12dacc81ad73e4a0060de20b77ae0a07d9d408..60cf7af7a180d62090bde857f6ec2dc0c39c1719 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bird
-PKG_VERSION:=1.3.1
-PKG_RELEASE:=1
+PKG_VERSION:=1.3.3
+PKG_RELEASE:=3
 
 PKG_SOURCE:=bird-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://bird.network.cz/pub/bird
-PKG_MD5SUM:=d11f53b79c7371b76e5c93209dbe2a10
+PKG_MD5SUM:=d463c2ec9478cbadbcb2d3a3c0cc40d5
 PKG_BUILD_DEPENDS:=libncurses libreadline
 
 include $(INCLUDE_DIR)/package.mk
@@ -138,6 +138,10 @@ define Package/bird$(2)/install
 
 endef
 
+define Package/bird$(2)/conffiles
+/etc/bird$(2).conf
+endef
+
 define Package/birdc$(2)/install
        $(INSTALL_DIR) $$(1)/usr/sbin
        $(INSTALL_BIN) $$(PKG_BUILD_DIR)/birdc$(2) $$(1)/usr/sbin/
index d0e0876e95a801c5dd00d08574018e56e79d8b39..8ac5e759137440cb64e1c514756658aa50e838e9 100644 (file)
@@ -1,22 +1,21 @@
 #!/bin/sh /etc/rc.common
+# Copyright (C) 2010-2011 OpenWrt.org
 
 START=50
 
-# Birdloop is used to restart BIRD if it crashed. Unfortunately, it also
-# hides and handles in the same manner start-time errors (like parse error
-# in config file). Therefore, it is not used by default. If you want to
-# use it, comment the first line and uncomment the second line in start().
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
 
 start() {
-       /usr/sbin/bird4
-#      /usr/sbin/bird4loop
+       service_start /usr/sbin/bird4 -d
+#      ( SERVICE_MATCH_NAME=1 service_start /usr/sbin/bird4loop )
 }
 
 stop() {
-       killall bird4
-       sleep 1
+#      ( SERVICE_MATCH_NAME=1 service_stop /usr/sbin/bird4loop )
+       service_stop /usr/sbin/bird4
 }
 
 reload() {
-       killall -HUP bird4
+       service_reload /usr/sbin/bird4
 }
index 9d9b80dd8c6fc8d116b09e7dfbe350aa37ad3aad..5dd6b95c926b715f2490fe5f4c1d4efefc0955b4 100644 (file)
@@ -2,11 +2,22 @@
 
 BIRD=/usr/sbin/bird4
 
-$BIRD -p
+$BIRD -p || return 1
 
-( until $BIRD -d "$@"
-do
-       logger error BIRD4 died!
-       sleep 2
-done; ) </dev/null >/dev/null 2> /dev/null &
+. /lib/functions.sh
 
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
+
+sig_handler() {
+       running=0
+       service_stop $BIRD
+}
+
+running=1
+trap sig_handler INT
+trap sig_handler TERM
+while [ $running -gt 0 ]; do
+       service_check $BIRD || service_start $BIRD -d "$@"
+       sleep 3
+done
index 69b39ff148a3dedb88ef0e811c50f191e73c08b7..2efb4f0963c181106e50bd69c33ad984624d58c9 100644 (file)
@@ -1,22 +1,21 @@
 #!/bin/sh /etc/rc.common
+# Copyright (C) 2010-2011 OpenWrt.org
 
 START=50
 
-# Birdloop is used to restart BIRD if it crashed. Unfortunately, it also
-# hides and handles in the same manner start-time errors (like parse error
-# in config file). Therefore, it is not used by default. If you want to
-# use it, comment the first line and uncomment the second line in start().
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
 
 start() {
-       /usr/sbin/bird6
-#      /usr/sbin/bird6loop
+       service_start /usr/sbin/bird6 -d
+#      ( SERVICE_MATCH_NAME=1 service_start /usr/sbin/bird6loop )
 }
 
 stop() {
-       killall bird6
-       sleep 1
+#      ( SERVICE_MATCH_NAME=1 service_stop /usr/sbin/bird6loop )
+       service_stop /usr/sbin/bird6
 }
 
 reload() {
-       killall -HUP bird6
+       service_reload /usr/sbin/bird6
 }
index 5692125856c3e65b4ba826c8adaa9f90966d9253..46f498a06bae7247d0f5cbbb6e9e920f7ad0f9f6 100644 (file)
@@ -2,11 +2,22 @@
 
 BIRD=/usr/sbin/bird6
 
-$BIRD -p
+$BIRD -p || return 1
 
-( until $BIRD -d "$@"
-do
-       logger error BIRD6 died!
-       sleep 2
-done; ) </dev/null >/dev/null 2> /dev/null &
+. /lib/functions.sh
 
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
+
+sig_handler() {
+       running=0
+       service_stop $BIRD
+}
+
+running=1
+trap sig_handler INT
+trap sig_handler TERM
+while [ $running -gt 0 ]; do
+       service_check $BIRD || service_start $BIRD -d "$@"
+       sleep 3
+done