Browse Source

*: fix "babeld: Remove babeld from Quagga" (336724d)

This removes some more bits of babeld, particularly from:
- buildtest.sh
- redhat/ build files
- vtysh integration (which actively broke the build)

The memtype and zclient/route type are kept in place since these don't
break anything and -theoretically- make it possible to build babeld
with some Quagga integration externally.
(Keeping vtysh integration is unfortunately not as easy.)

Reported-by: Donald Sharp <sharpd@cumulusnetworks.com>
Fixes: 336724d ("babeld: Remove babeld from Quagga")
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
Acked-by: Paul Jakma <paul@quagga.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter 4 years ago
parent
commit
5460baef7f

+ 1 - 1
buildtest.sh

@@ -4,7 +4,7 @@
 # builds some git commit of Quagga in some different configurations
 # usage: buildtest.sh [commit [configurations...]]
 
-basecfg="--prefix=/usr --enable-user=quagga --enable-group=quagga --enable-vty-group=quagga --enable-configfile-mask=0660 --enable-logfile-mask=0640 --enable-vtysh --sysconfdir=/etc/quagga --enable-exampledir=/etc/quagga/samples --localstatedir=/var/run/quagga --libdir=/usr/lib64/quagga --enable-rtadv --disable-static --enable-isisd --enable-multipath=0 --enable-babeld --enable-pimd --enable-werror"
+basecfg="--prefix=/usr --enable-user=quagga --enable-group=quagga --enable-vty-group=quagga --enable-configfile-mask=0660 --enable-logfile-mask=0640 --enable-vtysh --sysconfdir=/etc/quagga --enable-exampledir=/etc/quagga/samples --localstatedir=/var/run/quagga --libdir=/usr/lib64/quagga --enable-rtadv --disable-static --enable-isisd --enable-multipath=0 --enable-pimd --enable-werror"
 
 configs_base="gcc|$basecfg"
 

+ 1 - 1
pimd/quagga-configure-no-vtysh.sh

@@ -7,4 +7,4 @@
 #
 # $QuaggaId: $Format:%an, %ai, %h$ $
 
-./configure --disable-babeld --disable-bgpd --disable-ripd --disable-ripngd --disable-ospfd --disable-ospf6d --disable-watchquagga --disable-bgp-announce --disable-ospfapi --disable-ospfclient --disable-rtadv --disable-irdp --enable-pimd --enable-tcp-zebra --enable-ipv6
+./configure --disable-bgpd --disable-ripd --disable-ripngd --disable-ospfd --disable-ospf6d --disable-watchquagga --disable-bgp-announce --disable-ospfapi --disable-ospfclient --disable-rtadv --disable-irdp --enable-pimd --enable-tcp-zebra --enable-ipv6

+ 1 - 1
redhat/Makefile.am

@@ -1,5 +1,5 @@
 
-EXTRA_DIST = babeld.init babeld.service bgpd.init bgpd.service isisd.init \
+EXTRA_DIST = bgpd.init bgpd.service isisd.init \
 	isisd.service ospf6d.init ospf6d.service ospfd.init ospfd.service \
 	quagga.logrotate quagga.pam quagga.pam.stack quagga.spec \
 	quagga.sysconfig ripd.init ripd.service ripngd.init ripngd.service \

+ 0 - 72
redhat/babeld.init

@@ -1,72 +0,0 @@
-#!/bin/bash
-# chkconfig: - 16 84
-# config: /etc/quagga/babeld.conf
-
-### BEGIN INIT INFO
-# Provides: babeld
-# Short-Description: Babel routing engine
-# Description: Babel routing engine for use with Zebra
-### END INIT INFO
-
-# source function library
-. /etc/rc.d/init.d/functions
-
-# Get network config
-. /etc/sysconfig/network
-
-# quagga command line options
-. /etc/sysconfig/quagga
-
-RETVAL=0
-PROG="babeld"
-cmd=babeld
-LOCK_FILE=/var/lock/subsys/babeld
-CONF_FILE=/etc/quagga/babeld.conf
-
-case "$1" in
-  start)
-	# Check that networking is up.
-	[ "${NETWORKING}" = "no" ] && exit 1
-
-	# The process must be configured first.
-	[ -f $CONF_FILE ] || exit 6
-	if [ `id -u` -ne 0 ]; then
-		echo $"Insufficient privilege" 1>&2
-		exit 4
-	fi
-
-	echo -n $"Starting $PROG: "
-	daemon $cmd -d $BABELD_OPTS -f $CONF_FILE
-	RETVAL=$?
-	[ $RETVAL -eq 0 ] && touch $LOCK_FILE
-	echo
-	;;
-  stop)
-	echo -n $"Shutting down $PROG: "
-	killproc $cmd
-	RETVAL=$?
-	[ $RETVAL -eq 0 ] && rm -f $LOCK_FILE
-	echo
-	;;
-  restart|reload|force-reload)
-	$0 stop
-	$0 start
-	RETVAL=$?
-	;;
-  condrestart|try-restart)
-	if [ -f $LOCK_FILE ]; then
-		$0 stop
-		$0 start
-	fi
-	RETVAL=$?
-	;;
-  status)
-	status $cmd
-	RETVAL=$?
-	;;
-  *)
-	echo $"Usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}"
-	exit 2
-esac
-
-exit $RETVAL

+ 0 - 14
redhat/babeld.service

@@ -1,14 +0,0 @@
-[Unit]
-Description=Babel routing daemon
-BindTo=zebra.service
-After=syslog.target network.target zebra.service
-ConditionPathExists=/etc/quagga/babeld.conf
-
-[Service]
-Type=forking
-EnvironmentFile=/etc/sysconfig/quagga
-ExecStart=/usr/sbin/babeld -d $BABELD_OPTS -f /etc/quagga/babeld.conf
-Restart=on-abort
-
-[Install]
-WantedBy=network.target

+ 0 - 8
redhat/quagga.logrotate

@@ -6,14 +6,6 @@
     endscript
 }
 
-/var/log/quagga/babeld.log {
-    notifempty
-    missingok
-    postrotate
-	/bin/kill -USR1 `cat /var/run/quagga/babeld.pid 2> /dev/null` 2> /dev/null || true
-    endscript
-}
-
 /var/log/quagga/bgpd.log {
     notifempty
     missingok

+ 1 - 2
redhat/quagga.spec.in

@@ -68,7 +68,7 @@
 %define		daemon_list	zebra ripd ospfd bgpd
 
 %if %{with_ipv6}
-%define		daemonv6_list	ripngd babeld ospf6d
+%define		daemonv6_list	ripngd ospf6d
 %else
 %define		daemonv6_list	""
 %endif
@@ -409,7 +409,6 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with_ipv6}
 %{_sbindir}/ripngd
 %{_sbindir}/ospf6d
-%{_sbindir}/babeld
 %endif
 %if %{with_isisd}
 %{_sbindir}/isisd

+ 0 - 1
vtysh/Makefile.am

@@ -24,7 +24,6 @@ EXTRA_DIST = extract.pl
 vtysh_cmd_FILES = $(top_srcdir)/bgpd/*.c $(top_srcdir)/isisd/*.c \
 		  $(top_srcdir)/ospfd/*.c $(top_srcdir)/ospf6d/*.c \
 		  $(top_srcdir)/ripd/*.c $(top_srcdir)/ripngd/*.c \
-		  $(top_srcdir)/babeld/*.c \
 		  $(top_srcdir)/pimd/pim_cmd.c \
 		  $(top_srcdir)/lib/keychain.c $(top_srcdir)/lib/routemap.c \
 		  $(top_srcdir)/lib/filter.c $(top_srcdir)/lib/plist.c \

+ 0 - 1
vtysh/extract.pl.in

@@ -37,7 +37,6 @@ $ignore{'"router ripng"'} = "ignore";
 $ignore{'"router ospf"'} = "ignore";
 $ignore{'"router ospf <0-65535>"'} = "ignore";
 $ignore{'"router ospf6"'} = "ignore";
-$ignore{'"router babel"'} = "ignore";
 $ignore{'"router bgp " "<1-4294967295>"'} = "ignore";
 $ignore{'"router bgp " "<1-4294967295>" " view WORD"'} = "ignore";
 $ignore{'"router isis WORD"'} = "ignore";

+ 0 - 20
vtysh/vtysh.c

@@ -58,7 +58,6 @@ struct vtysh_client
   { .fd = -1, .name = "ospf6d", .flag = VTYSH_OSPF6D, .path = OSPF6_VTYSH_PATH},
   { .fd = -1, .name = "bgpd", .flag = VTYSH_BGPD, .path = BGP_VTYSH_PATH},
   { .fd = -1, .name = "isisd", .flag = VTYSH_ISISD, .path = ISIS_VTYSH_PATH},
-  { .fd = -1, .name = "babeld", .flag = VTYSH_BABELD, .path = BABEL_VTYSH_PATH},
   { .fd = -1, .name = "pimd", .flag = VTYSH_PIMD, .path = PIM_VTYSH_PATH},
 };
 
@@ -799,12 +798,6 @@ static struct cmd_node ospf6_node =
   "%s(config-ospf6)# "
 };
 
-static struct cmd_node babel_node =
-{
-  BABEL_NODE,
-  "%s(config-babel)# "
-};
-
 static struct cmd_node keychain_node =
 {
   KEYCHAIN_NODE,
@@ -1017,17 +1010,6 @@ DEFUNSH (VTYSH_OSPF6D,
   return CMD_SUCCESS;
 }
 
-DEFUNSH (VTYSH_BABELD,
-	 router_babel,
-	 router_babel_cmd,
-	 "router babel",
-	 ROUTER_STR
-	 "Babel")
-{
-  vty->node = BABEL_NODE;
-  return CMD_SUCCESS;
-}
-
 DEFUNSH (VTYSH_ISISD,
 	 router_isis,
 	 router_isis_cmd,
@@ -2266,7 +2248,6 @@ vtysh_init_vty (void)
   install_node (&ripng_node, NULL);
   install_node (&ospf6_node, NULL);
 /* #endif */
-  install_node (&babel_node, NULL);
   install_node (&keychain_node, NULL);
   install_node (&keychain_key_node, NULL);
   install_node (&isis_node, NULL);
@@ -2369,7 +2350,6 @@ vtysh_init_vty (void)
 #ifdef HAVE_IPV6
   install_element (CONFIG_NODE, &router_ospf6_cmd);
 #endif
-  install_element (CONFIG_NODE, &router_babel_cmd);
   install_element (CONFIG_NODE, &router_isis_cmd);
   install_element (CONFIG_NODE, &router_bgp_cmd);
   install_element (CONFIG_NODE, &router_bgp_view_cmd);

+ 0 - 2
vtysh/vtysh_config.c

@@ -198,8 +198,6 @@ vtysh_config_parse_line (const char *line)
 	config = config_get (OSPF_NODE, line);
       else if (strncmp (line, "router ospf6", strlen ("router ospf6")) == 0)
 	config = config_get (OSPF6_NODE, line);
-      else if (strncmp (line, "router babel", strlen ("router babel")) == 0)
-	config = config_get (BABEL_NODE, line);
       else if (strncmp (line, "router bgp", strlen ("router bgp")) == 0)
 	config = config_get (BGP_NODE, line);
       else if (strncmp (line, "router isis", strlen ("router isis")) == 0)