EXTRA_DIST = bgpd.init isisd.init \
- ospf6d.init ospfd.init \
+ ospf6d.init ospfd.init ldpd.init \
quagga.logrotate quagga.pam quagga.spec \
quagga.sysconfig ripd.init ripngd.init \
watchquagga.init pimd.init zebra.init \
%{!?with_rtadv: %global with_rtadv 1 }
%{!?with_isisd: %global with_isisd 1 }
%{!?with_pimd: %global with_pimd 1 }
+ %{!?with_mpls: %global with_mpls 0 }
+ %{!?with_ldpd: %global with_ldpd 0 }
%{!?with_shared: %global with_shared 1 }
%{!?with_multipath: %global with_multipath 64 }
%{!?quagga_user: %global quagga_user quagga }
--- /dev/null
+#!/bin/bash
+# chkconfig: - 16 84
+# config: /etc/quagga/ldpd.conf
+
+### BEGIN INIT INFO
+# Provides: ldpd
+# Short-Description: LDP engine
+# Description: LDP 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="ldpd"
+cmd=ldpd
+LOCK_FILE=/var/lock/subsys/ldpd
+CONF_FILE=/etc/quagga/ldpd.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 $LDPD_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
/bin/kill -USR1 `cat /var/run/quagga/ripngd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
+
+/var/log/quagga/ldpd.log {
+ notifempty
+ missingok
+ postrotate
+ /bin/kill -USR1 `cat /var/run/quagga/ldpd.pid 2> /dev/null` 2> /dev/null || true
+ endscript
+}
%{!?with_ospfapi: %global with_ospfapi 1 }
%{!?with_irdp: %global with_irdp 1 }
%{!?with_rtadv: %global with_rtadv 1 }
+%{!?with_mpls: %global with_mpls 0 }
+%{!?with_ldpd: %global with_ldpd 0 }
%{!?with_shared: %global with_shared 1 }
%{!?with_multipath: %global with_multipath 256 }
%{!?quagga_user: %global quagga_user quagga }
%define daemon_list zebra ripd ospfd bgpd isisd pimd ripngd ospfd6d
+%if %{with_ldpd}
+%define daemon_ldpd ldpd
+%else
+%define daemon_ldpd ""
+%endif
+
%if %{with_watchquagga}
%define daemon_watchquagga watchquagga
%else
%define daemon_watchquagga ""
%endif
-%define all_daemons %{daemon_list} %{daemon_watchquagga}
+%define all_daemons %{daemon_list} %{daemon_ldpd} %{daemon_watchquagga}
# allow build dir to be kept
%{!?keep_build: %global keep_build 0 }
%else
--enable-rtadv=no \
%endif
+%if %{with_mpls}
+ --enable-mpls=yes \
+%else
+ --disable-mpls \
+%endif
+%if %{with_ldpd}
+ --enable-ldpd \
+%else
+ --disable-ldpd \
+%endif
%if %{with_pam}
--with-libpam \
%endif
%endif
zebra_spec_add_service isisd 2608/tcp "ISISd vty"
zebra_spec_add_service pimd 2611/tcp "PIMd vty"
+%if %{with_ldpd}
+zebra_spec_add_service ldpd 2612/tcp "LDPd vty"
+%endif
%if "%{initsystem}" == "systemd"
for daemon in %all_daemons ; do
%{_sbindir}/ospf6d
%{_sbindir}/pimd
%{_sbindir}/isisd
+%if %{with_ldpd}
+%{_sbindir}/ldpd
+%endif
%if %{with_shared}
%attr(755,root,root) %{_libdir}/lib*.so
%attr(755,root,root) %{_libdir}/lib*.so.*
%config /etc/rc.d/init.d/ospf6d
%config /etc/rc.d/init.d/isisd
%config /etc/rc.d/init.d/pimd
+ %if %{with_ldpd}
+ %config /etc/rc.d/init.d/ldpd
+ %endif
%endif
%config(noreplace) /etc/default/quagga
%config(noreplace) /etc/pam.d/quagga
RIPNGD_OPTS="-A ::1"
ZEBRA_OPTS="-A 127.0.0.1"
PIMD_OPTS="-A 127.0.0.1"
+LDPD_OPTS="-A 127.0.0.1"
# Watchquagga configuration for LSB initscripts
#