Build and run both IPv4 and IPv6.

This commit is contained in:
Ondrej Filip 2004-06-07 14:38:35 +00:00
parent ff61673427
commit 6721e2862b
2 changed files with 44 additions and 21 deletions

View file

@ -15,38 +15,59 @@
# Source function library. # Source function library.
. /etc/rc.d/init.d/functions . /etc/rc.d/init.d/functions
# Check that networking is up. [ -f /etc/sysconfig/network ] || exit 0
if [ "${NETWORKING}" = "no" ]
then
exit 0
fi
[ -f /etc/bird.conf ] || exit 0 . /etc/sysconfig/network
[ -f /usr/sbin/bird ] || exit 0 BIRD4="yes"
BIRD6="yes"
[ -f /etc/bird.conf ] || BIRD4="no"
[ -f /usr/sbin/bird ] || BIRD4="no"
[ "${NETWORKING}" = "yes" ] || BIRD4="no"
[ -f /etc/bird-6.conf ] || BIRD6="no"
[ -f /usr/sbin/bird6 ] || BIRD6="no"
[ "${NETWORKING_IPV6}" = "yes" ] || BIRD6="no"
RETVAL=0 RETVAL=0
# See how we were called. # See how we were called.
case "$1" in case "$1" in
start) start)
echo -n "Starting BIRD: " if [ "$BIRD4" = "yes" ]
then
echo -n "Starting BIRD for IPv4: "
daemon bird daemon bird
RETVAL=$? RETVAL=$?
echo echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird
fi
if [ "$BIRD6" = "yes" ]
then
echo -n "Starting BIRD for IPv6: "
daemon bird6
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird6
fi
;; ;;
stop) stop)
echo -n "Stopping BIRD: " echo -n "Stopping BIRD for IPv4: "
killproc bird killproc bird
RETVAL=$? RETVAL=$?
echo echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bird [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bird
echo -n "Stopping BIRD for IPv6: "
killproc bird6
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bird6
;; ;;
status) status)
status bird status bird
status bird6
RETVAL=$? RETVAL=$?
;; ;;
restart) restart)
@ -56,6 +77,7 @@ case "$1" in
;; ;;
reload) reload)
killall -HUP bird killall -HUP bird
killall -HUP bird6
RETVAL=$? RETVAL=$?
;; ;;
*) *)

View file

@ -1,11 +1,12 @@
Summary: BIRD Internet Routing Daemon Summary: BIRD Internet Routing Daemon
Name: bird Name: bird
Version: 1.0.5 Version: 1.0.8
Release: 1 Release: 1
Copyright: GPL Copyright: GPL
Group: Networking/Daemons Group: Networking/Daemons
Source: ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz Source: ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz
Source1: bird.init Source1: bird.init
Source2: birdc6
Buildroot: /var/tmp/bird-root Buildroot: /var/tmp/bird-root
Url: http://bird.network.cz Url: http://bird.network.cz
Prereq: /sbin/chkconfig Prereq: /sbin/chkconfig
@ -18,22 +19,23 @@ protocols BGP, RIP and OSPF.
%setup -n bird-%{version} %setup -n bird-%{version}
%build %build
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run --enable-ipv6 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-ipv6
make make
mv bird bird6 mv bird bird6
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run make clean
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make make
%install %install
rm -rf $RPM_BUILD_ROOT/* rm -rf $RPM_BUILD_ROOT/*
make install prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc localstatedir=$RPM_BUILD_ROOT/var/run make install prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc localstatedir=$RPM_BUILD_ROOT/var
install bird6 $RPM_BUILD_ROOT/usr/sbin install bird6 $RPM_BUILD_ROOT/usr/sbin
cd $RPM_BUILD_ROOT cd $RPM_BUILD_ROOT
install -d etc/rc.d/init.d install -d etc/rc.d/init.d
install $RPM_SOURCE_DIR/bird.init etc/rc.d/init.d/bird install $RPM_SOURCE_DIR/bird.init etc/rc.d/init.d/bird
install $RPM_SOURCE_DIR/birdc6 usr/bin/ install $RPM_SOURCE_DIR/birdc6 usr/sbin/birdc6
%post %post
/sbin/ldconfig /sbin/ldconfig
@ -50,4 +52,3 @@ fi
%attr(755,root,root) /usr/sbin/birdc %attr(755,root,root) /usr/sbin/birdc
%attr(755,root,root) /usr/sbin/birdc6 %attr(755,root,root) /usr/sbin/birdc6
%attr(755,root,root) /etc/rc.d/init.d/bird %attr(755,root,root) /etc/rc.d/init.d/bird
%config /etc/bird.conf