Created
July 17, 2012 11:07
-
-
Save joshado/3128781 to your computer and use it in GitHub Desktop.
Quagga SMF Files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/sh | |
# | |
# Copyright 2007 Sun Microsystems, Inc. All rights reserved. | |
# Use is subject to license terms. | |
# | |
# This file is part of Quagga. | |
# | |
# Quagga is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU General Public License as published by the | |
# Free Software Foundation; either version 2, or (at your option) any | |
# later version. | |
# | |
# Quagga is distributed in the hope that it will be useful, but | |
# WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
# General Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License | |
# along with Quagga; see the file COPYING. If not, write to the Free | |
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
# 02111-1307, USA. | |
# | |
# $Id$ | |
# | |
# Starts/stops the given daemon | |
SMFINCLUDE=/lib/svc/share/smf_include.sh | |
ROUTEADMINCLUDE=/lib/svc/share/routing_include.sh | |
GLOBAL_OPTIONS="PAfiug" | |
DAEMON_PATH=/opt/local/sbin | |
USER=quagga | |
GROUP=quagga | |
routeadm_daemon_args () { | |
# globals | |
args="`get_daemon_option_from_property $SMF_FMRI config_file f`" | |
args="${args} `get_daemon_option_from_property $SMF_FMRI vty_port P`" | |
args="${args} `get_daemon_option_from_property $SMF_FMRI vty_address A`" | |
args="${args} `get_daemon_option_from_property $SMF_FMRI pid_file i`" | |
# user and group we need for config file upgrade.. | |
SMF_USER=`get_routeadm_property $SMF_FMRI user` | |
SMF_GROUP=`get_routeadm_property()$SMF_FMRI group` | |
if [ "${SMF_USER}" ] ; then | |
USER="${SMF_USER}" | |
args="${args} -u ${SMF_USER}" | |
fi | |
if [ "${SMF_GROUP}" ] ; then | |
GROUP="${SMF_GROUP}" | |
args="${args} -g ${SMF_GROUP}" | |
fi | |
case $1 in | |
zebra) | |
args="${args} `get_daemon_option_from_boolean_property $SMF_FMRI batch -b true`" | |
;; | |
ripd|ripngd) | |
args="${args} `get_daemon_option_from_boolean_property $SMF_FMRI retain -r true`" | |
;; | |
bgpd) | |
args="${args} `get_daemon_option_from_boolean_property $SMF_FMRI retain -r true`" | |
args="${args} `get_daemon_option_from_boolean_property $SMF_FMRI no_kernel -n true`" | |
args="${args} `get_daemon_option_from_property $SMF_FMRI bgp_port p 179`" | |
;; | |
esac | |
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 | |
} | |
. "$SMFINCLUDE" | |
# source the SMF-routeadm include if present.. | |
if [ -f "$ROUTEADMINCLUDE" ] ; then | |
. "$ROUTEADMINCLUDE" | |
fi | |
# if there's no SMF, set some default DAEMON_ARGS | |
smf_present || DAEMON_ARGS="" | |
usage () { | |
if smf_present ; then | |
echo "Usage: $0 <daemon>"; | |
else | |
echo "Usage: $0 <stop|start> <daemon> <daemon arguments>"; | |
fi | |
echo "The --pid_file argument is implied"; | |
echo "This help message: $0 <help|usage>"; | |
} | |
# parse arguments, different according to SMF or not. | |
case $1 in | |
'help' | 'usage') | |
usage | |
exit $SMF_EXIT_OK | |
;; | |
esac | |
if smf_present ; then | |
QUAGGA_METHOD="start" | |
else | |
QUAGGA_METHOD="$1" | |
shift; | |
fi | |
DAEMON="$1" | |
# daemon path must be given | |
if [ -z "$DAEMON_PATH/$DAEMON" ]; then | |
usage | |
exit $SMF_EXIT_ERR_FATAL | |
fi | |
DAEMON_ARGS=`routeadm_daemon_args`; | |
routeadm_zebra_enable $DAEMON; | |
if [ ! -f "/opt/local/etc/zebra/${DAEMON}.conf" ] ; then | |
echo "Could not find config file, /opt/local/etc/zebra/${DAEMON}.conf" | |
exit $SMF_EXIT_ERR_CONFIG | |
fi | |
# we need /var/run/zebra to exist, it probably is on tmpfs. | |
if [ ! -d /var/run/zebra ] ; then | |
mkdir -p /var/run/zebra | |
chown quagga:quagga /var/run/zebra | |
chmod 751 /var/run/zebra | |
fi | |
PIDFILE="/var/run/zebra/${DAEMON}.pid" | |
start () { | |
if [ ! -x "$DAEMON_PATH/$DAEMON" ] ; then | |
echo "Error, could not find daemon, $DAEMON_PATH/$DAEMON" | |
exit $SMF_EXIT_ERR_FATAL | |
fi | |
eval exec $DAEMON_PATH/$DAEMON $DAEMON_ARGS --pid_file ${PIDFILE} & | |
} | |
stop_by_pidfile () { | |
if [ -f "${PIDFILE}" ]; then | |
/usr/bin/kill -TERM `/usr/bin/cat "${PIDFILE}"` | |
fi | |
} | |
case "$QUAGGA_METHOD" in | |
'start') | |
start | |
;; | |
'stop') | |
stop_by_pidfile | |
;; | |
*) | |
usage | |
exit $SMF_EXIT_ERR_FATAL | |
;; | |
esac | |
exit $SMF_EXIT_OK; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | |
<!-- | |
This file is part of Quagga. | |
Quagga is free software; you can redistribute it and/or modify it | |
under the terms of the GNU General Public License as published by the | |
Free Software Foundation; either version 2, or (at your option) any | |
later version. | |
Quagga is distributed in the hope that it will be useful, but | |
WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
General Public License for more details. | |
You should have received a copy of the GNU General Public License | |
along with Quagga; see the file COPYING. If not, write to the Free | |
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
02111-1307, USA. | |
Copyright 2007 Sun Microsystems, Inc. All rights reserved. | |
Use is subject to license terms. | |
ident "@(#)quagga.xml 1.0 05/03/15 SMI" | |
--> | |
<service_bundle type='manifest' name='SUNWquagga-daemons:quagga'> | |
<service | |
name='network/routing/zebra' | |
type='service' | |
version='1'> | |
<single_instance /> | |
<instance name='quagga' enabled='false'> | |
<dependency name='fs' | |
grouping='require_all' | |
restart_on='none' | |
type='service'> | |
<service_fmri | |
value='svc:/system/filesystem/usr:default' /> | |
</dependency> | |
<dependency name='net' | |
grouping='require_all' | |
restart_on='none' | |
type='service'> | |
<service_fmri value='svc:/network/initial' /> | |
</dependency> | |
<!-- do not not run unless routing-setup has run --> | |
<dependency | |
name='network_routing_setup' | |
grouping='require_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/routing-setup' /> | |
</dependency> | |
<exec_method | |
type='method' | |
name='start' | |
exec='/opt/local/lib/svc/method/quagga zebra' | |
timeout_seconds='60'> | |
<method_context> | |
<method_credential | |
user='root' group='root'/> | |
</method_context> | |
</exec_method> | |
<exec_method | |
type='method' | |
name='stop' | |
exec=':kill' | |
timeout_seconds='60'> | |
</exec_method> | |
<!-- if we define these properties at the service level, each | |
instance inherits them, and it can override with | |
desired values. | |
--> | |
<property_group name='startd' | |
type='framework'> | |
<!-- sub-process core dumps shouldn't restart session --> | |
<propval name='ignore_error' | |
type='astring' value='core,signal' /> | |
</property_group> | |
<!-- Properties in this group are used by routeadm (1M) --> | |
<property_group name='routeadm' type='application'> | |
<stability value='Unstable' /> | |
<!-- Identifies service as a routing service --> | |
<propval name='daemon' type='astring' | |
value='/opt/local/sbin/zebra' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<!-- zebra should not contribute to ipv4/ipv6 routing state --> | |
<propval name='protocol' type='astring' value='zebra' /> | |
</property_group> | |
<!-- Properties in this group are modifiable via routeadm (1M) --> | |
<property_group name='routing' type='application'> | |
<stability value='Evolving' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<!-- Options common to Quagga daemons | |
Property names are equivalent to the long | |
option name, consult Quagga documentation --> | |
<!-- The config file to use, if not the default --> | |
<propval name='config_file' type='astring' value=''/> | |
<!-- The vty_port to listen on if not the default. | |
0 to disable --> | |
<propval name='vty_port' type='integer' value='0' /> | |
<!-- The address to bind the VTY interface to, if not any. --> | |
<propval name='vty_address' type='astring' value='' /> | |
<!-- The user to switch to after startup, if not the default --> | |
<propval name='user' type='astring' value='' /> | |
<!-- The group to switch to, if not the default. | |
If user is specified, this defaults to a group with | |
same name as user --> | |
<propval name='group' type='astring' value='' /> | |
<!-- The pidfile to use, if not the default of | |
/var/run/quagga --> | |
<propval name='pid_file' type='astring' value='' /> | |
<!-- Options specific to zebra --> | |
<propval name='batch' type='boolean' value='false' /> | |
</property_group> | |
<property_group name='general' type='framework'> | |
<!-- to start stop routing services --> | |
<propval name='action_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
</property_group> | |
<template> | |
<common_name> | |
<loctext xml:lang='C'> | |
Quagga: zebra, RIB, kernel intermediary and misc daemon | |
</loctext> | |
</common_name> | |
<documentation> | |
<manpage title='zebra' section='1M' | |
manpath='/opt/local/man' /> | |
<doc_link name='quagga.net' | |
uri='http://www.quagga.net/' /> | |
</documentation> | |
</template> | |
</instance> | |
<stability value='Unstable' /> | |
</service> | |
<service | |
name='network/routing/rip' | |
type='service' | |
version='1'> | |
<instance name='quagga' enabled='false'> | |
<dependency name='fs' | |
grouping='require_all' | |
restart_on='none' | |
type='service'> | |
<service_fmri | |
value='svc:/system/filesystem/usr:default' /> | |
</dependency> | |
<dependency | |
name='ipv4-forwarding' | |
grouping='optional_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/ipv4-forwarding' /> | |
</dependency> | |
<!-- do not not run unless routing-setup has run --> | |
<dependency | |
name='network_routing_setup' | |
grouping='require_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/routing-setup' /> | |
</dependency> | |
<!-- ensure that restart of zebra is propogated to daemon --> | |
<dependency | |
name='zebra' | |
grouping='optional_all' | |
restart_on='restart' | |
type='service'> | |
<service_fmri value='svc:/network/routing/zebra:quagga' /> | |
</dependency> | |
<exec_method | |
type='method' | |
name='start' | |
exec='/opt/local/lib/svc/method/quagga ripd' | |
timeout_seconds='60'> | |
<method_context> | |
<method_credential | |
user='root' group='root'/> | |
</method_context> | |
</exec_method> | |
<exec_method | |
type='method' | |
name='stop' | |
exec=':kill' | |
timeout_seconds='60'> | |
</exec_method> | |
<property_group name='startd' | |
type='framework'> | |
<!-- sub-process core dumps shouldn't restart session --> | |
<propval name='ignore_error' | |
type='astring' value='core,signal' /> | |
</property_group> | |
<!-- Properties in this group are used by routeadm (1M) --> | |
<property_group name='routeadm' type='application'> | |
<stability value='Unstable' /> | |
<!-- Identifies service as a routing service --> | |
<propval name='daemon' type='astring' | |
value='/opt/local/sbin/ripd' /> | |
<propval name='legacy-daemon' type='astring' | |
value='/usr/sfw/sbin/ripdstart' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<propval name='protocol' type='astring' value='ipv4' /> | |
</property_group> | |
<!-- Properties in this group are modifiable via routeadm (1M) --> | |
<property_group name='routing' type='application'> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<!-- Options common to Quagga daemons --> | |
<!-- The config file to use, if not the default --> | |
<propval name='config_file' type='astring' value=''/> | |
<!-- The vty_port to listen on if not the default. | |
0 to disable --> | |
<propval name='vty_port' type='integer' value='0' /> | |
<!-- The address to bind the VTY interface to, if not any. --> | |
<propval name='vty_address' type='astring' value='' /> | |
<!-- The user to switch to after startup, if not the default --> | |
<propval name='user' type='astring' value='' /> | |
<!-- The group to switch to, if not the default. | |
If user is specified, this defaults to a group with | |
same name as user --> | |
<propval name='group' type='astring' value='' /> | |
<!-- The pidfile to use, if not the default of | |
/var/run/quagga --> | |
<propval name='pid_file' type='astring' value='' /> | |
<!-- Options specific to ripd --> | |
<propval name='retain' type='boolean' value='false' /> | |
</property_group> | |
<property_group name='general' type='framework'> | |
<!-- to start stop routing services --> | |
<propval name='action_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
</property_group> | |
<template> | |
<common_name> | |
<loctext xml:lang='C'> | |
Quagga: ripd, RIPv1/2 IPv4 routing protocol daemon. | |
</loctext> | |
</common_name> | |
<documentation> | |
<manpage title='ripd' section='1M' | |
manpath='/opt/local/man' /> | |
<doc_link name='quagga.net' | |
uri='http://www.quagga.net/' /> | |
</documentation> | |
</template> | |
</instance> | |
<stability value='Unstable' /> | |
</service> | |
<service | |
name='network/routing/ripng' | |
type='service' | |
version='1'> | |
<instance name='quagga' enabled='false'> | |
<dependency name='fs' | |
grouping='require_all' | |
restart_on='none' | |
type='service'> | |
<service_fmri | |
value='svc:/system/filesystem/usr:default' /> | |
</dependency> | |
<dependency | |
name='ipv6-forwarding' | |
grouping='optional_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/ipv6-forwarding' /> | |
</dependency> | |
<!-- do not not run unless routing-setup has run --> | |
<dependency | |
name='network_routing_setup' | |
grouping='require_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/routing-setup' /> | |
</dependency> | |
<!-- ensure that restart of zebra is propogated to daemon --> | |
<dependency | |
name='zebra' | |
grouping='optional_all' | |
restart_on='restart' | |
type='service'> | |
<service_fmri value='svc:/network/routing/zebra:quagga' /> | |
</dependency> | |
<exec_method | |
type='method' | |
name='start' | |
exec='/opt/local/lib/svc/method/quagga ripngd' | |
timeout_seconds='60'> | |
<method_context> | |
<method_credential | |
user='root' group='root'/> | |
</method_context> | |
</exec_method> | |
<exec_method | |
type='method' | |
name='stop' | |
exec=':kill' | |
timeout_seconds='60' > | |
</exec_method> | |
<property_group name='startd' | |
type='framework'> | |
<!-- sub-process core dumps shouldn't restart session --> | |
<propval name='ignore_error' | |
type='astring' value='core,signal' /> | |
</property_group> | |
<!-- Properties in this group are used by routeadm (1M) --> | |
<property_group name='routeadm' type='application'> | |
<stability value='Unstable' /> | |
<!-- Identifies service as a routing service --> | |
<propval name='daemon' type='astring' | |
value='/opt/local/sbin/ripngd' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<propval name='protocol' type='astring' value='ipv6'/> | |
</property_group> | |
<!-- Properties in this group are modifiable via routeadm (1M) --> | |
<property_group name='routing' type='application'> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<!-- Options common to Quagga daemons --> | |
<!-- The config file to use, if not the default --> | |
<propval name='config_file' type='astring' value=''/> | |
<!-- The vty_port to listen on if not the default. | |
0 to disable --> | |
<propval name='vty_port' type='integer' value='0' /> | |
<!-- The address to bind the VTY interface to, if not any. --> | |
<propval name='vty_address' type='astring' value='' /> | |
<!-- The user to switch to after startup, if not the default --> | |
<propval name='user' type='astring' value='' /> | |
<!-- The group to switch to, if not the default. | |
If user is specified, this defaults to a group with | |
same name as user --> | |
<propval name='group' type='astring' value='' /> | |
<!-- The pidfile to use, if not the default of | |
/var/run/quagga --> | |
<propval name='pid_file' type='astring' value='' /> | |
<!-- Options specific to ripngd --> | |
<propval name='retain' type='boolean' value='false' /> | |
</property_group> | |
<property_group name='general' type='framework'> | |
<!-- to start stop routing services --> | |
<propval name='action_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
</property_group> | |
<template> | |
<common_name> | |
<loctext xml:lang='C'> | |
Quagga: ripngd, RIPng IPv6 routing protocol daemon. | |
</loctext> | |
</common_name> | |
<documentation> | |
<manpage title='ripngd' section='1M' | |
manpath='/opt/local/man' /> | |
<doc_link name='quagga.net' | |
uri='http://www.quagga.net/' /> | |
</documentation> | |
</template> | |
</instance> | |
<stability value='Unstable' /> | |
</service> | |
<service | |
name='network/routing/ospf' | |
type='service' | |
version='1'> | |
<instance name='quagga' enabled='false'> | |
<dependency name='fs' | |
grouping='require_all' | |
restart_on='none' | |
type='service'> | |
<service_fmri | |
value='svc:/system/filesystem/usr:default' /> | |
</dependency> | |
<dependency | |
name='ipv4-forwarding' | |
grouping='optional_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/ipv4-forwarding' /> | |
</dependency> | |
<!-- do not not run unless routing-setup has run --> | |
<dependency | |
name='network_routing_setup' | |
grouping='require_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/routing-setup' /> | |
</dependency> | |
<!-- ensure that restart of zebra is propogated to daemon --> | |
<dependency | |
name='zebra' | |
grouping='optional_all' | |
restart_on='restart' | |
type='service'> | |
<service_fmri value='svc:/network/routing/zebra:quagga' /> | |
</dependency> | |
<exec_method | |
type='method' | |
name='start' | |
exec='/opt/local/lib/svc/method/quagga ospfd' | |
timeout_seconds='60'> | |
<method_context> | |
<method_credential | |
user='root' group='root'/> | |
</method_context> | |
</exec_method> | |
<!-- ospfd can take a long time to shutdown, due to graceful | |
shutdown | |
--> | |
<exec_method | |
type='method' | |
name='stop' | |
exec=':kill' | |
timeout_seconds='600'> | |
</exec_method> | |
<property_group name='startd' | |
type='framework'> | |
<!-- sub-process core dumps shouldn't restart session --> | |
<propval name='ignore_error' | |
type='astring' value='core,signal' /> | |
</property_group> | |
<!-- Properties in this group are used by routeadm (1M) --> | |
<property_group name='routeadm' type='application'> | |
<stability value='Unstable' /> | |
<!-- Identifies service as a routing service --> | |
<propval name='daemon' type='astring' | |
value='/opt/local/sbin/ospfd' /> | |
<propval name='legacy-daemon' type='astring' | |
value='/usr/sfw/sbin/ospfdstart' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<propval name='protocol' type='astring' value='ipv4'/> | |
</property_group> | |
<!-- Properties in this group are modifiable via routeadm (1M) --> | |
<property_group name='routing' type='application'> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<!-- Options common to Quagga daemons --> | |
<!-- The config file to use, if not the default --> | |
<propval name='config_file' type='astring' value=''/> | |
<!-- The vty_port to listen on if not the default. | |
0 to disable --> | |
<propval name='vty_port' type='integer' value='0' /> | |
<!-- The address to bind the VTY interface to, if not any. --> | |
<propval name='vty_address' type='astring' value='' /> | |
<!-- The user to switch to after startup, if not the default --> | |
<propval name='user' type='astring' value='' /> | |
<!-- The group to switch to, if not the default. | |
If user is specified, this defaults to a group with | |
same name as user --> | |
<propval name='group' type='astring' value='' /> | |
<!-- The pidfile to use, if not the default of | |
/var/run/quagga --> | |
<propval name='pid_file' type='astring' value='' /> | |
</property_group> | |
<property_group name='general' type='framework'> | |
<!-- to start stop routing services --> | |
<propval name='action_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
</property_group> | |
<template> | |
<common_name> | |
<loctext xml:lang='C'> | |
Quagga: ospfd, OSPFv2 IPv4 routing protocol daemon. | |
</loctext> | |
</common_name> | |
<documentation> | |
<manpage title='ospfd' section='1M' | |
manpath='/opt/local/man' /> | |
<doc_link name='quagga.net' | |
uri='http://www.quagga.net/' /> | |
</documentation> | |
</template> | |
</instance> | |
<stability value='Unstable' /> | |
</service> | |
<service | |
name='network/routing/ospf6' | |
type='service' | |
version='1'> | |
<instance name='quagga' enabled='false'> | |
<dependency name='fs' | |
grouping='require_all' | |
restart_on='none' | |
type='service'> | |
<service_fmri | |
value='svc:/system/filesystem/usr:default' /> | |
</dependency> | |
<dependency | |
name='ipv6-forwarding' | |
grouping='optional_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/ipv6-forwarding' /> | |
</dependency> | |
<!-- do not not run unless routing-setup has run --> | |
<dependency | |
name='network_routing_setup' | |
grouping='require_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/routing-setup' /> | |
</dependency> | |
<!-- ensure that restart of zebra is propogated to daemon --> | |
<dependency | |
name='zebra' | |
grouping='optional_all' | |
restart_on='restart' | |
type='service'> | |
<service_fmri value='svc:/network/routing/zebra:quagga' /> | |
</dependency> | |
<exec_method | |
type='method' | |
name='start' | |
exec='/opt/local/lib/svc/method/quagga ospf6d' | |
timeout_seconds='60'> | |
<method_context> | |
<method_credential | |
user='root' group='root'/> | |
</method_context> | |
</exec_method> | |
<exec_method | |
type='method' | |
name='stop' | |
exec=':kill' | |
timeout_seconds='60'> | |
</exec_method> | |
<property_group name='startd' | |
type='framework'> | |
<!-- sub-process core dumps shouldn't restart session --> | |
<propval name='ignore_error' | |
type='astring' value='core,signal' /> | |
</property_group> | |
<!-- Properties in this group are used by routeadm (1M) --> | |
<property_group name='routeadm' type='application'> | |
<stability value='Unstable' /> | |
<!-- Identifies service as a routing service --> | |
<propval name='daemon' type='astring' | |
value='/opt/local/sbin/ospf6d' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<propval name='protocol' type='astring' value='ipv6'/> | |
</property_group> | |
<!-- Properties in this group are modifiable via routeadm (1M) --> | |
<property_group name='routing' type='application'> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<!-- Options common to Quagga daemons --> | |
<!-- The config file to use, if not the default --> | |
<propval name='config_file' type='astring' value=''/> | |
<!-- The vty_port to listen on if not the default. | |
0 to disable --> | |
<propval name='vty_port' type='integer' value='0' /> | |
<!-- The address to bind the VTY interface to, if not any. --> | |
<propval name='vty_address' type='astring' value='' /> | |
<!-- The user to switch to after startup, if not the default --> | |
<propval name='user' type='astring' value='' /> | |
<!-- The group to switch to, if not the default. | |
If user is specified, this defaults to a group with | |
same name as user --> | |
<propval name='group' type='astring' value='' /> | |
<!-- The pidfile to use, if not the default of | |
/var/run/quagga --> | |
<propval name='pid_file' type='astring' value='' /> | |
</property_group> | |
<property_group name='general' type='framework'> | |
<!-- to start stop routing services --> | |
<propval name='action_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
</property_group> | |
<template> | |
<common_name> | |
<loctext xml:lang='C'> | |
Quagga: ospf6d, OSPFv3 IPv6 routing protocol daemon. | |
</loctext> | |
</common_name> | |
<documentation> | |
<manpage title='ospf6d' section='1M' | |
manpath='/opt/local/man' /> | |
<doc_link name='quagga.net' | |
uri='http://www.quagga.net/' /> | |
</documentation> | |
</template> | |
</instance> | |
<stability value='Unstable' /> | |
</service> | |
<service | |
name='network/routing/bgp' | |
type='service' | |
version='1'> | |
<instance name='quagga' enabled='false'> | |
<dependency name='fs' | |
grouping='require_all' | |
restart_on='none' | |
type='service'> | |
<service_fmri | |
value='svc:/system/filesystem/usr:default' /> | |
</dependency> | |
<dependency | |
name='ipv6-forwarding' | |
grouping='optional_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/ipv6-forwarding' /> | |
</dependency> | |
<dependency | |
name='ipv4-forwarding' | |
grouping='optional_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/ipv4-forwarding' /> | |
</dependency> | |
<!-- do not not run unless routing-setup has run --> | |
<dependency | |
name='network_routing_setup' | |
grouping='require_all' | |
restart_on='refresh' | |
type='service'> | |
<service_fmri value='svc:/network/routing-setup' /> | |
</dependency> | |
<!-- ensure that restart of zebra is propogated to daemon --> | |
<dependency | |
name='zebra' | |
grouping='optional_all' | |
restart_on='restart' | |
type='service'> | |
<service_fmri value='svc:/network/routing/zebra:quagga' /> | |
</dependency> | |
<exec_method | |
type='method' | |
name='start' | |
exec='/opt/local/lib/svc/method/quagga bgpd' | |
timeout_seconds='60'> | |
<method_context> | |
<method_credential | |
user='root' group='root'/> | |
</method_context> | |
</exec_method> | |
<exec_method | |
type='method' | |
name='stop' | |
exec=':kill' | |
timeout_seconds='60' > | |
</exec_method> | |
<property_group name='startd' | |
type='framework'> | |
<!-- sub-process core dumps shouldn't restart session --> | |
<propval name='ignore_error' | |
type='astring' value='core,signal' /> | |
</property_group> | |
<!-- Properties in this group are used by routeadm (1M) --> | |
<property_group name='routeadm' type='application'> | |
<stability value='Unstable' /> | |
<!-- Identifies service as a routing service --> | |
<propval name='daemon' type='astring' | |
value='/opt/local/sbin/bgpd' /> | |
<propval name='legacy-daemon' type='astring' | |
value='/usr/sfw/sbin/bgpdstart' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<property name='protocol' type='astring'> | |
<astring_list> | |
<value_node value='ipv4'/> | |
<value_node value='ipv6'/> | |
</astring_list> | |
</property> | |
</property_group> | |
<!-- Properties in this group are modifiable via routeadm (1M) --> | |
<property_group name='routing' type='application'> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.value.routing' /> | |
<!-- Options common to Quagga daemons. --> | |
<!-- The config file to use, if not the default --> | |
<propval name='config_file' type='astring' value=''/> | |
<!-- The vty_port to listen on if not the default. | |
0 to disable --> | |
<propval name='vty_port' type='integer' value='0' /> | |
<!-- The address to bind the VTY interface to, if not any. --> | |
<propval name='vty_address' type='astring' value='' /> | |
<!-- The user to switch to after startup, if not the default --> | |
<propval name='user' type='astring' value='' /> | |
<!-- The group to switch to, if not the default. | |
If user is specified, this defaults to a group with | |
same name as user --> | |
<propval name='group' type='astring' value='' /> | |
<!-- The pidfile to use, if not the default of | |
/var/run/quagga --> | |
<propval name='pid_file' type='astring' value='' /> | |
<!-- Options specific to bgpd --> | |
<propval name='retain' type='boolean' value='false' /> | |
<propval name='no_kernel' type='boolean' value='false' /> | |
<propval name='bgp_port' type='astring' value='' /> | |
<!-- | |
If enable_zebra is false, it will not be switched | |
on by the start method. | |
--> | |
<propval name='enable_zebra' type='boolean' value='true' /> | |
</property_group> | |
<property_group name='general' type='framework'> | |
<!-- to start stop routing services --> | |
<propval name='action_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
<propval name='value_authorization' type='astring' | |
value='solaris.smf.manage.routing' /> | |
</property_group> | |
<template> | |
<common_name> | |
<loctext xml:lang='C'> | |
Quagga: bgpd, BGP routing protocol daemon. | |
</loctext> | |
</common_name> | |
<documentation> | |
<manpage title='bgpd' section='1M' | |
manpath='/opt/local/man' /> | |
<doc_link name='quagga.net' | |
uri='http://www.quagga.net/' /> | |
</documentation> | |
</template> | |
</instance> | |
<stability value='Unstable' /> | |
</service> | |
</service_bundle> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment