Bug 176223 - feature request - ports/net/quagga
feature request - ports/net/quagga
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: FreeBSD ports mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-18 03:00 UTC by freebsd
Modified: 2013-03-29 05:30 UTC (History)
0 users

See Also:


Attachments
file.diff (552 bytes, patch)
2013-02-18 03:00 UTC, freebsd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd 2013-02-18 03:00:00 UTC
It would be useful to allow the integrated-vtysh-config for quagga.
Basically that allows all quagga daemon configuration to be in a single Quagga.conf and is an alternative way to manage the configuration files.

The startup script as it is does not support this because at the very end of a start the command 'vtysh -b' needs to be run to initialize the daemons.

Fix: The diff below for /usr/local/etc/rc.d/quagga seems to work for me and provides a new /etc/rc.conf to enable this:
quagga_vtysh_boot="YES"


How-To-Repeat: In a clean quagga installation - /usr/local/etc/quagga configuration directory...

Put the following single line in vtysh.conf:
service integrated-vtysh-config

Leave all daemon files (ospfd.conf, bgpd.conf, etc) empty.

Put some configuration info into Quagga.conf for testing...
password TestToSeeIfThisShows


start up quagga - /usr/local/etc/rc.d/quagga start
go into vtysh and do a 'show run' -  the line for TestToSeeIfThisShowswill not be there.
exit to command line
run 'vtysh -b'
go into vtysh and do a 'show run' -  the line for TestToSeeIfThisShows is there.
Comment 1 Edwin Groothuis freebsd_committer 2013-02-18 03:00:10 UTC
Maintainer of net/quagga,

Please note that PR ports/176223 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/176223

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer 2013-02-18 03:00:11 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 dfilter freebsd_committer 2013-03-29 05:20:01 UTC
Author: rm
Date: Fri Mar 29 05:19:51 2013
New Revision: 315520
URL: http://svnweb.freebsd.org/changeset/ports/315520

Log:
  - update to 0.99.22
  
  PR: 177303
  Submitted by:   Boris Kovalenko <boris@tagnet.ru> (maintainer)
  
  - add "--no_kernel" option decription to man-page
  
  PR: 173624
  Reported by:    Rasmus G. Andersen <rga@abiosis.dk>
  
  - add integrated-vtysh-config mode to rc-script
  
  PR: 176223
  Submitted by:   Michael deMan <freebsd@deman.com>
  
  - add config file testing before start/restart in rc-script
  
  PR: 176995
  Submitted by:   Alexander Brovikov <alexander@brovikov.ru>

Added:
  head/net/quagga/files/patch-doc-bgpd.8   (contents, props changed)
Deleted:
  head/net/quagga/files/patch-bgpd__bgp_open.c
Modified:
  head/net/quagga/Makefile   (contents, props changed)
  head/net/quagga/distinfo   (contents, props changed)
  head/net/quagga/files/quagga.in   (contents, props changed)

Modified: head/net/quagga/Makefile
==============================================================================
--- head/net/quagga/Makefile	Fri Mar 29 02:08:23 2013	(r315519)
+++ head/net/quagga/Makefile	Fri Mar 29 05:19:51 2013	(r315520)
@@ -1,14 +1,10 @@
-# New ports collection makefile for:    quagga
-# Date created:         3 September 2003
-# Whom:                 Bruce M Simpson <bms@FreeBSD.org>
-#
+# Created by: Bruce M Simpson <bms@FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	quagga
-PORTVERSION=	0.99.21
+PORTVERSION=	0.99.22
 CATEGORIES=	net ipv6
-MASTER_SITES=	${MASTER_SITE_SAVANNAH}
+MASTER_SITES=	SAVANNAH
 MASTER_SITE_SUBDIR=	quagga
 
 PATCH_SITES=	http://quagga.net/
@@ -17,7 +13,6 @@ MAINTAINER=	boris@tagnet.ru
 COMMENT=	Free RIPv1, RIPv2, OSPFv2, BGP4, IS-IS route software
 
 LICENSE=	GPLv2
-LICENSE_FILE=	${WRKSRC}/COPYING
 
 CONFLICTS=	openbgpd-[0-9]* openospfd-[0-9]* zebra-0* quagga-re-[0-9]*
 

Modified: head/net/quagga/distinfo
==============================================================================
--- head/net/quagga/distinfo	Fri Mar 29 02:08:23 2013	(r315519)
+++ head/net/quagga/distinfo	Fri Mar 29 05:19:51 2013	(r315520)
@@ -1,2 +1,2 @@
-SHA256 (quagga-0.99.21.tar.gz) = 9b8aea9026b4771a28e254a66cbd854723bcd0d71eebd0201d11838d4eb392ee
-SIZE (quagga-0.99.21.tar.gz) = 2297174
+SHA256 (quagga-0.99.22.tar.gz) = 5e5f5506e9e53daf785e8bf2dc41ba09a13e6f45b558de4351fe08da8c6a75bd
+SIZE (quagga-0.99.22.tar.gz) = 2351197

Added: head/net/quagga/files/patch-doc-bgpd.8
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/quagga/files/patch-doc-bgpd.8	Fri Mar 29 05:19:51 2013	(r315520)
@@ -0,0 +1,21 @@
+--- doc/bgpd.8.orig	2012-07-13 23:02:24.000000000 +0600
++++ doc/bgpd.8	2013-03-23 10:08:50.551916290 +0600
+@@ -28,6 +28,8 @@
+ ] [
+ .B \-g
+ .I group
++] [
++.B \--no_kernel
+ ]
+ .SH DESCRIPTION
+ .B bgpd 
+@@ -76,6 +78,9 @@
+ .TP
+ \fB\-v\fR, \fB\-\-version\fR
+ Print the version and exit.
++.TP
++\fB\--no_kernel\fR
++Prevents route updates to be submitted to the kernel.
+ .SH FILES
+ .TP
+ .BI /usr/local/sbin/bgpd

Modified: head/net/quagga/files/quagga.in
==============================================================================
--- head/net/quagga/files/quagga.in	Fri Mar 29 02:08:23 2013	(r315519)
+++ head/net/quagga/files/quagga.in	Fri Mar 29 05:19:51 2013	(r315520)
@@ -13,6 +13,7 @@
 # You may also wish to use the following variables to fine-tune startup:
 #  quagga_flags="-d"
 #  quagga_daemons="zebra ripd ripngd ospfd ospf6d bgpd isisd"
+#  quagga_vysh_boot="YES"
 # Per daemon tuning may be done with daemon_name_flags
 #  zebra_flags="-dP 0"
 #  bgpd_flags="-dnrP 0" and so on
@@ -32,6 +33,20 @@ rcvar=quagga_enable
 
 start_postcmd=start_postcmd
 stop_postcmd=stop_postcmd
+configtest_cmd=check_config
+extra_commands="configtest"
+
+check_config() {
+    echo "Checking $daemon.conf"
+    $command $daemon_flags -C
+    result=$?
+    if [ "$result" -eq "0" ]; then
+	echo "OK"
+    else
+	echo "FAILED"
+	exit
+    fi
+}
 
 start_postcmd()
 {
@@ -61,6 +76,9 @@ do_cmd()
 	    command=%%PREFIX%%/sbin/${daemon}
 	    required_files=%%SYSCONF_DIR%%/${daemon}.conf
 	    pidfile=%%LOCALSTATE_DIR%%/${daemon}.pid
+	    if [ ${quagga_cmd} = "restart" -o ${quagga_cmd} = "start" ]; then
+		check_config
+	    fi
 	    if [ ${quagga_cmd} = "start" -a ! -f ${required_files} ]; then
 			continue
 	    fi
@@ -72,6 +90,10 @@ do_cmd()
 	    _rc_restart_done=false
 	    run_rc_command "$1" || ret=1
 	done
+	if checkyesno quagga_vtysh_boot; then
+	    echo "Booting for integrated-vtysh-config..."
+	    %%PREFIX%%/bin/vtysh -b
+	fi
 	return ${ret}
 }
 
@@ -82,6 +104,7 @@ load_rc_config $name
 : ${quagga_enable="NO"}
 : ${quagga_flags="-d"}
 : ${quagga_daemons="zebra ripd ripngd ospfd ospf6d bgpd isisd"}
+: ${quagga_vtysh_boot="NO"}
 
 quagga_cmd=$1
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Ruslan Makhmatkhanov freebsd_committer 2013-03-29 05:21:11 UTC
State Changed
From-To: feedback->closed

Committed, thanks.