summaryrefslogtreecommitdiff
path: root/solaris
diff options
context:
space:
mode:
Diffstat (limited to 'solaris')
-rw-r--r--solaris/ChangeLog53
-rw-r--r--solaris/Makefile.am12
-rw-r--r--solaris/depend.daemons.in (renamed from solaris/depend.daemons)1
-rw-r--r--solaris/depend.dev.in (renamed from solaris/depend.dev)1
-rw-r--r--solaris/depend.doc.in (renamed from solaris/depend.doc)0
-rw-r--r--solaris/depend.libs.in (renamed from solaris/depend.libs)0
-rw-r--r--solaris/depend.smf.in (renamed from solaris/depend.smf)2
-rwxr-xr-xsolaris/quagga.init.in143
-rw-r--r--solaris/quagga.xml.in700
9 files changed, 620 insertions, 292 deletions
diff --git a/solaris/ChangeLog b/solaris/ChangeLog
index e3144dff..fac941d6 100644
--- a/solaris/ChangeLog
+++ b/solaris/ChangeLog
@@ -1,3 +1,54 @@
+2006-03-16 Paul Jakma <paul.jakma@sun.com>
+
+ * prototype.smf.in: Oops, continue to install manifest to
+ var/svc/manifest/network for now.
+
+2006-03-13 Alan Maguire <alan.maguire@sun.com>
+
+ * quagga.xml.in: Change the naming of services and instances.
+ network/routing/quagga:<daemon> may be neat and tidy, but
+ it's at odds with SMF convention elsewhere that demands
+ the service be named for what it does, and the instance name
+ describe the implementation (e.g. network/smtp:sendmail).
+ Remove call to method script for 'stop', SMF can do that
+ itself.
+ Enumerate the privileges required in the SMF manifest, with the
+ method_credential element.
+ Dont try provide seperate properties for each argument, it's
+ just tedious, particularly when they can no longer be
+ inherited from a common quagga service - use a single
+ "daemon-args" property, defaulting to -P 0.
+ Specify authorisation for the 'routeadm' utility and for
+ RBAC.
+
+2006-03-13 Paul Jakma <paul.jakma@sun.com>
+
+ * quagga.init.in: Update to match SMF manifest changes.
+ If run from an SMF environment, assume method is start.
+ Offer a more tradition init script interface for pre-SMF.
+ Enable zebra for the link-state daemons.
+ Don't allow daemons to start in non-global zones, except
+ for bgpd - it doesn't have to care about underlying
+ networking much.
+ Remove all the svcprop calls, SMF or the user will supply any
+ arguments on the command-line.
+ * depend.smf.in: Add dependency on SUNWroute, which provides
+ routeadm, which provides /var/svc/manifest/network/routing
+ * prototype.smf.in: Install manifest to
+ var/svc/manifest/network/routing.
+
+2006-02-19 Paul Jakma <paul.jakma@sun.com>
+
+ * depend.*: renamed to depend.*.in.
+ * depend.*.in: Add version dependency.
+ * Makefile.am: Generate depend.* from depend.*.in
+ Distribute the depend.*.in files rather than the depend.*
+ files.
+ * quagga.init.in: Enable zebra if one of the link-state
+ daemons is started.
+ Restart method is not required - SMF handles that.
+ * quagga.xml.in: Remove restart method details.
+
2005-11-04 Paul Jakma <paul.jakma@sun.com>
* prototype.dev.in: lib/md5-gnu.h is now lib/md5.h
@@ -84,4 +135,4 @@
* depend.*: Solaris 10 dependencies for packages, referenced by
prototype files.
* .cvsignore: Add built files
- * README.txt: new file, package creation, install, usage notes. \ No newline at end of file
+ * README.txt: new file, package creation, install, usage notes.
diff --git a/solaris/Makefile.am b/solaris/Makefile.am
index 82da3145..acccbdbc 100644
--- a/solaris/Makefile.am
+++ b/solaris/Makefile.am
@@ -1,5 +1,5 @@
# Solaris packages automake file
-# $Id: Makefile.am,v 1.6 2005/05/13 07:26:07 paul Exp $
+# $Id: Makefile.am,v 1.7 2006/02/19 18:59:26 paul Exp $
.PHONY: packages
@@ -83,6 +83,10 @@ prototype.%: $(srcdir)/prototype.%.in Makefile
%.xml: $(srcdir)/%.xml.in Makefile
rm -f $@
$(edit) $< > $@
+# use edit to construct the depend files
+depend.%: $(srcdir)/depend.%.in Makefile
+ rm -f $@
+ $(edit) $< > $@
# method file (bit like init script)
quagga.init: $(srcdir)/quagga.init.in Makefile
@@ -102,13 +106,13 @@ quagga.init: $(srcdir)/quagga.init.in Makefile
#BUILT_SOURCES = pkginfo.daemons pkginfo.dev pkginfo.doc pkginfo.libs \
# prototype.daemons prototype.dev prototype.doc prototype.libs
BUILT_SOURCES = $(pkg_pkginfos) pkginfo.tmpl $(pkg_prototypes) \
- $(pkg_manifests) quagga.init
+ $(pkg_manifests) $(pkg_depends) quagga.init
CLEANFILES := $(BUILT_SOURCES) $(pkg_packages)
-EXTRA_DIST := $(pkg_depends) $(pkg_manifests:%=%.in) $(pkg_prototypes:%=%.in) \
+EXTRA_DIST := $(pkg_manifests:%=%.in) $(pkg_prototypes:%=%.in) \
$(pkg_names:%=pkginfo.%.tmpl.in) $(srcdir)/pkginfo.tmpl.in \
- quagga.init.in README.txt
+ $(pkg_depends:%=%.in) quagga.init.in README.txt
pkg-root-install:
(cd $(top_builddir) && \
diff --git a/solaris/depend.daemons b/solaris/depend.daemons.in
index 571d2e18..3430e8c9 100644
--- a/solaris/depend.daemons
+++ b/solaris/depend.daemons.in
@@ -1,4 +1,5 @@
P QUAGGAlibs Quagga common runtime libraries
+ @PACKAGE_VERSION@,REV=@CONFDATE@
P SUNWcsu Core Solaris, (Usr)
P SUNWcsr Core Solaris Libraries (Root)
P SUNWcnetr Core Solaris Network Infrastructure (Root)
diff --git a/solaris/depend.dev b/solaris/depend.dev.in
index 7d88070a..8f234826 100644
--- a/solaris/depend.dev
+++ b/solaris/depend.dev.in
@@ -1 +1,2 @@
P QUAGGAlibs Quagga common runtime libraries
+ @PACKAGE_VERSION@,REV=@CONFDATE@
diff --git a/solaris/depend.doc b/solaris/depend.doc.in
index b3379291..b3379291 100644
--- a/solaris/depend.doc
+++ b/solaris/depend.doc.in
diff --git a/solaris/depend.libs b/solaris/depend.libs.in
index 41859770..41859770 100644
--- a/solaris/depend.libs
+++ b/solaris/depend.libs.in
diff --git a/solaris/depend.smf b/solaris/depend.smf.in
index d648708a..6d928d2d 100644
--- a/solaris/depend.smf
+++ b/solaris/depend.smf.in
@@ -1,6 +1,8 @@
P QUAGGAdaemons Quagga daemons
+ @PACKAGE_VERSION@,REV=@CONFDATE@
P SUNWcsu Core Solaris, (Usr)
P SUNWcsr Core Solaris Libraries (Root)
+P SUNWroute Network Routing daemons/commands (Usr)
I SUNWzebrar
I SUNWzebrau
I CSWzebra
diff --git a/solaris/quagga.init.in b/solaris/quagga.init.in
index ba3b484a..9fc2fe74 100755
--- a/solaris/quagga.init.in
+++ b/solaris/quagga.init.in
@@ -1,94 +1,104 @@
#!/sbin/sh
#
-# Copyright 2001,2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2001,2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# $Id: quagga.init.in,v 1.4 2005/06/15 11:00:11 paul Exp $
+# $Id: quagga.init.in,v 1.6 2006/03/30 13:38:28 paul Exp $
#
-# Starts/stops the appropriate daemon
+# Starts/stops the given daemon
SMFINCLUDE=/lib/svc/share/smf_include.sh
+DAEMON_PATH=@sbindir@
+quagga_is_globalzone () {
+ if [ "${QUAGGA_INIT_ZONENAME:=`/sbin/zonename`}" != "global" ]; then
+ return 1
+ else
+ return 0
+ 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
. "$SMFINCLUDE";
+else
+ # pre-SMF system, fake up any functions and exit codes
+ # which SMFINCLUDE usually provides.
+ smf_present () {
+ return 1
+ }
+ SMF_EXIT_OK=0;
+ SMF_EXIT_ERR_CONFIG=96;
+ SMF_EXIT_ERR_FATAL=95;
fi
+
+# if there's no SMF, set some default DAEMON_ARGS
+smf_present || DAEMON_ARGS=""
usage () {
- echo "Usage: $0 (start|stop) <fmri> <instance>";
-}
+ if smf_present ; then
+ echo "Usage: $0 <daemon> <daemon arguments>";
+ 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
- ;;
+ usage
+ exit SMF_EXIT_OK
+ ;;
esac
-# fmri and instance must be given.
-FMRI="$2"
-INSTANCE="$3"
-if [ -z "$FMRI" -o -z "$INSTANCE" ]; then
- usage
- exit $SMF_EXIT_ERR_CONFIG
+if smf_present ; then
+ QUAGGA_METHOD="start"
+else
+ QUAGGA_METHOD="$1"
+ shift;
fi
-# fmri must exist
-svcs ${FMRI} > /dev/null 2>&1 || exit $SMF_EXIT_ERR_CONFIG
+DAEMON="$1"
+shift
+DAEMON_ARGS="$@"
+
+# daemon path must be given
+if [ -z "$DAEMON_PATH/$DAEMON" ]; then
+ usage
+ exit $SMF_EXIT_ERR_FATAL
+fi
-case ${INSTANCE} in
- zebra | ospfd | ospf6d | ripd | ripngd | bgpd )
+# only bgpd is suitable for running in a non-global zone, at this
+# time.
+case "${DAEMON}" in
+ zebra)
+ quagga_is_globalzone || exit $SMF_EXIT_OK
+ ;;
+ bgpd)
+ ;;
+ ospfd | ospf6d | ripd | ripngd )
+ quagga_is_globalzone || exit $SMF_EXIT_OK
;;
*)
- usage
- exit $SMF_EXIT_ERR_CONFIG;
+ usage
+ exit $SMF_EXIT_ERR_CONFIG;
;;
esac
-svcprop -q -p @PACKAGE_TARNAME@/config_file ${FMRI} && \
- CONFFILE=`svcprop -p @PACKAGE_TARNAME@/config_file ${FMRI}`
-svcprop -q -p @PACKAGE_TARNAME@/pid_file ${FMRI} && \
- PIDFILE=`svcprop -p @PACKAGE_TARNAME@/pid_file ${FMRI}`
-svcprop -q -p @PACKAGE_TARNAME@/user ${FMRI} && \
- USER=`svcprop -p @PACKAGE_TARNAME@/user ${FMRI}`
-svcprop -q -p @PACKAGE_TARNAME@/group ${FMRI} && \
- GROUP=`svcprop -p @PACKAGE_TARNAME@/group ${FMRI}`
-svcprop -q -p @PACKAGE_TARNAME@/vty_addr ${FMRI} && \
- VTYADDR=`svcprop -p @PACKAGE_TARNAME@/vty_addr ${FMRI}`
-svcprop -q -p @PACKAGE_TARNAME@/vty_port ${FMRI} && \
- VTYPORT=`svcprop -p @PACKAGE_TARNAME@/vty_port ${FMRI}`
-
-[ -n "${CONFFILE}" ] && ARGS=" -f ${CONFFILE}"
-[ -n "${PIDFILE}" ] && ARGS="${ARGS} --pid_file ${PIDFILE}"
-[ -n "${USER}" ] && ARGS="${ARGS} --user ${USER}"
-[ -n "${GROUP}" ] && ARGS="${ARGS} --group ${GROUP}"
-
-# vty should default to disabled, ie port == 0
-[ -z "${VTYPORT}" ] && VTYPORT=0
-ARGS="${ARGS} --vty_port ${VTYPORT}"
-
-# default listen address should be localhost
-[ -z "${VTYADDR}" ] && VTYADDR=127.1
-ARGS="${ARGS} --vty_addr ${VTYADDR}"
-
-# have to have a pid file for script to work
-# we can assume it otherwise
-if [ -z "${PIDFILE}" ]; then
- PIDFILE="@quagga_statedir@/${INSTANCE}.pid"
-else
- ARGS="${ARGS} --pid_file ${PIDFILE}"
-fi
-
-# config file must exist
-#[ ! -f "$CONFFILE" ] && exit $SMF_EXIT_ERR_CONFIG
-
-# we need @quagga_statedir@ to exist, it might be on tmpfs.
+# we need @quagga_statedir@ to exist, it probably is on tmpfs.
if [ ! -d @quagga_statedir@ ] ; then
mkdir -p @quagga_statedir@
chown @enable_user@:@enable_group@ @quagga_statedir@
chmod 751 @quagga_statedir@
fi
+PIDFILE="@quagga_statedir@/${DAEMON}.pid"
+
start () {
- @sbindir@/${INSTANCE} ${ARGS} &
+ $DAEMON_PATH/$DAEMON $DAEMON_ARGS --pid_file ${PIDFILE} &
}
stop () {
@@ -97,26 +107,17 @@ stop () {
fi
}
-restart() {
- stop ${INSTANCE}
- sleep 1
- start ${INSTANCE}
-}
-
-case $1 in
+case "$QUAGGA_METHOD" in
'start')
- start ${2}
+ start
;;
'stop')
- stop ${2}
+ stop
;;
-'restart')
- restart ${2}
- ;;
*)
usage
- exit 1
+ exit SMF_EXIT_ERR_FATAL
;;
esac
diff --git a/solaris/quagga.xml.in b/solaris/quagga.xml.in
index dfa2eb6b..45fa2148 100644
--- a/solaris/quagga.xml.in
+++ b/solaris/quagga.xml.in
@@ -8,15 +8,13 @@
-->
<service_bundle type='manifest' name='QUAGGAdaemons:quagga'>
-
<service
- name='network/routing/quagga'
+ name='network/routing/zebra'
type='service'
version='1'>
- <!--
- common service-level dependencies, inherited by each instance
- -->
+ <instance name='quagga' enabled='false'>
+
<dependency name='fs'
grouping='require_all'
restart_on='none'
@@ -24,38 +22,44 @@
<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/loopback' />
+ <service_fmri value='svc:/network/initial' />
</dependency>
- <!--
- we define exec methods at the top level, and the
- instance name is substituted for the %i on calling.
- See smf_method(1M) for more switches.
- -->
+ <dependency name='config_data'
+ grouping='require_all'
+ restart_on='restart'
+ type='path'>
+ <service_fmri
+ value='file://localhost/@sysconfdir@/zebra.conf' />
+ </dependency>
+
<exec_method
type='method'
name='start'
- exec='/lib/svc/method/quagga start %f %i'
- timeout_seconds='60'/>
+ exec='/lib/svc/method/quagga zebra %{routing/daemon-args}'
+ timeout_seconds='60'>
+ <method_context>
+ <method_credential
+ user='root' group='root'
+ privileges='basic,net_icmpaccess,net_rawaccess,sys_admin,sys_net_config'/>
+ </method_context>
+ </exec_method>
<exec_method
type='method'
name='stop'
- exec='/lib/svc/method/quagga stop %f %i'
- timeout_seconds='60' />
+ exec=':kill'
+ timeout_seconds='60'>
+ </exec_method>
- <exec_method
- type='method'
- name='restart'
- exec='/lib/svc/method/quagga restart %f %i'
- timeout_seconds='60' />
- <!--
- if we define these properties at the service level, each instance
- inherits them, and it can override with desired values.
+ <!-- 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'>
@@ -63,231 +67,495 @@
<propval name='ignore_error'
type='astring' value='core,signal' />
</property_group>
- <property_group name='quagga' type='application'>
- <!-- Options common to Quagga daemons -->
- <propval name='vty_addr' type='astring' value='127.1' />
- <propval name='vty_port' type='integer' value='0'/>
- <propval name='user' type='astring' value='@enable_user@' />
- <propval name='group' type='astring' value='@enable_group@' />
- <propval name='retain' type='boolean' value='false'/>
+
+ <property_group name='routing' type='application'>
+ <propval name='value_authorization' type='astring'
+ value='solaris.smf.modify.routing' />
+ <propval name='daemon-args' type='astring' value='-P 0'/>
</property_group>
- <instance name='zebra' enabled='false'>
- <!--
- now define it's own dependencies/properties etc here, it'll
- inherit the rest...
- -->
- <dependency name='config_data'
- grouping='require_all'
- restart_on='restart'
- type='path'>
- <service_fmri
- value='file://localhost/@sysconfdir@/zebra.conf' />
- </dependency>
- <property_group name='quagga' type='application'>
- <propval name='keep_kernel' type='boolean'
- value='false'/>
- </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='@mandir@' />
- </documentation>
- </template>
+ <property_group name='general' type='framework'>
+ <!-- to start stop routing services -->
+ <propval name='action_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='@mandir@' />
+ <doc_link name='quagga.net'
+ uri='http://www.quagga.net/' />
+ </documentation>
+ </template>
</instance>
+ <stability value='Evolving' />
+</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>
- <instance name='bgpd' enabled='false'>
- <!--
- now define it's own dependencies/properties etc here, it'll
- inherit the rest...
- -->
- <dependency name='zebra'
- grouping='optional_all'
- restart_on='restart'
- type='service'>
- <service_fmri value='svc:/network/routing/quagga:zebra' />
- </dependency>
- <dependency name='config_data'
+ <dependency name='net'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/routing/ipv4-routing' />
+ </dependency>
+
+ <dependency name='zebra'
grouping='require_all'
restart_on='restart'
- type='path'>
- <service_fmri
- value='file://localhost/@sysconfdir@/bgpd.conf' />
- </dependency>
- <property_group name='quagga' type='application'>
- <propval name='no_kernel' type='boolean'
- value='false'/>
- </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='@mandir@' />
- <doc_link name='quagga.net'
- uri='http://www.quagga.net/' />
- </documentation>
- </template>
+ type='service'>
+ <service_fmri value='svc:/network/routing/zebra:quagga' />
+ </dependency>
+
+ <dependency name='config_data'
+ grouping='require_all'
+ restart_on='restart'
+ type='path'>
+ <service_fmri
+ value='file://localhost/@sysconfdir@/ripd.conf' />
+ </dependency>
+
+ <exec_method
+ type='method'
+ name='start'
+ exec='/lib/svc/method/quagga ripd %{routing/daemon-args}'
+ timeout_seconds='60'>
+ <method_context>
+ <method_credential
+ user='root' group='root'
+ privileges='basic,net_icmpaccess,net_privaddr,net_rawaccess'/>
+ </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>
+
+ <property_group name='routing' type='application'>
+ <propval name='value_authorization' type='astring'
+ value='solaris.smf.modify.routing' />
+ <propval name='daemon-args' type='astring' value='-P 0'/>
+ </property_group>
+
+ <property_group name='general' type='framework'>
+ <!-- to start stop routing services -->
+ <propval name='action_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='@mandir@' />
+ <doc_link name='quagga.net'
+ uri='http://www.quagga.net/' />
+ </documentation>
+ </template>
</instance>
+ <stability value='Evolving' />
+</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>
- <instance name='ospf6d' enabled='false'>
- <!--
- now define it's own dependencies/properties etc here, it'll
- inherit the rest...
- -->
- <dependency name='zebra'
+ <dependency name='net'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/routing/ipv6-routing' />
+ </dependency>
+
+ <dependency name='zebra'
grouping='require_all'
restart_on='restart'
type='service'>
- <service_fmri value='svc:/network/routing/quagga:zebra' />
- </dependency>
- <dependency name='config_data'
- grouping='require_all'
- restart_on='restart'
- type='path'>
- <service_fmri
- value='file://localhost/@sysconfdir@/ospf6d.conf' />
- </dependency>
- <template>
- <common_name>
- <loctext xml:lang='C'>
- Quagga: ospf6d, OSPFv3 IPv6 routing protocol daemon.
- </loctext>
- </common_name>
- <documentation>
- <manpage title='ospf6d' section='1M'
- manpath='@mandir@' />
- <doc_link name='quagga.net'
- uri='http://www.quagga.net/' />
- </documentation>
- </template>
+ <service_fmri value='svc:/network/routing/zebra:quagga' />
+ </dependency>
+
+ <dependency name='config_data'
+ grouping='require_all'
+ restart_on='restart'
+ type='path'>
+ <service_fmri
+ value='file://localhost/@sysconfdir@/ripngd.conf' />
+ </dependency>
+
+ <exec_method
+ type='method'
+ name='start'
+ exec='/lib/svc/method/quagga ripngd %{routing/daemon-args}'
+ timeout_seconds='60'>
+ <method_context>
+ <method_credential
+ user='root' group='root'
+ privileges='basic,net_icmpaccess,net_privaddr,net_rawaccess'/>
+ </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>
+
+ <property_group name='routing' type='application'>
+ <propval name='value_authorization' type='astring'
+ value='solaris.smf.modify.routing' />
+ <propval name='daemon-args' type='astring' value='-P 0'/>
+ </property_group>
+ <property_group name='general' type='framework'>
+ <!-- to start stop routing services -->
+ <propval name='action_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='@mandir@' />
+ <doc_link name='quagga.net'
+ uri='http://www.quagga.net/' />
+ </documentation>
+ </template>
</instance>
+ <stability value='Evolving' />
+</service>
- <instance name='ospfd' enabled='false'>
- <!--
- now define it's own dependencies/properties etc here, it'll
- inherit the rest...
- -->
- <dependency name='zebra'
+<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='net'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/routing/ipv4-routing' />
+ </dependency>
+
+ <dependency name='zebra'
grouping='require_all'
restart_on='restart'
type='service'>
- <service_fmri value='svc:/network/routing/quagga:zebra' />
- </dependency>
- <dependency name='config_data'
- grouping='require_all'
- restart_on='restart'
- type='path'>
- <service_fmri
- value='file://localhost/@sysconfdir@/ospfd.conf' />
- </dependency>
- <property_group name='quagga' type='application'>
- <propval name='retain_routes' type='boolean' value='false'/>
- </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='@mandir@' />
- <doc_link name='quagga.net'
- uri='http://www.quagga.net/' />
- </documentation>
- </template>
+ <service_fmri value='svc:/network/routing/zebra:quagga' />
+ </dependency>
+
+ <dependency name='config_data'
+ grouping='require_all'
+ restart_on='restart'
+ type='path'>
+ <service_fmri
+ value='file://localhost/@sysconfdir@/ospfd.conf' />
+ </dependency>
+
+ <exec_method
+ type='method'
+ name='start'
+ exec='/lib/svc/method/quagga ospfd %{routing/daemon-args}'
+ timeout_seconds='60'>
+ <method_context>
+ <method_credential
+ user='root' group='root'
+ privileges='basic,net_icmpaccess,net_privaddr,net_rawaccess,sys_net_config'/>
+ </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>
+
+ <property_group name='routing' type='application'>
+ <propval name='value_authorization' type='astring'
+ value='solaris.smf.modify.routing' />
+ <propval name='daemon-args' type='astring' value='-P 0'/>
+ </property_group>
+
+ <property_group name='general' type='framework'>
+ <!-- to start stop routing services -->
+ <propval name='action_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='@mandir@' />
+ <doc_link name='quagga.net'
+ uri='http://www.quagga.net/' />
+ </documentation>
+ </template>
</instance>
+ <stability value='Evolving' />
+</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='net'
+ grouping='require_all'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/routing/ipv6-routing' />
+ </dependency>
- <instance name='ripd' enabled='false'>
- <!--
- now define it's own dependencies/properties etc here, it'll
- inherit the rest...
- -->
- <dependency name='zebra'
+ <dependency name='zebra'
grouping='require_all'
restart_on='restart'
type='service'>
- <service_fmri value='svc:/network/routing/quagga:zebra' />
- </dependency>
- <dependency name='config_data'
- grouping='require_all'
- restart_on='restart'
- type='path'>
- <service_fmri
- value='file://localhost/@sysconfdir@/ripd.conf' />
- </dependency>
- <property_group name='quagga' type='application'>
- <propval name='retain_routes' type='boolean' value='false'/>
- </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='@mandir@' />
- <doc_link name='quagga.net'
- uri='http://www.quagga.net/' />
- </documentation>
- </template>
+ <service_fmri value='svc:/network/routing/zebra:quagga' />
+ </dependency>
+
+ <dependency name='config_data'
+ grouping='require_all'
+ restart_on='restart'
+ type='path'>
+ <service_fmri
+ value='file://localhost/@sysconfdir@/ospf6d.conf' />
+ </dependency>
+
+ <exec_method
+ type='method'
+ name='start'
+ exec='/lib/svc/method/quagga ospf6d %{routing/daemon-args}'
+ timeout_seconds='60'>
+ <method_context>
+ <method_credential
+ user='root' group='root'
+ privileges='basic,net_icmpaccess,net_privaddr,net_rawaccess'/>
+ </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>
+ <property_group name='routing' type='application'>
+ <propval name='value_authorization' type='astring'
+ value='solaris.smf.modify.routing' />
+ <propval name='daemon-args' type='astring' value='-P 0'/>
+ </property_group>
+
+ <property_group name='general' type='framework'>
+ <!-- to start stop routing services -->
+ <propval name='action_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='@mandir@' />
+ <doc_link name='quagga.net'
+ uri='http://www.quagga.net/' />
+ </documentation>
+ </template>
</instance>
+ <stability value='Evolving' />
+</service>
- <instance name='ripngd' enabled='false'>
- <!--
- now define it's own dependencies/properties etc here, it'll
- inherit the rest...
- -->
- <dependency name='zebra'
- grouping='require_all'
+
+<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='net'
+ grouping='require_any'
+ restart_on='none'
+ type='service'>
+ <service_fmri value='svc:/network/routing/ipv6-routing' />
+ <service_fmri value='svc:/network/routing/ipv4-routing' />
+ </dependency>
+
+ <dependency name='zebra'
+ grouping='optional_all'
restart_on='restart'
type='service'>
- <service_fmri value='svc:/network/routing/quagga:zebra' />
- </dependency>
- <dependency name='config_data'
- grouping='require_all'
- restart_on='restart'
- type='path'>
- <service_fmri
- value='file://localhost/@sysconfdir@/ripngd.conf' />
- </dependency>
- <property_group name='quagga' type='application'>
- <propval name='retain_routes' type='boolean'
- value='false'/>
- </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='@mandir@' />
- <doc_link name='quagga.net'
- uri='http://www.quagga.net/' />
- </documentation>
- </template>
+ <service_fmri value='svc:/network/routing/zebra:quagga' />
+ </dependency>
- </instance>
+ <dependency name='config_data'
+ grouping='require_all'
+ restart_on='restart'
+ type='path'>
+ <service_fmri
+ value='file://localhost/@sysconfdir@/bgpd.conf' />
+ </dependency>
+
+ <exec_method
+ type='method'
+ name='start'
+ exec='/lib/svc/method/quagga bgpd %{routing/daemon-args}'
+ timeout_seconds='60'>
+ <method_context>
+ <method_credential
+ user='root' group='root'
+ privileges='basic,net_icmpaccess,net_privaddr,net_rawaccess'/>
+ </method_context>
+ </exec_method>
- <stability value='Evolving' />
+ <exec_method
+ type='method'
+ name='stop'
+ exec=':kill'
+ timeout_seconds='60' >
+ </exec_method>
-</service>
+ <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>
+
+ <property_group name='routing' type='application'>
+ <propval name='value_authorization' type='astring'
+ value='solaris.smf.modify.routing' />
+ <propval name='daemon-args' type='astring' value='-P 0'/>
+ </property_group>
+
+ <property_group name='general' type='framework'>
+ <!-- to start stop routing services -->
+ <propval name='action_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='@mandir@' />
+ <doc_link name='quagga.net'
+ uri='http://www.quagga.net/' />
+ </documentation>
+ </template>
+ </instance>
+ <stability value='Evolving' />
+</service>
</service_bundle>