]> git.proxmox.com Git - mirror_frr.git/commitdiff
[solaris] version depend files, auto-generate. Start zebra when needed.
authorPaul Jakma <paul.jakma@sun.com>
Sun, 19 Feb 2006 18:59:26 +0000 (18:59 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Sun, 19 Feb 2006 18:59:26 +0000 (18:59 +0000)
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.

14 files changed:
solaris/ChangeLog
solaris/Makefile.am
solaris/depend.daemons [deleted file]
solaris/depend.daemons.in [new file with mode: 0644]
solaris/depend.dev [deleted file]
solaris/depend.dev.in [new file with mode: 0644]
solaris/depend.doc [deleted file]
solaris/depend.doc.in [new file with mode: 0644]
solaris/depend.libs [deleted file]
solaris/depend.libs.in [new file with mode: 0644]
solaris/depend.smf [deleted file]
solaris/depend.smf.in [new file with mode: 0644]
solaris/quagga.init.in
solaris/quagga.xml.in

index e3144dffab675a618a9dba6427b49d96bbcdcd85..138621474be9f8abefa8db75929eb9a20cae2f13 100644 (file)
@@ -1,3 +1,15 @@
+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
index 82da3145b3476fa3f6b0e86917058b904b2cf061..acccbdbcf865427f7804bc7c878f6ab55b3ac69c 100644 (file)
@@ -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 (file)
index 571d2e1..0000000
+++ /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 (file)
index 0000000..3430e8c
--- /dev/null
@@ -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 (file)
index 7d88070..0000000
+++ /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 (file)
index 0000000..8f23482
--- /dev/null
@@ -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 (file)
index b337929..0000000
+++ /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 (file)
index 0000000..b337929
--- /dev/null
@@ -0,0 +1 @@
+P SUNWdoc Documentation Tools
diff --git a/solaris/depend.libs b/solaris/depend.libs
deleted file mode 100644 (file)
index 4185977..0000000
+++ /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 (file)
index 0000000..4185977
--- /dev/null
@@ -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 (file)
index d648708..0000000
+++ /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 (file)
index 0000000..d078ea8
--- /dev/null
@@ -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
index ba3b484a904436431aed4615027dab06272c2127..1fa987659d7e562ee1a28a965929b3cdf2253506 100755 (executable)
@@ -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
index dfa2eb6b5201eaa8e9ec9e63a30d73179616e079..5ce4aceb39f0dcd272a2c239f2bba7add671b1a2 100644 (file)
                exec='/lib/svc/method/quagga stop %f %i'
                timeout_seconds='60' />
 
-       <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.