From e24f0638e6fc7256580c185a631cbe5549bf7db3 Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Sun, 19 Feb 2006 18:59:26 +0000 Subject: [solaris] version depend files, auto-generate. Start zebra when needed. 2006-02-19 Paul Jakma * 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. --- solaris/ChangeLog | 12 ++++++++++++ solaris/Makefile.am | 12 ++++++++---- solaris/depend.daemons | 7 ------- solaris/depend.daemons.in | 8 ++++++++ solaris/depend.dev | 1 - solaris/depend.dev.in | 2 ++ solaris/depend.doc | 1 - solaris/depend.doc.in | 1 + solaris/depend.libs | 5 ----- solaris/depend.libs.in | 5 +++++ solaris/depend.smf | 6 ------ solaris/depend.smf.in | 7 +++++++ solaris/quagga.init.in | 19 +++++-------------- solaris/quagga.xml.in | 5 ----- 14 files changed, 48 insertions(+), 43 deletions(-) delete mode 100644 solaris/depend.daemons create mode 100644 solaris/depend.daemons.in delete mode 100644 solaris/depend.dev create mode 100644 solaris/depend.dev.in delete mode 100644 solaris/depend.doc create mode 100644 solaris/depend.doc.in delete mode 100644 solaris/depend.libs create mode 100644 solaris/depend.libs.in delete mode 100644 solaris/depend.smf create mode 100644 solaris/depend.smf.in diff --git a/solaris/ChangeLog b/solaris/ChangeLog index e3144dff..13862147 100644 --- a/solaris/ChangeLog +++ b/solaris/ChangeLog @@ -1,3 +1,15 @@ +2006-02-19 Paul Jakma + + * 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 * prototype.dev.in: lib/md5-gnu.h is now lib/md5.h 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 deleted file mode 100644 index 571d2e18..00000000 --- a/solaris/depend.daemons +++ /dev/null @@ -1,7 +0,0 @@ -P QUAGGAlibs Quagga common runtime libraries -P SUNWcsu Core Solaris, (Usr) -P SUNWcsr Core Solaris Libraries (Root) -P SUNWcnetr Core Solaris Network Infrastructure (Root) -I SUNWzebrar -I SUNWzebrau -I CSWzebra diff --git a/solaris/depend.daemons.in b/solaris/depend.daemons.in new file mode 100644 index 00000000..3430e8c9 --- /dev/null +++ b/solaris/depend.daemons.in @@ -0,0 +1,8 @@ +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) +I SUNWzebrar +I SUNWzebrau +I CSWzebra diff --git a/solaris/depend.dev b/solaris/depend.dev deleted file mode 100644 index 7d88070a..00000000 --- a/solaris/depend.dev +++ /dev/null @@ -1 +0,0 @@ -P QUAGGAlibs Quagga common runtime libraries diff --git a/solaris/depend.dev.in b/solaris/depend.dev.in new file mode 100644 index 00000000..8f234826 --- /dev/null +++ b/solaris/depend.dev.in @@ -0,0 +1,2 @@ +P QUAGGAlibs Quagga common runtime libraries + @PACKAGE_VERSION@,REV=@CONFDATE@ diff --git a/solaris/depend.doc b/solaris/depend.doc deleted file mode 100644 index b3379291..00000000 --- a/solaris/depend.doc +++ /dev/null @@ -1 +0,0 @@ -P SUNWdoc Documentation Tools diff --git a/solaris/depend.doc.in b/solaris/depend.doc.in new file mode 100644 index 00000000..b3379291 --- /dev/null +++ b/solaris/depend.doc.in @@ -0,0 +1 @@ +P SUNWdoc Documentation Tools diff --git a/solaris/depend.libs b/solaris/depend.libs deleted file mode 100644 index 41859770..00000000 --- a/solaris/depend.libs +++ /dev/null @@ -1,5 +0,0 @@ -P SUNWcslr Core Solaris Libraries (Root) -P SUNWcsl Core Solaris, (Shared Libs) -P SUNWlibmsr Math & Microtasking Libraries (Root) -R QUAGGAdaemons Quagga daemons -R QUAGGAdev diff --git a/solaris/depend.libs.in b/solaris/depend.libs.in new file mode 100644 index 00000000..41859770 --- /dev/null +++ b/solaris/depend.libs.in @@ -0,0 +1,5 @@ +P SUNWcslr Core Solaris Libraries (Root) +P SUNWcsl Core Solaris, (Shared Libs) +P SUNWlibmsr Math & Microtasking Libraries (Root) +R QUAGGAdaemons Quagga daemons +R QUAGGAdev diff --git a/solaris/depend.smf b/solaris/depend.smf deleted file mode 100644 index d648708a..00000000 --- a/solaris/depend.smf +++ /dev/null @@ -1,6 +0,0 @@ -P QUAGGAdaemons Quagga daemons -P SUNWcsu Core Solaris, (Usr) -P SUNWcsr Core Solaris Libraries (Root) -I SUNWzebrar -I SUNWzebrau -I CSWzebra diff --git a/solaris/depend.smf.in b/solaris/depend.smf.in new file mode 100644 index 00000000..d078ea8e --- /dev/null +++ b/solaris/depend.smf.in @@ -0,0 +1,7 @@ +P QUAGGAdaemons Quagga daemons + @PACKAGE_VERSION@,REV=@CONFDATE@ +P SUNWcsu Core Solaris, (Usr) +P SUNWcsr Core Solaris Libraries (Root) +I SUNWzebrar +I SUNWzebrau +I CSWzebra diff --git a/solaris/quagga.init.in b/solaris/quagga.init.in index ba3b484a..1fa98765 100755 --- a/solaris/quagga.init.in +++ b/solaris/quagga.init.in @@ -3,7 +3,7 @@ # 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.5 2006/02/19 18:59:26 paul Exp $ # # Starts/stops the appropriate daemon @@ -35,7 +35,10 @@ fi svcs ${FMRI} > /dev/null 2>&1 || exit $SMF_EXIT_ERR_CONFIG case ${INSTANCE} in - zebra | ospfd | ospf6d | ripd | ripngd | bgpd ) + zebra | bgpd ) + ;; + ospfd | ospf6d | ripd | ripngd ) + /usr/sbin/svcadm enable zebra ;; *) usage @@ -77,9 +80,6 @@ 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. if [ ! -d @quagga_statedir@ ] ; then mkdir -p @quagga_statedir@ @@ -97,12 +97,6 @@ stop () { fi } -restart() { - stop ${INSTANCE} - sleep 1 - start ${INSTANCE} -} - case $1 in 'start') start ${2} @@ -111,9 +105,6 @@ case $1 in stop ${2} ;; -'restart') - restart ${2} - ;; *) usage exit 1 diff --git a/solaris/quagga.xml.in b/solaris/quagga.xml.in index dfa2eb6b..5ce4aceb 100644 --- a/solaris/quagga.xml.in +++ b/solaris/quagga.xml.in @@ -48,11 +48,6 @@ exec='/lib/svc/method/quagga stop %f %i' timeout_seconds='60' /> -