Skip to content

Commit

Permalink
Update redhat init and spec files from Fedora.
Browse files Browse the repository at this point in the history
  • Loading branch information
psavola committed Mar 5, 2010
1 parent ac40cd6 commit 11549ad
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
4 changes: 3 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$Id: CHANGES,v 1.95 2010/01/28 13:34:26 psavola Exp $
$Id: CHANGES,v 1.96 2010/03/05 12:14:47 psavola Exp $

05/03/2010 Update Redhat spec and init files from Fedora.

28/01/2010 Decrease MSG_SIZE from 4096 to about 1500B. Send buffer
uses a smaller size in order to avoid sending out
Expand Down
23 changes: 15 additions & 8 deletions redhat/radvd.init
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#! /bin/sh
#
# $Id: radvd.init,v 1.6 2009/05/25 06:17:28 psavola Exp $
# $Id: radvd.init,v 1.7 2010/03/05 12:14:47 psavola Exp $
#
### BEGIN INIT INFO
# provides: radvd
# chkconfig: - 54 46
# short-Description: router advertisement daemon for IPv6
# description: radvd is the router advertisement daemon for IPv6. It \
# listens to router solicitations and sends router \
# advertisements as described in "Neighbor Discovery for IP \
Expand All @@ -18,6 +15,10 @@
# pidfile: /var/run/radvd.pid
# config: /etc/radvd.conf
# config: /etc/sysconfig/radvd

### BEGIN INIT INFO
# Provides: radvd
# Short-Description: router advertisement daemon for IPv6
### END INIT INFO

# Source function library.
Expand Down Expand Up @@ -47,7 +48,13 @@ case "$1" in
daemon radvd $OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $LOCKFILE
if [ $RETVAL -eq 0 ]; then
touch $LOCKFILE
else
if [ -f $LOCKFILE ]; then
RETVAL=0
fi
fi
;;
stop)
echo -n $"Stopping $PROG: "
Expand All @@ -65,21 +72,21 @@ case "$1" in
$0 start
RETVAL=$?
;;
reload)
reload|force-reload)
echo -n $"Reloading $PROG: "
killproc radvd -HUP
RETVAL=$?
echo
;;
condrestart)
condrestart|try-restart)
if [ -f $LOCKFILE ]; then
$0 stop
$0 start
RETVAL=$?
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
exit 2
esac

Expand Down
17 changes: 11 additions & 6 deletions redhat/radvd.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: radvd.spec,v 1.26 2009/09/10 11:48:09 psavola Exp $
# $Id: radvd.spec,v 1.27 2010/03/05 12:14:47 psavola Exp $

%define initdir /etc/rc.d/init.d
#%(if test -d /etc/init.d/. ; then echo /etc/init.d ; else echo /etc/rc.d/init.d ; fi)
Expand All @@ -7,14 +7,14 @@

Summary: A Router Advertisement daemon
Name: radvd
Version: 1.5
Version: 1.6
Release: 1
# The code includes the advertising clause, so it's GPL-incompatible
License: BSD with advertising
Group: System Environment/Daemons
URL: http://www.litech.org/radvd/
Source: http://www.litech.org/radvd/dist/%{name}-%{version}.tar.gz
Requires(postun): chkconfig, /usr/sbin/userdel, initscripts
Requires(postun): chkconfig, initscripts
Requires(preun): chkconfig, initscripts
Requires(post): chkconfig
Requires(pre): /usr/sbin/useradd
Expand All @@ -36,6 +36,8 @@ services.
%setup -q

%build
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIE"
export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen'
%configure --with-pidfile=/var/run/radvd/radvd.pid
make
# make %{?_smp_mflags}
Expand Down Expand Up @@ -63,9 +65,6 @@ install -m 644 redhat/radvd.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ra
if [ "$1" -ge "1" ]; then
/sbin/service radvd condrestart >/dev/null 2>&1
fi
if [ $1 = 0 ]; then
/usr/sbin/userdel radvd > /dev/null 2>&1 || :
fi

%post
/sbin/chkconfig --add radvd
Expand Down Expand Up @@ -93,6 +92,12 @@ fi
%{_sbindir}/radvdump

%changelog
* Fri Mar 5 2010 Pekka Savola <[email protected]> 1.6-1
- 1.6
- Updated the spec file from Fedora (remove userdel at postun),
use compile flags
- Updated init script from Fedora.

* Thu Sep 10 2009 Pekka Savola <[email protected]> 1.5-1
- 1.5

Expand Down

0 comments on commit 11549ad

Please sign in to comment.