Revision: 15784 http://gar.svn.sourceforge.net/gar/?rev=15784&view=rev Author: skayser Date: 2011-09-27 19:24:55 +0000 (Tue, 27 Sep 2011) Log Message: ----------- stunnel/trunk: add error msgs to init script, use directory vars in Makefile & init script
Modified Paths: -------------- csw/mgar/pkg/stunnel/trunk/Makefile csw/mgar/pkg/stunnel/trunk/files/CSWstunnel.cswstunnel Modified: csw/mgar/pkg/stunnel/trunk/Makefile =================================================================== --- csw/mgar/pkg/stunnel/trunk/Makefile 2011-09-27 17:46:06 UTC (rev 15783) +++ csw/mgar/pkg/stunnel/trunk/Makefile 2011-09-27 19:24:55 UTC (rev 15784) @@ -22,8 +22,9 @@ VENDOR_URL = http://www.stunnel.org MASTER_SITES = ftp://ftp.stunnel.org/stunnel/ DISTFILES = $(NAME)-$(VERSION).tar.gz +DISTFILES += CSWstunnel.cswstunnel -# Note that upstream moves versions to an obsolete/ subdir over time +# Upstream moves versions to an obsolete/ subdir over time, consider it too MAJOR_VER = $(firstword $(subst ., ,$(VERSION))) MASTER_SITES += ftp://ftp.stunnel.org/stunnel/obsolete/$(MAJOR_VER).x/ @@ -37,11 +38,14 @@ # that the config file doesn't understand, e.g. sysconfdir='${prefix}/etc' PATCHFILES = 0001-Make-stunnel.conf-sample.in-honor-sysconfdir-localst.patch +sysconfdir=/etc/opt/csw +localstatedir=/var/opt/csw + CONFIGURE_ARGS = $(DIRPATHS) -CONFIGURE_ARGS += --with-ssl=/opt/csw +CONFIGURE_ARGS += --with-ssl=$(prefix) CONFIGURE_ARGS += --enable-ipv6 CONFIGURE_ARGS += --enable-dh -CONFIGURE_ARGS += --localstatedir=/var/opt/csw +CONFIGURE_ARGS += --localstatedir=$(localstatedir) # No test target available TEST_SCRIPTS = @@ -49,12 +53,12 @@ # tools/Makefile references ssldir, but configure only defines SSLDIR, thus # we pass ssldir manually as a workaround (according to --with-ssl above). # Should be reported and fixed upstream. Observed with 4.44. -INSTALL_ARGS = ssldir=/opt/csw +INSTALL_ARGS = ssldir=$(prefix) -sysconfdir=/etc/opt/csw -localstatedir=/var/opt/csw +# Expand autoconf vars in our init script and mark it for SMF registration +EXPANDVARS = CSWstunnel.cswstunnel +INITSMF = $(sysconfdir)/init.d/cswstunnel -INITSMF = $(sysconfdir)/init.d/cswstunnel SAMPLECONF = $(sysconfdir)/stunnel.pem MIGRATE_FILES = stunnel # migrate the /opt/csw/etc/stunnel sub directory @@ -84,11 +88,11 @@ post-install-modulated: DOCS+= doc/stunnel.*html post-install-modulated: ginstall -d $(DESTDIR)$(sysconfdir)/init.d - ginstall -m 755 $(FILEDIR)/CSWstunnel.cswstunnel \ + ginstall -m 755 $(WORKDIR)/CSWstunnel.cswstunnel \ $(DESTDIR)$(sysconfdir)/init.d/cswstunnel # create pidfile directory - ginstall -d $(DESTDIR)/var/opt/csw/run/stunnel + ginstall -d $(DESTDIR)$(localstatedir)/run/stunnel # stunnel installs several random sample scripts, cgi scripts, and # a .spec file with unadjusted paths. Leave them out for now and Modified: csw/mgar/pkg/stunnel/trunk/files/CSWstunnel.cswstunnel =================================================================== --- csw/mgar/pkg/stunnel/trunk/files/CSWstunnel.cswstunnel 2011-09-27 17:46:06 UTC (rev 15783) +++ csw/mgar/pkg/stunnel/trunk/files/CSWstunnel.cswstunnel 2011-09-27 19:24:55 UTC (rev 15784) @@ -6,18 +6,17 @@ # # Don't enable SMF service right away #AUTOENABLE no +# +# For SMF exit codes: see PAGER='less +/exit\ status' man smf_method -PATH=/opt/csw/sbin:/opt/csw/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/opt/csw/bin/stunnel -DEFAULTPIDFILE=/var/opt/csw/run/stunnel/stunnel.pid +PATH=@sbindir@:@bindir@:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=@bindir@/stunnel +DEFAULTPIDFILE=@localstatedir@/run/stunnel/stunnel.pid +CONFIG=@sysconfdir@/stunnel/stunnel.conf -CONFIG=/opt/csw/etc/stunnel/stunnel.conf -CONFIG_LOCAL=/etc/opt/csw/stunnel/stunnel.conf -test -r $CONFIG_LOCAL && CONFIG=$CONFIG_LOCAL +test -f $DAEMON || { echo "ERROR: Couldn't find stunnel binary."; exit 95; } +test -f $CONFIG || { echo "ERROR: Couldn't find stunnel.conf."; exit 96; } -test -f $DAEMON || exit 0 -test -f $CONFIG || exit 0 - CHROOT=`grep '^chroot' $CONFIG | sed 's/.*= *//'` PIDFILE=`grep '^pid' $CONFIG | sed 's/.*= *//'` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ devel mailing list devel@lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel