Revision 6721e286

View differences:

misc/bird.init
15 15
# Source function library.
16 16
. /etc/rc.d/init.d/functions
17 17

  
18
# Check that networking is up.
19
if [ "${NETWORKING}" = "no" ]
20
then
21
	exit 0
22
fi
18
[ -f /etc/sysconfig/network ] || exit 0
23 19

  
24
[ -f /etc/bird.conf ] || exit 0
20
. /etc/sysconfig/network
25 21

  
26
[ -f /usr/sbin/bird ] || exit 0
22
BIRD4="yes"
23
BIRD6="yes"
24

  
25
[ -f /etc/bird.conf ] || BIRD4="no"
26
[ -f /usr/sbin/bird ] || BIRD4="no"
27
[ "${NETWORKING}" = "yes" ] || BIRD4="no"
28

  
29
[ -f /etc/bird-6.conf ] || BIRD6="no"
30
[ -f /usr/sbin/bird6 ] || BIRD6="no"
31
[ "${NETWORKING_IPV6}" = "yes" ] || BIRD6="no"
27 32

  
28 33
RETVAL=0
29 34

  
30 35
# See how we were called.
31 36
case "$1" in
32 37
  start)
33
	echo -n "Starting BIRD: "
34
	daemon bird
35
	RETVAL=$?
36

  
37
	echo
38
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird
38
	if [ "$BIRD4" = "yes" ]
39
	then
40
		echo -n "Starting BIRD for IPv4: "
41
		daemon bird
42
		RETVAL=$?
43
		echo
44
		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird
45
	fi
46
	if [ "$BIRD6" = "yes" ]
47
	then
48
		echo -n "Starting BIRD for IPv6: "
49
		daemon bird6
50
		RETVAL=$?
51
		echo
52
		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird6
53
	fi
39 54
	;;
40 55
  stop)
41
	echo -n "Stopping BIRD: "
56
	echo -n "Stopping BIRD for IPv4: "
42 57
	killproc bird
43 58
	RETVAL=$?
44

  
45 59
	echo
46 60
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bird
61

  
62
	echo -n "Stopping BIRD for IPv6: "
63
	killproc bird6
64
	RETVAL=$?
65
	echo
66
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bird6
47 67
	;;
48 68
  status)
49 69
	status bird
70
	status bird6
50 71
	RETVAL=$?
51 72
	;;
52 73
  restart)
......
56 77
	;;
57 78
  reload)
58 79
	killall -HUP bird
80
	killall -HUP bird6
59 81
	RETVAL=$?
60 82
	;;
61 83
  *)
misc/bird.spec
1 1
Summary: BIRD Internet Routing Daemon
2 2
Name: bird
3
Version: 1.0.5
3
Version: 1.0.8
4 4
Release: 1
5 5
Copyright: GPL
6 6
Group: Networking/Daemons
7 7
Source: ftp://bird.network.cz/pub/bird/bird-%{version}.tar.gz
8 8
Source1: bird.init
9
Source2: birdc6
9 10
Buildroot: /var/tmp/bird-root
10 11
Url: http://bird.network.cz
11 12
Prereq: /sbin/chkconfig
......
18 19
%setup -n bird-%{version}
19 20

  
20 21
%build
21
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run --enable-ipv6
22
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-ipv6
22 23
make
23 24
mv bird bird6
24
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run
25
make clean
26
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
25 27
make
26 28

  
27 29

  
28 30
%install
29 31
rm -rf $RPM_BUILD_ROOT/*
30
make install prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc localstatedir=$RPM_BUILD_ROOT/var/run
32
make install prefix=$RPM_BUILD_ROOT/usr sysconfdir=$RPM_BUILD_ROOT/etc localstatedir=$RPM_BUILD_ROOT/var
31 33
install bird6 $RPM_BUILD_ROOT/usr/sbin
32 34

  
33 35
cd $RPM_BUILD_ROOT
34 36
install -d etc/rc.d/init.d
35 37
install $RPM_SOURCE_DIR/bird.init etc/rc.d/init.d/bird
36
install $RPM_SOURCE_DIR/birdc6 usr/bin/
38
install $RPM_SOURCE_DIR/birdc6 usr/sbin/birdc6
37 39

  
38 40
%post
39 41
/sbin/ldconfig
......
50 52
%attr(755,root,root) /usr/sbin/birdc
51 53
%attr(755,root,root) /usr/sbin/birdc6
52 54
%attr(755,root,root) /etc/rc.d/init.d/bird
53
%config /etc/bird.conf

Also available in: Unified diff