[csw-devel] SF.net SVN: gar:[5419] csw/mgar/pkg/vsftpd/trunk

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Mon Jun 29 23:06:50 CEST 2009


Revision: 5419
          http://gar.svn.sourceforge.net/gar/?rev=5419&view=rev
Author:   chninkel
Date:     2009-06-29 21:06:49 +0000 (Mon, 29 Jun 2009)

Log Message:
-----------
vsftpd: added vsftpd.smf_wrapper to be able to use smf even if the background option has not been set

Modified Paths:
--------------
    csw/mgar/pkg/vsftpd/trunk/Makefile
    csw/mgar/pkg/vsftpd/trunk/checksums
    csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype
    csw/mgar/pkg/vsftpd/trunk/files/changelog.CSW

Added Paths:
-----------
    csw/mgar/pkg/vsftpd/trunk/files/vsftpd.smf_wrapper

Modified: csw/mgar/pkg/vsftpd/trunk/Makefile
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/Makefile	2009-06-29 20:22:59 UTC (rev 5418)
+++ csw/mgar/pkg/vsftpd/trunk/Makefile	2009-06-29 21:06:49 UTC (rev 5419)
@@ -47,7 +47,7 @@
 DISTFILES += CSWvsftpd.prototype CSWvsftpd.preinstall
 DISTFILES += changelog.CSW README.CSW
 DISTFILES += vsftpd.conf vsftpd.userlist
-DISTFILES += cswvsftpd cswvsftpd.xml
+DISTFILES += cswvsftpd cswvsftpd.xml vsftpd.smf_wrapper
 DISTFILES += cswusergroup 
 
 # build options are set by modifying 
@@ -122,6 +122,7 @@
 merge-init-file:
 	ginstall -D "$(WORKDIR_FIRSTMOD)/cswvsftpd" "$(PKGROOT)/etc/init.d/cswvsftpd"
 	ginstall -D "$(WORKDIR_FIRSTMOD)/cswvsftpd.xml" "$(PKGROOT)/var/opt/csw/svc/manifest/network/cswvsftpd.xml"
+	ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.smf_wrapper" "$(PKGROOT)/$(sbindir)/vsftpd.smf_wrapper"
 
 merge-config-files:
 	ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.conf" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.conf.CSW"

Modified: csw/mgar/pkg/vsftpd/trunk/checksums
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/checksums	2009-06-29 20:22:59 UTC (rev 5418)
+++ csw/mgar/pkg/vsftpd/trunk/checksums	2009-06-29 21:06:49 UTC (rev 5419)
@@ -1,8 +1,8 @@
 a2f5b70fe49839b0463c9d90af0f11dd  download/CSWvsftpd.preinstall
-bdd1564a14f058eb1925b78c01139a8f  download/CSWvsftpd.prototype
+571737e0f7f54a4b43abe84fb3290ed4  download/CSWvsftpd.prototype
 eeaf77528b2da0c7730323838f30b7ef  download/README.CSW
 281c51282cabd9475cceef363bbc699b  download/build_options.patch
-55a1242f8f1f2b2b476158138d8617c8  download/changelog.CSW
+3ab328c0cf7c00b6d85956ba4c14e610  download/changelog.CSW
 54c1c39c6bfa8747a4457f135fd5bca1  download/csw_build_system.patch
 a9e994d2b57999b76a0e03503745c01a  download/csw_paths.patch
 98e1d831801985daf5ce2ed01fbc0efd  download/cswusergroup
@@ -13,4 +13,5 @@
 a9a65f55cbfd01f9d72d1de25e67148d  download/set_priv_sep_user.patch
 6a8c8579d50adf0d0fc07226c03bfb52  download/vsftpd-2.1.2.tar.gz
 f6ce22a6959b93e500a4ae800295c2ee  download/vsftpd.conf
+0d4a1cf36560892adb9eb9410a01c522  download/vsftpd.smf_wrapper
 60c736802e2ce00c531953b01e4a26f6  download/vsftpd.userlist

Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype	2009-06-29 20:22:59 UTC (rev 5418)
+++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype	2009-06-29 21:06:49 UTC (rev 5419)
@@ -5,6 +5,7 @@
 f cswpreserveconf /opt/csw/etc/vsftpd/vsftpd.userlist.CSW 0644 root bin
 f cswusergroup /opt/csw/etc/pkg/CSWvsftpd/cswusergroup 0644 root bin
 f none /opt/csw/sbin/vsftpd 0755 root bin
+f none /opt/csw/sbin/vsftpd.smf_wrapper 0755 root bin
 d none /opt/csw/share/doc/vsftpd 0755 root bin
 d none /opt/csw/share/doc/vsftpd/EXAMPLE 0755 root bin
 d none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE_NOINETD 0755 root bin

Modified: csw/mgar/pkg/vsftpd/trunk/files/changelog.CSW
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/files/changelog.CSW	2009-06-29 20:22:59 UTC (rev 5418)
+++ csw/mgar/pkg/vsftpd/trunk/files/changelog.CSW	2009-06-29 21:06:49 UTC (rev 5419)
@@ -2,6 +2,8 @@
 
   * New upstream version.
   * Now uses SMF support from cswclassutils.
+  * Added vsftpd.smf_wrapper to be able to use SMF even if the background
+  option has not been set in vsftpd.conf
 
  -- Yann Rouillard <yann at opencsw.org>  Tue, 29 Jun 2009 22:44:34 +0200
 

Added: csw/mgar/pkg/vsftpd/trunk/files/vsftpd.smf_wrapper
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/files/vsftpd.smf_wrapper	                        (rev 0)
+++ csw/mgar/pkg/vsftpd/trunk/files/vsftpd.smf_wrapper	2009-06-29 21:06:49 UTC (rev 5419)
@@ -0,0 +1,28 @@
+#!/bin/sh
+#####################################################################
+# vsftpd shell script wrapper for SMF
+#
+# SMF always expect a daemon to follow the fork/exec model, however
+# for vsftpd, this behaviour depends on the background option.
+# So the purpose of this script is to always launch vsftpd in 
+# background mode
+#
+# Copyright 2009 Yann Rouillard <yann at pleiades.fr.eu.org>
+# All rights reserved.  Use is subject to license terms.
+#
+# Redistribution and/or use, with or without modification, is
+# permitted.  This software is without warranty of any kind.  The
+# author(s) shall not be liable in the event that use of the
+# software causes damage.
+#####################################################################
+
+CONF_DIR=/opt/csw/etc/vsftpd
+CONF_FILE=$CONF_DIR/vsftpd.conf
+
+if /usr/bin/egrep -i "^ *background *= *yes" ${CONF_FILE} > /dev/null; then
+	/opt/csw/sbin/vsftpd
+	exit $?
+else
+	/opt/csw/sbin/vsftpd &
+	exit $?
+fi


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list