mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 08:38:42 +00:00
Added files for RPM building.
This commit is contained in:
parent
a24e315762
commit
6cf7e97abe
66
misc/bird.init
Executable file
66
misc/bird.init
Executable file
@ -0,0 +1,66 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# bird.init Starts the Internet Routing Daemon.
|
||||||
|
#
|
||||||
|
# Author: Ondrej Feela Filip, <feela@network.cz>
|
||||||
|
#
|
||||||
|
# chkconfig: - 32 75
|
||||||
|
# description: Internet routing daemon supporting IPv4 routing protocols:
|
||||||
|
# BGP4, RIPv2 and OSPFv2.
|
||||||
|
#
|
||||||
|
# processname: bird
|
||||||
|
# config: /etc/bird.conf
|
||||||
|
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
# Check that networking is up.
|
||||||
|
if [ ${NETWORKING} = "no" ]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -f /etc/bird.conf ] || exit 0
|
||||||
|
|
||||||
|
[ -f /usr/sbin/bird ] || exit 0
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
|
||||||
|
# See how we were called.
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Starting BIRD: "
|
||||||
|
daemon bird
|
||||||
|
RETVAL=$?
|
||||||
|
|
||||||
|
echo
|
||||||
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
echo -n "Stopping BIRD: "
|
||||||
|
killproc bird
|
||||||
|
RETVAL=$?
|
||||||
|
|
||||||
|
echo
|
||||||
|
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bird
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status bird
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
$0 start
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
killall -HUP bird
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: bird.init {start|stop|status|restart|reload}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $REVAL
|
45
misc/bird.spec
Normal file
45
misc/bird.spec
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
Summary: BIRD Internet Routing Daemon
|
||||||
|
Name: bird
|
||||||
|
Version: 1.0.2
|
||||||
|
Release: 1
|
||||||
|
Copyright: GPL
|
||||||
|
Group: Networking/Daemons
|
||||||
|
Source: ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz
|
||||||
|
Source1: bird.init
|
||||||
|
Buildroot: /var/tmp/bird-root
|
||||||
|
Url: http://bird.network.cz
|
||||||
|
Prereq: /sbin/chkconfig
|
||||||
|
|
||||||
|
%description
|
||||||
|
BIRD is dynamic routing daemon supporting IPv4 and IPv6 versions of routing
|
||||||
|
protocols BGP, RIP and OSPF.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -n bird-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT/*
|
||||||
|
make install prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc localstatedir=$RPM_BUILD_ROOT/var/run
|
||||||
|
|
||||||
|
cd $RPM_BUILD_ROOT
|
||||||
|
install -c -d etc/rc.d/init.d
|
||||||
|
install -c $RPM_SOURCE_DIR/bird.init etc/rc.d/init.d/
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
/sbin/chkconfig --add bird.init
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 = 0 ] ; then
|
||||||
|
/sbin/chkconfig --del bird.init
|
||||||
|
fi
|
||||||
|
|
||||||
|
%files
|
||||||
|
%attr(755,root,root) /usr/sbin/bird
|
||||||
|
%attr(755,root,root) /usr/sbin/birdc
|
||||||
|
%attr(755,root,root) /etc/rc.d/init.d/bird.init
|
||||||
|
%config /etc/bird.conf
|
Loading…
Reference in New Issue
Block a user