summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorJuergen Beisert <j.beisert@pengutronix.de>2006-11-17 07:07:19 +0000
committerJuergen Beisert <j.beisert@pengutronix.de>2006-11-17 07:07:19 +0000
commit7e0f82bf7f2fe6360936ea6d32f973fa0fcc07ee (patch)
treef0060c05b3679d9c40cc6e7bb1c317bdcf8c57a5 /rules
parentbee6118e925be1191478fb61191fa36ed67fb9c9 (diff)
downloadptxdist-7e0f82bf7f2fe6360936ea6d32f973fa0fcc07ee.tar.gz
ptxdist-7e0f82bf7f2fe6360936ea6d32f973fa0fcc07ee.tar.xz
* pureFTP
- move startup script selection into the packet - allow user defined startup script - allow user defined runtime configuration # open issue: configure runs twice! git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6331 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules')
-rw-r--r--rules/pureftpd.in72
-rw-r--r--rules/pureftpd.make25
-rw-r--r--rules/rootfs_init_d_files.in38
3 files changed, 87 insertions, 48 deletions
diff --git a/rules/pureftpd.in b/rules/pureftpd.in
index 1860a7629..fa2eeb386 100644
--- a/rules/pureftpd.in
+++ b/rules/pureftpd.in
@@ -18,6 +18,9 @@ config PUREFTPD_UPLOADSCRIPT
help
Allow running an external script after an upload
+comment "build options ---"
+ depends on PUREFTPD
+
config PUREFTPD_VIRTUALHOSTS
bool
prompt "virtual hosts"
@@ -59,3 +62,72 @@ config PUREFTPD_SHRINK_MORE
But note: Globbing is a nice feature and for Windows clients most of
time required!
+comment "runtime options ---"
+ depends on PUREFTPD
+
+config PUREFTPD_ETC_CONFIG
+ bool
+ depends on PUREFTPD
+ prompt "default config"
+ default n
+ help
+ This installs a user defined configuration for pure-ftp. PTXdist
+ uses files projectroot/etc/pure-ftpd.defaults in your local project
+
+choice
+ prompt "Kind of startup"
+ default PUREFTPD_STARTUP_TYPE_STANDALONE
+ depends on PUREFTPD
+
+ config PUREFTPD_INETD_SERVER
+ bool
+ prompt "inetd driven"
+ help
+ pureftp server will be started on demand from inetd. This installs
+ a startup configuration for pureftp from inetd. It adds to the
+ /etc/inetd.conf a line like this:
+ ftp stream tcp nowait root /usr/bin/pureftp ftpd
+ Note: You must enable one of the two possible inet daemons:
+ There is one embedded in busybox and one in packet inetutils.
+
+ config ROOTFS_ETC_INITD_PUREFTPD
+ bool
+ prompt "standalone"
+ help
+ This installs pureftp startup script /etc/init.d/pure-ftpd.
+ With this script the pure-ftp server will be started at system
+ startup and waits for connections
+
+endchoice
+
+config PUREFTPD_INETD_STRING
+ string
+ depends on PUREFTPD
+ depends on PUREFTPD_INETD_SERVER
+ prompt "inetd service entry"
+ default "ftp stream tcp nowait root /usr/bin/pure-ftp ftpd"
+ help
+ This string is added to inetd's configuration /etc/inetd.conf.
+
+choice
+ prompt "Kind of startup script"
+ default ROOTFS_ETC_INITD_PUREFTPD_DEFAULT
+ depends on PUREFTPD
+ depends on ROOTFS_ETC_INITD_PUREFTPD
+
+ config ROOTFS_ETC_INITD_PUREFTPD_DEFAULT
+ bool
+ prompt "Use generic"
+ help
+ Installs a generic /etc/init.d/pure-ftpd startup script.
+ See <ptxdist-install>/generic/etc/init.d/pure-ftpd
+
+ config ROOTFS_ETC_INITD_PUREFTPD_USER
+ bool
+ prompt "User defined"
+ help
+ This uses a user defined pure-ftpd startup script. PTXdist
+ uses files projectroot/etc/init.d/pure-ftpd in your local
+ project
+
+endchoice
diff --git a/rules/pureftpd.make b/rules/pureftpd.make
index c08fd863a..3285bf584 100644
--- a/rules/pureftpd.make
+++ b/rules/pureftpd.make
@@ -180,18 +180,20 @@ ifdef PTXCONF_PUREFTPD_UPLOADSCRIPT
/usr/sbin/pure-uploadscript, n)
endif
+
ifdef PTXCONF_ROOTFS_ETC_INITD_PUREFTPD
-ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_ETC_INITD_PUREFTPD_USER_FILE)),)
- @$(call install_copy, pureftpd, 0, 0, 0755, \
- $(PTXCONF_ROOTFS_ETC_INITD_PUREFTPD_USER_FILE), \
- /etc/init.d/pure-ftpd, n)
-else
+ifdef PTXCONF_ROOTFS_ETC_INITD_PUREFTPD_DEFAULT
+# install the generic one
@$(call install_copy, pureftpd, 0, 0, 0755, \
$(PTXDIST_TOPDIR)/generic/etc/init.d/pure-ftpd, \
/etc/init.d/pure-ftpd, n)
endif
+ifdef PTXCONF_ROOTFS_ETC_INITD_PUREFTPD_USER
+# install users one
+ @$(call install_copy, cvs, 0, 0, 0755, \
+ ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/pure-ftpd, \
+ /etc/init.d/pure-ftpd, n)
endif
-
#
# FIXME: Is this packet the right location for the link?
#
@@ -200,14 +202,17 @@ ifneq ($(PTXCONF_ROOTFS_ETC_INITD_PUREFTPD_LINK),"")
@$(call install_link, pureftpd, ../init.d/pure-ftpd, \
/etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_PUREFTPD_LINK))
endif
+endif
- @$(call install_finish, pureftpd)
+ifdef PTXCONF_PUREFTPD_ETC_CONFIG
+ @$(call install_copy, pureftpd, 0, 0, 0755, \
+ ${PTXDIST_WORKSPACE}/projectroot/etc/pure-ftpd.conf, \
+ /etc/pure-ftpd.defaults, n)
+endif
+ @$(call install_finish, pureftpd)
@$(call touch, $@)
-# FIXME: Define a default configuration
-# @$(call install_copy, pureftpd, 0, 0, 0755, $(PUREFTPD_DIR)/configuration-file/pure-ftpd.conf, /etc/pure-ftpd.defaults)
-
# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------
diff --git a/rules/rootfs_init_d_files.in b/rules/rootfs_init_d_files.in
index 1f5dfadff..100261ff4 100644
--- a/rules/rootfs_init_d_files.in
+++ b/rules/rootfs_init_d_files.in
@@ -268,44 +268,6 @@ menuconfig ROOTFS_ETC_INITD_DROPBEAR
help
Enter a path and filename to be used as dropbear script on your target.
-########################## pureftpd ##########################################
-
-menuconfig ROOTFS_ETC_INITD_PUREFTPD
- depends on ROOTFS_ETC_INITD && PUREFTPD
- bool
- default y
- prompt "purefptd "
- help
- The /etc/init.d/pure-ftpd script lets you control the pure ftp daemon.
-
- choice
- prompt "Kind of startup scrict"
- depends on ROOTFS_ETC_INITD_PUREFTPD
- default ROOTFS_ETC_INITD_PUREFTPD_DEFAULT
-
- config ROOTFS_ETC_INITD_PUREFTPD_DEFAULT
- bool
- prompt "Use default pure-ftpd"
- help
- A file from generic/etc/init.d/pure-ftpd will be used.
-
- config ROOTFS_ETC_INITD_PUREFTPD_USER
- bool
- prompt "Use your own pure-ftpd file"
- help
- Select this, then you can enter a path and filename to your
- own pure-ftpd startup script.
- endchoice
-
- config ROOTFS_ETC_INITD_PUREFTPD_USER_FILE
- depends on ROOTFS_ETC_INITD_PUREFTPD
- depends on ROOTFS_ETC_INITD_PUREFTPD_USER
- prompt "Path and name of your own pure-ftpd to be used"
- string
- default ""
- help
- Enter a path and filename to be used as pure-ftpd script on your target.
-
########################## crond ##########################################
# this is for busybox' crond only
#