From: Brian Bennett Date: Tue, 17 Feb 2015 23:26:12 +0000 (+0000) Subject: solaris: fix SMF manifest dependency model and start method X-Git-Tag: frr-2.0-rc1~760 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a99d18507c700e18b7f09a3feb5a026889706ec3;p=mirror%2Ffrr.git solaris: fix SMF manifest dependency model and start method Resolves an issue where quagga daemons restart in an infinite loop. Quagga daemons declare a dependency on zebra that requires a restart of the daemon when zebra restarts and they explicitly restart zebra, which again triggers their own restart. Restarting zebra when other daemons are started is explicitly removed, leaving dependency management up to SMF rather than handling it in the start method. solaris/quagga.init.in: Remove calls to routeadm_zebra_enable, and the routeadm_zebra_enable function. solaris/quagga.xml.in: Set dependency zebra grouping to require_all. Fixes: #818 Signed-off-by: Greg Troxel Signed-off-by: David Lamparter (cherry picked from commit 75a3cf6cf69f6ab940f8421b0f79b2b1f689b904) --- diff --git a/solaris/quagga.init.in b/solaris/quagga.init.in index 00426241b2..ee3a987f33 100755 --- a/solaris/quagga.init.in +++ b/solaris/quagga.init.in @@ -146,31 +146,6 @@ routeadm_daemon_args () { echo ${args} } -# certain daemons need zebra -routeadm_zebra_enable () { - - if [ "$DAEMON" = "zebra" ]; then - return - fi - - enable_zebra=`/usr/bin/svcprop -p \ - routing/enable_zebra $SMF_FMRI 2> /dev/null` - if [ "$enable_zebra" != "false" ]; then - zenabled=`/usr/bin/svcprop -p general/enabled zebra:quagga` - zenabledt=`/usr/bin/svcprop -p general_ovr/enabled zebra:quagga` - if [ "$zenabled" = "true" -o "$zenabledt" = "true" ]; then - /usr/sbin/svcadm disable zebra:quagga - /usr/sbin/svcadm enable -st zebra:quagga - else - /usr/sbin/svcadm enable -st zebra:quagga - fi - if [ "$?" != "0" ]; then - echo "Could not enable zebra:quagga" - exit $SMF_EXIT_ERR_FATAL - fi - fi -} - # Include smf functions, if available. If not, define smf_present to indicate # there is no SMF. Should allow this script to work pre-S10. if [ -f "$SMFINCLUDE" ] ; then @@ -247,7 +222,6 @@ esac if [ smf_present -a -f "$ROUTEADMINCLUDE" ]; then handle_routeadm_upgrade $DAEMON; DAEMON_ARGS=`routeadm_daemon_args`; - routeadm_zebra_enable $DAEMON; else if [ $# -gt 0 ] ; then shift diff --git a/solaris/quagga.xml.in b/solaris/quagga.xml.in index 50c52c2260..60427b06e9 100644 --- a/solaris/quagga.xml.in +++ b/solaris/quagga.xml.in @@ -21,6 +21,8 @@ Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. + Copyright 2015 Joyent, Inc. + ident "@(#)quagga.xml 1.0 05/03/15 SMI" --> @@ -189,7 +191,7 @@ @@ -320,7 +322,7 @@ @@ -449,7 +451,7 @@ @@ -580,7 +582,7 @@ @@ -715,7 +717,7 @@