Browse Source

[solaris] version depend files, auto-generate. Start zebra when needed.

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.
Paul Jakma 14 years ago
parent
commit
e24f0638e6

+ 12 - 0
solaris/ChangeLog

@@ -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

+ 8 - 4
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) && \

+ 1 - 0
solaris/depend.daemons

@@ -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)

+ 1 - 0
solaris/depend.dev

@@ -1 +1,2 @@
 P QUAGGAlibs Quagga common runtime libraries
+	@PACKAGE_VERSION@,REV=@CONFDATE@

solaris/depend.doc → solaris/depend.doc.in


solaris/depend.libs → solaris/depend.libs.in


+ 1 - 0
solaris/depend.smf

@@ -1,4 +1,5 @@
 P QUAGGAdaemons Quagga daemons
+	@PACKAGE_VERSION@,REV=@CONFDATE@
 P SUNWcsu Core Solaris, (Usr)
 P SUNWcsr Core Solaris Libraries (Root)
 I SUNWzebrar

+ 5 - 14
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

+ 0 - 5
solaris/quagga.xml.in

@@ -48,11 +48,6 @@
 		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.