rpms/radvd/devel radvd-1.1-posix.patch, NONE, 1.1 radvd.init, 1.2, 1.3 radvd.spec, 1.46, 1.47 radvd-1.1-string_cmp.patch, 1.1, NONE

Jiri Skala jskala at fedoraproject.org
Mon Feb 2 13:30:55 UTC 2009


Author: jskala

Update of /cvs/extras/rpms/radvd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15521

Modified Files:
	radvd.init radvd.spec 
Added Files:
	radvd-1.1-posix.patch 
Removed Files:
	radvd-1.1-string_cmp.patch 
Log Message:
* Mon Feb 02 2009 Jiri Skala <jskala at redhat.com> - 1.1-6
- init script modified to be POSIX compliant


radvd-1.1-posix.patch:

--- NEW FILE radvd-1.1-posix.patch ---
diff -up radvd-1.1/redhat/radvd.init.posix radvd-1.1/redhat/radvd.init
--- radvd-1.1/redhat/radvd.init.posix	2009-02-02 14:20:48.000000000 +0100
+++ radvd-1.1/redhat/radvd.init	2009-02-02 14:28:45.000000000 +0100
@@ -28,12 +28,6 @@
 
 [ -f /etc/sysconfig/radvd ] && . /etc/sysconfig/radvd
 
-if [ "$1" == "status" ]; then
-	[ -f /usr/sbin/radvd ] || exit 4
-else 
-	[ -f /usr/sbin/radvd ] || exit 1
-fi
-
 RETVAL=0
 PROG="radvd"
 LOCKFILE=/var/lock/subsys/radvd
@@ -41,48 +35,53 @@ LOCKFILE=/var/lock/subsys/radvd
 # See how we were called.
 case "$1" in
   start)
-
-	# Check that networking is up.	
-	[ "${NETWORKING_IPV6}" = "yes" ] || exit 1
-
-	echo -n $"Starting $PROG: "
-	daemon radvd $OPTIONS
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && touch $LOCKFILE
-	;;
+    if [ ! -f /etc/radvd.conf ]; then
+      echo "Configuration file /etc/radvd.conf missing" 1>&2
+      exit 6
+    fi
+    if [ ! -x /usr/sbin/radvd ]; then
+      echo "Insufficient privilege" 1>&2
+      exit 4
+    fi
+    echo -n $"Starting $prog: "
+    echo -n $"Starting $PROG: "
+    daemon radvd $OPTIONS
+    RETVAL=$?
+    echo
+    [ $RETVAL -eq 0 ] && touch $LOCKFILE
+    ;;
   stop)
-	echo -n $"Stopping $PROG: "
-	killproc radvd
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
-	;;
+    echo -n $"Stopping $PROG: "
+    killproc radvd
+    RETVAL=$?
+    echo
+    [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
+    ;;
   status)
-	status radvd
-	RETVAL=$?
-	;;
+    status radvd
+    RETVAL=$?
+    ;;
   restart)
-	$0 stop
-	$0 start
-	RETVAL=$?
-	;;
+    $0 stop
+    $0 start
+    RETVAL=$?
+    ;;
   reload)
-	echo -n $"Reloading $PROG: "
-	killproc radvd -HUP
-	RETVAL=$?	
-	echo
-	;;
+    echo -n $"Reloading $PROG: "
+    killproc radvd -HUP
+    RETVAL=$?	
+    echo
+    ;;
   condrestart)
-        if [ -f $LOCKFILE ]; then
-		$0 stop
-		$0 start
-		RETVAL=$?
-	fi
-        ;;  
+    if [ -f $LOCKFILE ]; then
+      $0 stop
+      $0 start
+      RETVAL=$?
+    fi
+    ;;  
   *)
-	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
-	exit 2
+    echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
+    exit 2
 esac
 
 exit $RETVAL


Index: radvd.init
===================================================================
RCS file: /cvs/extras/rpms/radvd/devel/radvd.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- radvd.init	23 Jun 2008 14:41:25 -0000	1.2
+++ radvd.init	2 Feb 2009 13:30:24 -0000	1.3
@@ -2,7 +2,10 @@
 #
 # $Id$
 #
+### 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 \
@@ -15,6 +18,7 @@
 # pidfile: /var/run/radvd.pid
 # config: /etc/radvd.conf
 # config: /etc/sysconfig/radvd
+### END INIT INFO
 
 # Source function library.
 . /etc/rc.d/init.d/functions
@@ -22,62 +26,62 @@
 # Get config.
 . /etc/sysconfig/network
 
-# Check that networking is up.
-if [ ! "${NETWORKING_IPV6}" = "yes" ]; then
-	echo "Networking IPv6 is disabled" 1>&2
-	exit 1
-fi
-
-if [ ! -f /etc/radvd.conf ]; then
-	echo "Configuration file /etc/radvd.conf missing" 1>&2
-	exit 6
-fi
-
 [ -f /etc/sysconfig/radvd ] && . /etc/sysconfig/radvd
 
-if [ ! -x /usr/sbin/radvd ]; then
-	echo "Insufficient privilege" 1>&2
-	exit 4
-fi
-
 RETVAL=0
-prog="radvd"
+PROG="radvd"
+LOCKFILE=/var/lock/subsys/radvd
 
 # See how we were called.
 case "$1" in
   start)
-	echo -n $"Starting $prog: "
-	daemon radvd $OPTIONS
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/radvd
-	;;
+    if [ ! -f /etc/radvd.conf ]; then
+      echo "Configuration file /etc/radvd.conf missing" 1>&2
+      exit 6
+    fi
+    if [ ! -x /usr/sbin/radvd ]; then
+      echo "Insufficient privilege" 1>&2
+      exit 4
+    fi
+    echo -n $"Starting $prog: "
+    echo -n $"Starting $PROG: "
+    daemon radvd $OPTIONS
+    RETVAL=$?
+    echo
+    [ $RETVAL -eq 0 ] && touch $LOCKFILE
+    ;;
   stop)
-	echo -n $"Stopping $prog: "
-	killproc radvd
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/radvd
-	;;
+    echo -n $"Stopping $PROG: "
+    killproc radvd
+    RETVAL=$?
+    echo
+    [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
+    ;;
   status)
-	status radvd
-	RETVAL=$?
-	;;
-  restart|reload)
-	$0 stop
-	$0 start
-	RETVAL=$?
-	;;
+    status radvd
+    RETVAL=$?
+    ;;
+  restart)
+    $0 stop
+    $0 start
+    RETVAL=$?
+    ;;
+  reload)
+    echo -n $"Reloading $PROG: "
+    killproc radvd -HUP
+    RETVAL=$?	
+    echo
+    ;;
   condrestart)
-        if [ -f /var/lock/subsys/radvd ]; then
-		$0 stop
-		$0 start
-		RETVAL=$?
-	fi
-        ;;  
+    if [ -f $LOCKFILE ]; then
+      $0 stop
+      $0 start
+      RETVAL=$?
+    fi
+    ;;  
   *)
-	echo $"Usage: radvd {start|stop|status|restart|reload|condrestart}"
-	exit 1
+    echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
+    exit 2
 esac
 
 exit $RETVAL


Index: radvd.spec
===================================================================
RCS file: /cvs/extras/rpms/radvd/devel/radvd.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- radvd.spec	3 Sep 2008 19:53:48 -0000	1.46
+++ radvd.spec	2 Feb 2009 13:30:24 -0000	1.47
@@ -5,7 +5,7 @@
 Summary:    A Router Advertisement daemon
 Name:       radvd
 Version:    1.1
-Release:    5%{?dist}
+Release:    6%{?dist}
 # The code includes the advertising clause, so it's GPL-incompatible
 License:    BSD with advertising
 Group:      System Environment/Daemons
@@ -18,7 +18,7 @@
 BuildRequires:      flex, byacc
 BuildRoot:          %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-Patch0: radvd-1.1-string_cmp.patch
+Patch0: radvd-1.1-posix.patch
 Patch1: radvd-1.1-stale_pid.patch
 
 %description
@@ -34,7 +34,7 @@
 
 %prep
 %setup -q
-%patch0 -p1 -b .string_cmp
+%patch0 -p1 -b .posix
 %patch1 -p1 -b .stale_pid
 
 %build
@@ -97,6 +97,9 @@
 %{_sbindir}/radvdump
 
 %changelog
+* Mon Feb 02 2009 Jiri Skala <jskala at redhat.com> - 1.1-6
+- init script modified to be POSIX compliant
+
 * Wed Sep  3 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 1.1-5
 - fix license tag
 


--- radvd-1.1-string_cmp.patch DELETED ---




More information about the fedora-extras-commits mailing list