Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-libs/openslp/files: slpd-init
Date: Thu, 09 Feb 2012 08:19:46
Message-Id: 20120209081935.49C732004C@flycatcher.gentoo.org
1 robbat2 12/02/09 08:19:35
2
3 Modified: slpd-init
4 Log:
5 The init script fails on a machine with multiple non-lo interfaces as route only takes one argument, I discovered this during testing fast booting, when there was no default route yet. I think it should not bother to check for a route anyway (as it is moot after there is a default route), but I'm not making that change.
6
7 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.5 net-libs/openslp/files/slpd-init
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/openslp/files/slpd-init?rev=1.5&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/openslp/files/slpd-init?rev=1.5&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-libs/openslp/files/slpd-init?r1=1.4&r2=1.5
15
16 Index: slpd-init
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-libs/openslp/files/slpd-init,v
19 retrieving revision 1.4
20 retrieving revision 1.5
21 diff -p -w -b -B -u -u -r1.4 -r1.5
22 --- slpd-init 13 Jul 2007 13:20:28 -0000 1.4
23 +++ slpd-init 9 Feb 2012 08:19:35 -0000 1.5
24 @@ -1,7 +1,7 @@
25 #!/sbin/runscript
26 -# Copyright 1999-2004 Gentoo Foundation
27 +# Copyright 1999-2012 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-libs/openslp/files/slpd-init,v 1.4 2007/07/13 13:20:28 uberlord Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-libs/openslp/files/slpd-init,v 1.5 2012/02/09 08:19:35 robbat2 Exp $
31
32 depend() {
33 need net
34 @@ -27,7 +27,7 @@ multicast_route_set() {
35 MSG_FAILED_TO_ADD=' FAILED - Route NOT Added.'
36 MSG_SUCCES_ON_ADD=' SUCCESS - Route Added.'
37
38 - CMD_GET_INTERFACE="netstat -i | awk 'BEGIN{}(NR>2)&&(!/^lo*/){print \$1}'"
39 + CMD_GET_INTERFACE="netstat -i | awk 'BEGIN{}(NR>2)&&(!/^lo*/){print \$1;exit}'"
40 CMD_ADD_ROUTE="route add -net 224.0.0.0 netmask 240.0.0.0"
41
42 ping $PING_OPTIONS_1 $MULTICAST_ADDRESS 2> $TMP_FILE 1> /dev/null