From 2e878658a02ca4651673cad2f41a57f27557d6dc Mon Sep 17 00:00:00 2001 From: Robert Schwebel Date: Fri, 20 Feb 2009 23:13:39 +0000 Subject: * init: introduce infrastructure for multiple init methods git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@9802 33e552b5-05e3-0310-8538-816dae2090ed --- rules/alsa-utils.in | 14 +- rules/alsa-utils.make | 8 +- rules/apache2.in | 33 +- rules/apache2.make | 36 +-- rules/busybox.in | 27 ++ rules/busybox.make | 54 ++++ rules/chrony.in | 29 +- rules/chrony.make | 29 +- rules/connman.in | 5 + rules/connman.make | 9 +- rules/cvs.in | 50 +-- rules/cvs.make | 43 +-- rules/dbus.in | 27 +- rules/dbus.make | 29 +- rules/dnsmasq.in | 48 +-- rules/dnsmasq.make | 37 +-- rules/dropbear.in | 28 +- rules/dropbear.make | 26 +- rules/fam.in | 32 +- rules/fam.make | 24 +- rules/inetutils.in | 71 ++--- rules/inetutils.make | 39 +-- rules/initmethod-bbinit.in | 49 +++ rules/initmethod-bbinit.make | 275 ++++++++++++++++ rules/initmethod.in | 181 +++++++++++ rules/lighttpd.in | 57 +--- rules/lighttpd.make | 48 +-- rules/mysql.in | 4 + rules/mysql.make | 6 +- rules/nfsutils.in | 24 +- rules/nfsutils.make | 60 ++-- rules/ntp.in | 32 +- rules/ntp.make | 55 ++-- rules/ntpclient.in | 30 +- rules/ntpclient.make | 31 +- rules/openntpd.in | 22 +- rules/openntpd.make | 29 +- rules/openssh.in | 39 +-- rules/openssh.make | 26 +- rules/portmap.in | 62 +--- rules/portmap.make | 39 +-- rules/ppp.in | 22 +- rules/ppp.make | 15 +- rules/proftpd.in | 7 +- rules/proftpd.make | 16 +- rules/pureftpd.in | 64 +--- rules/pureftpd.make | 43 +-- rules/rootfs.in | 62 +++- rules/rootfs.make | 731 ++----------------------------------------- rules/rootfs_configfiles.in | 520 ------------------------------ rules/rootfs_init_d_files.in | 310 ------------------ rules/rootfs_rc_d_links.in | 309 ------------------ rules/rsync.in | 27 +- rules/rsync.make | 70 +---- rules/rsync3.in | 92 +----- rules/rsync3.make | 68 +--- rules/samba.in | 30 +- rules/samba.make | 22 +- rules/syslogng.in | 28 +- rules/syslogng.make | 45 +-- rules/thttpd.in | 35 +-- rules/thttpd.make | 20 +- rules/udev.in | 14 +- rules/udev.make | 9 +- rules/urshd.in | 9 - rules/urshd.make | 6 +- rules/utelnetd.in | 33 +- rules/utelnetd.make | 30 +- 68 files changed, 1093 insertions(+), 3311 deletions(-) create mode 100644 rules/initmethod-bbinit.in create mode 100644 rules/initmethod-bbinit.make create mode 100644 rules/initmethod.in delete mode 100644 rules/rootfs_rc_d_links.in (limited to 'rules') diff --git a/rules/alsa-utils.in b/rules/alsa-utils.in index 85c72bd6a..1904b3a8f 100644 --- a/rules/alsa-utils.in +++ b/rules/alsa-utils.in @@ -1,8 +1,8 @@ ## SECTION=multimedia_sound -config ALSA_UTILS +menuconfig ALSA_UTILS tristate - prompt "alsa utils" + prompt "alsa utils " select NCURSES select ALSA_LIB # alsa-utils fails with the salsa-lib @@ -17,3 +17,13 @@ config ALSA_UTILS Some utils to handle the Advanced Linux Sound Architecture. With these utils you can control your sound device, for playback and recording of sounds. + +if ALSA_UTILS + +config ALSA_UTILS_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/alsa-utils" + +endif + diff --git a/rules/alsa-utils.make b/rules/alsa-utils.make index 8c8b07453..d62a0b898 100644 --- a/rules/alsa-utils.make +++ b/rules/alsa-utils.make @@ -85,13 +85,9 @@ $(STATEDIR)/alsa-utils.targetinstall: @$(call install_copy, alsa-utils, 0, 0, 0755, $(ALSA_UTILS_DIR)/seq/aseqdump/aseqdump, /usr/bin/aseqdump) @$(call install_copy, alsa-utils, 0, 0, 0755, $(ALSA_UTILS_DIR)/seq/aseqnet/aseqnet, /usr/bin/aseqnet) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_ALSA_UTILS_STARTSCRIPT @$(call install_alternative, alsa-utils, 0, 0, 0755, /etc/init.d/alsa-utils, n) - -ifdef PTXCONF_ROOTFS_ETC_INITD_ALSA_UTILS_LINK -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_ALSA_UTILS_LINK),"") - @$(call install_copy, alsa-utils, 0, 0, 0755, /etc/rc.d) - @$(call install_link, alsa-utils, ../init.d/alsa-utils, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_ALSA_UTILS_LINK)) endif endif @$(call install_finish, alsa-utils) diff --git a/rules/apache2.in b/rules/apache2.in index cc398930c..10993a989 100644 --- a/rules/apache2.in +++ b/rules/apache2.in @@ -49,34 +49,6 @@ config APACHE2_SERVERROOT This directory defines apache's serverroot where the icons are located. -menuconfig ROOTFS_ETC_INITD_HTTPD - tristate - default y - prompt "install startup script " - help - The /etc/init.d/httpd script lets you control the apache daemon. - - choice - prompt "Kind of startup script" - depends on ROOTFS_ETC_INITD_HTTPD - default ROOTFS_ETC_INITD_HTTPD_DEFAULT - - config ROOTFS_ETC_INITD_HTTPD_DEFAULT - bool - prompt "Use generic" - help - Install a generic /etc/init.d/httpd file. - See /generic/etc/init.d/httpd - - config ROOTFS_ETC_INITD_HTTPD_USER - bool - prompt "User defined" - help - This uses a user defined httpd startup script. PTXdist - uses file projectroot/etc/init.d/httpd in your local - project - endchoice - config APACHE2_INSTALL_CONFIG bool default y @@ -190,5 +162,10 @@ config APACHE2_CUSTOMERRORS the MultiViews feature. This feature is enabled by default via the Options, Language and ErrorDocument directives. +config APACHE2_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/httpd" + endif diff --git a/rules/apache2.make b/rules/apache2.make index 4dd717b85..941c2902c 100644 --- a/rules/apache2.make +++ b/rules/apache2.make @@ -258,39 +258,27 @@ endif endif endif + # + # create the log dir if enabled + # -# --------------------------- -# create the log dir if enabled -# ifneq ($(PTXCONF_APACHE2_LOGDIR),"") @$(call install_copy, apache2, 12, 102, 0755, $(PTXCONF_APACHE2_LOGDIR)) endif -# --------------------------- -# install startup script on demand -# -ifdef PTXCONF_ROOTFS_ETC_INITD_HTTPD -ifdef PTXCONF_ROOTFS_ETC_INITD_HTTPD_DEFAULT -# generic script with path modifications - @$(call install_copy, apache2, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/httpd, \ - /etc/init.d/httpd, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_HTTPD_USER -# users one - @$(call install_copy, apache2, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/httpd, \ - /etc/init.d/httpd, n) -endif -# replace some placeholders + # + # busybox init: startscript + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_APACHE2_STARTSCRIPT + @$(call install_alternative, apache2, 0, 0, 0755, /etc/init.d/httpd, n) + + # replace some placeholders @$(call install_replace, apache2, /etc/init.d/httpd, \ @APACHECONFIG@, $(PTXCONF_APACHE2_CONFIGDIR) ) @$(call install_replace, apache2, /etc/init.d/httpd, \ @LOGPATH@, $(PTXCONF_APACHE2_LOGDIR) ) -# install link to launch automatically if enabled -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_HTTPD_LINK),"") - @$(call install_link, apache2, ../init.d/httpd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_HTTPD_LINK)) endif endif diff --git a/rules/busybox.in b/rules/busybox.in index d8414cdf7..89bec6d54 100644 --- a/rules/busybox.in +++ b/rules/busybox.in @@ -14,5 +14,32 @@ menuconfig BUSYBOX For more information see http://www.busybox.net if BUSYBOX + +config BUSYBOX_INETD_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/inetd" + +config BUSYBOX_TELNETD_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/telnetd" + +config BUSYBOX_TELNETD_SYSLOGD_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/syslogd" + +config BUSYBOX_TELNETD_CROND_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/crond" + +config BUSYBOX_TELNETD_HWCLOCK_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/hwclock" + source "config/busybox/Config.in" + endif diff --git a/rules/busybox.make b/rules/busybox.make index d319a8a88..c075ddf4e 100644 --- a/rules/busybox.make +++ b/rules/busybox.make @@ -96,6 +96,60 @@ endif $(call install_link, busybox, /bin/busybox, $$file); \ done + # + # bb init: start scripts + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_BUSYBOX_INETD +ifdef PTXCONF_BUSYBOX_INETD_STARTSCRIPT + @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/inetd, n) +endif +endif +ifdef PTXCONF_BUSYBOX_TELNETD +ifdef PTXCONF_BUSYBOX_TELNETD_STARTSCRIPT + @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/telnetd, n) +endif + @$(call install_alternative, busybox, 0, 0, 0644, /etc/inetd.conf.d/telnetd, n) +endif +ifdef PTXCONF_BUSYBOX_SYSLOGD +ifdef PTXCONF_BUSYBOX_SYSLOGD_STARTSCRIPT + @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/syslogd, n) +endif +endif +ifdef PTXCONF_BUSYBOX_CROND +ifdef PTXCONF_BUSYBOX_CROND_STARTSCRIPT + @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/crond, n) +endif +endif +ifdef PTXCONF_BUSYBOX_HWCLOCK +ifdef PTXCONF_BUSYBOX_HWCLOCK_STARTSCRIPT + @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/timekeeping, n) +endif +endif +endif + + # + # config files + # + +ifdef PTXCONF_BUSYBOX_APP_UDHCPC + @$(call install_alternative, busybox, 0, 0, 0754, /etc/udhcpc.script, n) + @$(call install_link, busybox, /etc/udhcpc.script, /usr/share/udhcpc/default.script) +endif + +ifdef PTXCONF_BUSYBOX_CROND + @$(call install_copy, busybox, 0, 0, 0755, /etc/cron) + @$(call install_copy, busybox, 0, 0, 0755, /var/spool/cron/crontabs/) + # FIXME: looks like this needs more work + @$(call install_alternative, busybox, 0, 0, 0644, /var/spool/cron/crontabs/root, n) + @$(call install_alternative, busybox, 0, 0, 0644, /etc/cron.daily, n) +endif + +ifdef PTXCONF_BUSYBOX_INETD + @$(call install_alternative, busybox, 0, 0, 0644, /etc/inetd.conf, n) +endif + @$(call install_finish, busybox) @$(call touch) diff --git a/rules/chrony.in b/rules/chrony.in index 50b49dff3..8a93d0cd7 100644 --- a/rules/chrony.in +++ b/rules/chrony.in @@ -5,7 +5,7 @@ menuconfig CHRONY tristate prompt "chrony " select READLINE -# FIXME: remove READLINE select when 1.21 works again. + # FIXME: remove READLINE select when 1.21 works again. help This will install the Chrony NTPD Daemon (chronyd) Chrony is a pair of programs which are used to maintain @@ -102,32 +102,9 @@ config CHRONY_DEFAULT_NTP_SERVER This will set the ntp server for simple configurations. -menuconfig ROOTFS_ETC_INITD_CHRONY +config CHRONY_STARTSCRIPT bool default y - prompt "Install startup script " - help - The /etc/init.d/chrony script lets you control the chronyd daemon. - - choice - prompt "Kind of startup script" - depends on ROOTFS_ETC_INITD_CHRONY - default ROOTFS_ETC_INITD_CHRONY_DEFAULT - - config ROOTFS_ETC_INITD_CHRONY_DEFAULT - bool - prompt "Use generic" - help - Install a generic /etc/init.d/chrony file. - See /generic/etc/init.d/chrony - - config ROOTFS_ETC_INITD_CHRONY_USER - bool - prompt "User defined" - help - This uses a user defined httpd startup script. PTXdist - uses file projectroot/etc/init.d/chrony in your local - project - endchoice + prompt "install /etc/init.d/chrony" endif diff --git a/rules/chrony.make b/rules/chrony.make index 3e2f5f633..018a4f88b 100644 --- a/rules/chrony.make +++ b/rules/chrony.make @@ -165,30 +165,17 @@ endif @UNCONFIGURED_CHRONY_ACCESS_KEY@, $(PTXCONF_CHRONY_DEFAULT_ACCESS_KEY) ) endif -# --------------------------- -# install startup script on demand -# -ifdef PTXCONF_ROOTFS_ETC_INITD_CHRONY -ifdef PTXCONF_ROOTFS_ETC_INITD_CHRONY_DEFAULT -# generic script with path modifications - @$(call install_copy, chrony, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/chrony, \ - /etc/init.d/chrony, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_CHRONY_USER -# users one - @$(call install_copy, chrony, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/chrony, \ - /etc/init.d/chrony, n) -endif -# install link to launch automatically if enabled -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_CHRONY_LINK),"") - @$(call install_link, chrony, \ - ../init.d/chrony, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_CHRONY_LINK)) + # + # busybox init: startscripts + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_CHRONY_STARTSCRIPT + @$(call install_alternative, chrony, 0, 0, 0755, /etc/init.d/chrony, n) endif endif + # --------------------------- # install chrony command helper script # diff --git a/rules/connman.in b/rules/connman.in index 243e2fd50..b779504ec 100644 --- a/rules/connman.in +++ b/rules/connman.in @@ -101,5 +101,10 @@ config CONNMAN_TESTS select DBUS_PYTHON prompt "install test programs" +config CONNMAN_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/connman" + endif diff --git a/rules/connman.make b/rules/connman.make index 1ff26cbf2..87143e1ab 100644 --- a/rules/connman.make +++ b/rules/connman.make @@ -185,10 +185,11 @@ $(STATEDIR)/connman.targetinstall: @$(call install_copy, connman, 0, 0, 0755, /usr/lib/connman/scripts) @$(call install_copy, connman, 0, 0, 0755, /usr/lib/connman/plugins) - # start script - @$(call install_copy, connman, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/connman, \ - /etc/init.d/connman) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_CONNMAN_STARTSCRIPT + @$(call install_alternative, connman, 0, 0, 0755, /etc/init.d/connman, n) +endif +endif # dbus config @$(call install_copy, connman, 0, 0, 0644, -, /etc/dbus-1/system.d/connman.conf) diff --git a/rules/cvs.in b/rules/cvs.in index 90fae7b3e..3a3b7a8c2 100644 --- a/rules/cvs.in +++ b/rules/cvs.in @@ -114,31 +114,6 @@ config CVS_SERVER_REPOSITORY This will be cvs server's root repository (given to cvs as --allow-root=...). You must give a path here to use the "Populate CVSROOT files" feature. -choice - prompt "Kind of startup" - depends on CVS_SERVER - - config CVS_INETD_SERVER - bool - prompt "inetd driven" - help - cvs server will be started on demand from inetd. This installs - a startup configuration for cvs from inetd. It adds to the - /etc/inetd.conf a line like this: - cvs stream tcp nowait root /usr/bin/cvs cvsd -f --allow-root=/srv/cvsroot pserver - Note: You must enable one of the two possible inet daemons: - There is one embedded in busybox and one in packet inetutils. - - config CVS_STARTUP_TYPE_STANDALONE - bool - prompt "standalone" - help - This installs cvs startup script /etc/init.d/cvs. With this - script the cvs server will be started at system startup and - waits for connections - -endchoice - config CVS_INETD_STRING string depends on CVS_SERVER @@ -149,26 +124,9 @@ config CVS_INETD_STRING This string is added to inetd's configuration /etc/inetd.conf. @ROOT@ in this string will be replaced by repository's root -choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_CVS_DEFAULT - depends on CVS_STARTUP_TYPE_STANDALONE - - config ROOTFS_ETC_INITD_CVS_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/cvs startup script. - See /generic/etc/init.d/cvs - - config ROOTFS_ETC_INITD_CVS_USER - bool - prompt "User defined" - help - This uses a user defined cvs startup script. PTXdist - uses files projectroot/etc/init.d/cvs in your local - project - -endchoice +config CVS_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/cvs" endif diff --git a/rules/cvs.make b/rules/cvs.make index c017518a2..945bbd6f2 100644 --- a/rules/cvs.make +++ b/rules/cvs.make @@ -180,12 +180,24 @@ $(STATEDIR)/cvs.targetinstall: $(cvs_targetinstall_deps_default) @$(call install_fixup,cvs,DESCRIPTION,missing) ifdef PTXCONF_CVS_INETD_SERVER + @$(call install_alternative, cvs, 0, 0, 0755, /etc/inetd.conf.d/cvs, n) +ifneq ($(PTXCONF_CVS_SERVER_REPOSITORY),"") + # add info about repository's root + @$(call install_replace, cvs, /etc/inetd.conf.d/cvs, \ + @ROOT@, \ + "--allow-root=$(PTXCONF_CVS_SERVER_REPOSITORY)" ) +else + # use cvs' default if not otherwise specified + @$(call install_replace, cvs, /etc/inetd.conf.d/cvs, \ + @ROOT@, ) +endif + ifneq ($(call remove_quotes,$(PTXCONF_CVS_SERVER_REPOSITORY)),) @$(call install_copy, cvs, 0, 0, 0755, $(PTXCONF_CVS_SERVER_REPOSITORY)) -# -# install only existing files -# + # + # install only existing files + # ifdef PTXCONF_CVS_SERVER_POPULATE_CVSROOT @$(call install_copy, cvs, 0, 0, 0750, \ $(PTXCONF_CVS_SERVER_REPOSITORY)/CVSROOT) @@ -206,31 +218,6 @@ ifdef PTXCONF_CVS_SERVER_POPULATE_CVSROOT done; endif endif -endif -# -# Install the startup script on request only -# -ifdef PTXCONF_CVS_STARTUP_TYPE_STANDALONE -ifdef PTXCONF_ROOTFS_ETC_INITD_CVS_DEFAULT -# install the generic one - @$(call install_copy, cvs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/cvs, \ - /etc/init.d/cvs, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_CVS_USER -# install users one - @$(call install_copy, cvs, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/cvs, \ - /etc/init.d/cvs, n) -endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_CVS_LINK),"") - @$(call install_copy, cvs, 0, 0, 0755, /etc/rc.d) - @$(call install_link, cvs, ../init.d/cvs, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_CVS_LINK)) -endif endif @$(call install_copy, cvs, 0, 0, 0755, $(CVS_DIR)/src/cvs, /usr/bin/cvs) diff --git a/rules/dbus.in b/rules/dbus.in index e0489e20d..96f676084 100644 --- a/rules/dbus.in +++ b/rules/dbus.in @@ -150,30 +150,9 @@ config ROOTFS_DBUS_SESSION_CONF # Directory for installing the DBUS daemon # --with-x use the X Window System -config DBUS_INSTALL_STARTUP_SCRIPT +config DBUS_STARTSCRIPT bool - prompt "Install startup script" - help - This installs a startup script for dbus from a selectable source - - choice - prompt "Kind of startup script" - depends on DBUS_INSTALL_STARTUP_SCRIPT - default ROOTFS_ETC_INITD_DBUS_GENERIC - - config ROOTFS_ETC_INITD_DBUS_GENERIC - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/dbus startup script. - See /generic/etc/init.d/dbus - - config ROOTFS_ETC_INITD_DBUS_USER - bool - prompt "User defined" - help - This uses a user defined /etc/init.d/dbus. PTXdist uses - file projectroot/etc/init.d/dbus in your local project. + default y + prompt "install /etc/init.d/dbus" - endchoice endif diff --git a/rules/dbus.make b/rules/dbus.make index 1ee06c230..445a224a6 100644 --- a/rules/dbus.make +++ b/rules/dbus.make @@ -153,33 +153,14 @@ ifdef PTXCONF_ROOTFS_USER_DBUS_SESSION_CONF /etc/dbus-1/session.conf,n) endif -ifdef PTXCONF_DBUS_INSTALL_STARTUP_SCRIPT - # - # use the generic startup script in /etc/init.d/dbus - # -ifdef PTXCONF_ROOTFS_ETC_INITD_DBUS_GENERIC - @$(call install_copy, dbus, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/dbus, \ - /etc/init.d/dbus, n) -endif - # - # use the user's startup script in /etc/init.d/dbus from projectroot/etc/init.d/dbus - # -ifdef PTXCONF_ROOTFS_ETC_INITD_DBUS_USER - @$(call install_copy, dbus, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/dbus, \ - /etc/init.d/dbus,n) -endif # - # create a link in /etc/rc.d/ to /etc/init.d/dbus + # busybox init: start script # -ifdef PTXCONF_ROOTFS_ETC_INITD_DBUS_LINK -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_DBUS_LINK),"") - @$(call install_copy, dbus, 0, 0, 0755, /etc/rc.d) - @$(call install_link, dbus, ../init.d/dbus, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_DBUS_LINK)) -endif + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_DBUS_STARTSCRIPT + @$(call install_alternative, dbus, 0, 0, 0755, /etc/init.d/dbus, n) endif endif diff --git a/rules/dnsmasq.in b/rules/dnsmasq.in index 423edaf9a..7e15153ed 100644 --- a/rules/dnsmasq.in +++ b/rules/dnsmasq.in @@ -70,49 +70,9 @@ config DNSMASQ_INETD_STRING help This string is added to inetd's configuration /etc/inetd.conf. -choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_DNSMASQ_DEFAULT - depends on DNSMASQ_STARTUP_TYPE_STANDALONE - - config ROOTFS_ETC_INITD_DNSMASQ_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/dnsmasq startup script. - See /generic/etc/init.d/dnsmasq - - config ROOTFS_ETC_INITD_DNSMASQ_USER - bool - prompt "User defined" - help - This uses a user defined dnsmasq startup script. PTXdist - uses files projectroot/etc/init.d/dnsmasq in your local - project - -endchoice - -choice - prompt "Configuration's source" - default DNSMASQ_ETC_DEFAULT - - config DNSMASQ_ETC_DEFAULT - bool - prompt "Use generic" - help - The used configuration file for runtime comes from build - directory's file "dnsmasq.conf.example" - Its mostly useless, but gives you a hint how it works. - Use it as a starting point, modify it and store it in your - active project. Then switch here to "User defined". - - config DNSMASQ_ETC_USER - bool - prompt "User defined" - help - This installs dnsmasq.conf from projectroot/etc/dnsmasq.conf - from you local project. - -endchoice +config DNSMASQ_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/dnsmasq" endif diff --git a/rules/dnsmasq.make b/rules/dnsmasq.make index 9da723ab8..82db2afb9 100644 --- a/rules/dnsmasq.make +++ b/rules/dnsmasq.make @@ -123,41 +123,14 @@ $(STATEDIR)/dnsmasq.targetinstall: $(dnsmasq_targetinstall_deps_default) $(DNSMASQ_DIR)/src/dnsmasq, \ /sbin/dnsmasq) -ifdef PTXCONF_DNSMASQ_STARTUP_TYPE_STANDALONE -# provide everything for standalone mode -ifdef PTXCONF_ROOTFS_ETC_INITD_DNSMASQ_DEFAULT -# install the generic one - @$(call install_copy, dnsmasq, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/dnsmasq, \ - /etc/init.d/dnsmasq, n) -endif - -ifdef PTXCONF_ROOTFS_ETC_INITD_DNSMASQ_USER -# install users one - @$(call install_copy, dnsmasq, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/dnsmasq, \ - /etc/init.d/dnsmasq, n) -endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_DNSMASQ_LINK),"") - @$(call install_copy, dnsmasq, 0, 0, 0755, /etc/rc.d) - @$(call install_link, dnsmasq, ../init.d/dnsmasq, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_DNSMASQ_LINK)) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_DNSMASQ_STARTSCRIPT + @$(call install_alternative, dnsmasq, 0, 0, 0755, /etc/init.d/dnsmasq, n) endif endif -ifdef PTXCONF_DNSMASQ_ETC_DEFAULT - @$(call install_copy, dnsmasq, 0, 0, 0644, \ - $(DNSMASQ_DIR)/dnsmasq.conf.example, \ - /etc/dnsmasq.conf,n) -endif -ifdef PTXCONF_DNSMASQ_ETC_USER - @$(call install_copy, dnsmasq, 0, 0, 0644, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/dnsmasq.conf, \ - /etc/dnsmasq.conf,n) -endif + # FIXME: take from $(DNSMASQ_DIR)/dnsmasq.conf.example + @$(call install_alternative, dnsmasq, 0, 0, 0644, /etc/dnsmasq.conf, n) @$(call install_finish, dnsmasq) diff --git a/rules/dropbear.in b/rules/dropbear.in index aaaa85124..bd92c724a 100644 --- a/rules/dropbear.in +++ b/rules/dropbear.in @@ -270,33 +270,9 @@ config DROPBEAR_SCP comment "runtime options ---" -config ROOTFS_ETC_INITD_DROPBEAR +config DROPBEAR_STARTSCRIPT bool default y - prompt "Install startup script" - help - The /etc/init.d/dropbear script lets you control the dropbear daemon. - - choice - prompt "Kind of startup script" - depends on ROOTFS_ETC_INITD_DROPBEAR - default ROOTFS_ETC_INITD_DROPBEAR_DEFAULT - - config ROOTFS_ETC_INITD_DROPBEAR_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/dropbear startup script. - See /generic/etc/init.d/dropbear - - config ROOTFS_ETC_INITD_DROPBEAR_USER - bool - prompt "User defined" - help - This uses a user defined dropbear startup script. PTXdist - uses files projectroot/etc/init.d/dropbear in your local - project - - endchoice + prompt "install /etc/init.d/dropbear" endif diff --git a/rules/dropbear.make b/rules/dropbear.make index 1fbd3b1dd..04222d907 100644 --- a/rules/dropbear.make +++ b/rules/dropbear.make @@ -304,25 +304,13 @@ ifdef PTXCONF_DROPBEAR_SCP $(DROPBEAR_DIR)/scp, /usr/bin/scp) endif -ifdef PTXCONF_ROOTFS_ETC_INITD_DROPBEAR -ifdef PTXCONF_ROOTFS_ETC_INITD_DROPBEAR_DEFAULT -# install generic one - @$(call install_copy, dropbear, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/dropbear, \ - /etc/init.d/dropbear, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_DROPBEAR_USER -# install users one - @$(call install_copy, dropbear, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/dropbear, \ - /etc/init.d/dropbear, n) -endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_DROPBEAR_LINK),"") - @$(call install_link, dropbear, ../init.d/dropbear, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_DROPBEAR_LINK)) + # + # busybox init: start script + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_DROPBEAR_STARTSCRIPT + @$(call install_alternative, dropbear, 0, 0, 0755, /etc/init.d/dropbear, n) endif endif diff --git a/rules/fam.in b/rules/fam.in index ab38180c1..48e5ae624 100644 --- a/rules/fam.in +++ b/rules/fam.in @@ -64,33 +64,9 @@ choice endchoice -config FAM_INETD_STRING - string - depends on FAM_INETD_SERVER - prompt "inetd service entry" - default "sgi_fam/1-2 stream rpc/tcp wait root /usr/sbin/famd famd -c /etc/fam.conf" - help - This string is added to inetd's configuration /etc/inetd.conf. - -choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_FAM_DEFAULT - depends on FAM_STARTUP_TYPE_STANDALONE - - config ROOTFS_ETC_INITD_FAM_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/famd startup script. - See /generic/etc/init.d/famd - - config ROOTFS_ETC_INITD_FAM_USER - bool - prompt "User defined" - help - This uses a user defined fam startup script. PTXdist - uses files projectroot/etc/init.d/famd in your local - project +config FAM_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/famd" -endchoice endif diff --git a/rules/fam.make b/rules/fam.make index 65ce0eb30..f733e219c 100644 --- a/rules/fam.make +++ b/rules/fam.make @@ -131,27 +131,15 @@ ifdef PTXCONF_FAM_LIBRARY endif ifdef PTXCONF_FAM_STARTUP_TYPE_STANDALONE -# provide everything for standalone mode -ifdef PTXCONF_ROOTFS_ETC_INITD_FAM_DEFAULT -# install the generic one - @$(call install_copy, fam, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/famd, \ - /etc/init.d/famd, n) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_FAM_STARTSCRIPT + @$(call install_alternative, fam, 0, 0, 0755, /etc/init.d/famd, n) endif -ifdef PTXCONF_ROOTFS_ETC_INITD_FAM_USER -# install users one - @$(call install_copy, fam, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/famd, \ - /etc/init.d/famd, n) endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_FAM_LINK),"") - @$(call install_copy, portmap, 0, 0, 0755, /etc/rc.d) - @$(call install_link, portmap, ../init.d/famd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_FAM_LINK)) endif + +ifdef PTXCONF_FAM_INETD_SERVER + @$(call install_alternative, fam, 0, 0, 0644, /etc/inetd.conf.d/fam, n) endif @$(call install_finish,fam) diff --git a/rules/inetutils.in b/rules/inetutils.in index 3fb3348bd..b62c42288 100644 --- a/rules/inetutils.in +++ b/rules/inetutils.in @@ -9,24 +9,35 @@ menuconfig INETUTILS * An rsh client and server. * An rlogin client and server. * A tftp client and server. - * And much more... + * And much more... These are improved versions of programs originally from BSD. if INETUTILS -comment "build options ---" +# ----- -config INETUTILS_INETD +menuconfig INETUTILS_INETD bool depends on !BUSYBOX_INETD || ALLYES - prompt "inetd" + prompt "inetd " help This is the network super daemon. It opens network connection for various other programs and start them if a connection request occures. +if INETUTILS_INETD + +config INETUTILS_INETD_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/inetd" + +endif + comment "BusyBox' inetd is selected!" depends on BUSYBOX_INETD +# ----- + config INETUTILS_PING bool depends on !BUSYBOX_PING || ALLYES @@ -37,6 +48,8 @@ config INETUTILS_PING comment "BusyBox' ping is selected!" depends on BUSYBOX_PING +# ----- + config INETUTILS_RCP bool prompt "rcp" @@ -82,45 +95,17 @@ config INETUTILS_SYSLOGD comment "BusyBox' syslogd is selected!" depends on BUSYBOX_SYSLOGD -config INETUTILS_TFTPD +# ----- + +menuconfig INETUTILS_TFTPD bool - prompt "tftpd" + prompt "tftpd " help TFTPD is a ftp daemon to be used for diskless clients. Most bootloaders use the Trivial File Transfer Protocol to load their OS image. Note: There is no authentication! -comment "runtime options ---" - -config INETUTILS_ETC_INITD_INETD - depends on INETUTILS_INETD - bool - default y - prompt "Install inetd startup script" - help - The /etc/init.d/inetd script lets you control the inetd server. - - choice - prompt "Kind of startup script" - depends on INETUTILS_ETC_INITD_INETD - default INETUTILS_ETC_INITD_INETD_DEFAULT - - config INETUTILS_ETC_INITD_INETD_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/inetd startup script. - See /generic/etc/init.d/inetd - - config INETUTILS_ETC_INITD_INETD_USER - bool - prompt "User defined" - help - This uses a user defined inetd startup script. PTXdist - uses files projectroot/etc/init.d/inetd in your local - project - - endchoice +if INETUTILS_TFTPD config INETUTILS_TFTPD_BASE_DIR string @@ -131,16 +116,6 @@ config INETUTILS_TFTPD_BASE_DIR This string is added to tftpd's command parameters. Placeholder @ROOT@ in all startup options will be replaced by the string given here -config INETUTILS_TFTPD_STRING - string - depends on INETUTILS_TFTPD - prompt "inetd service entry" - default "tftp dgram udp wait nobody /sbin/tftpd tftpd -l @ROOT@" - help - The string defined here is added to inetd's configuration /etc/inetd.conf. @ROOT@ - in this string will be replaced by tftpd exported directory - Note: This tftp daemon can be started on demand from inetd only. You - must enable one of the two possible inet daemons: There is one - embedded in busybox and one in this packet. +endif endif diff --git a/rules/inetutils.make b/rules/inetutils.make index b5179c3c3..85d30387a 100644 --- a/rules/inetutils.make +++ b/rules/inetutils.make @@ -210,6 +210,8 @@ endif ifdef PTXCONF_INETUTILS_RSHD @$(call install_copy, inetutils, 0, 0, 0755, \ $(INETUTILS_DIR)/rshd/rshd, /usr/sbin/rshd) + @$(call install_alternative, inetutils, 0, 0, 0755, \ + /etc/inetd.conf.d/inetutils-rshd, n) endif ifdef PTXCONF_INETUTILS_SYSLOGD @$(call install_copy, inetutils, 0, 0, 0755, \ @@ -218,36 +220,25 @@ endif ifdef PTXCONF_INETUTILS_TFTPD @$(call install_copy, inetutils, 0, 0, 0755, \ $(INETUTILS_DIR)/tftpd/tftpd, /sbin/tftpd) -# create the base dir ifneq ($(PTXCONF_INETUTILS_TFTPD_BASE_DIR),"") + # create the base dir @$(call install_copy, inetutils, 99, 0, 0755, \ $(PTXCONF_INETUTILS_TFTPD_BASE_DIR) ) endif -endif -# -# Install the startup for inetd script on request only -# -ifdef PTXCONF_INETUTILS_ETC_INITD_INETD -ifdef PTXCONF_INETUTILS_ETC_INITD_INETD_DEFAULT -# install the generic one - @$(call install_copy, inetutils, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/inetd, \ - /etc/init.d/inetd, n) + @$(call install_alternative, inetutils, 0, 0, 0755, /etc/inetd.conf.d/tftp, n) + @$(call install_replace, inetutils, \ + /etc/inetd.conf.d/tftp, \ + @ROOT@, \ + $(PTXCONF_INETUTILS_TFTPD_BASE_DIR) ) endif -ifdef PTXCONF_INETUTILS_ETC_INITD_INETD_USER -# install users one - @$(call install_copy, inetutils, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/inetd, \ - /etc/init.d/inetd, n) -endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_INETD_LINK),"") - @$(call install_copy, inetutils, 0, 0, 0755, /etc/rc.d) - @$(call install_link, inetutils, ../init.d/inetd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_INETD_LINK)) + # + # busybox init: start script + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_INETUTILS_INETD_STARTSCRIPT + @$(call install_alternative, inetutils, 0, 0, 0755, /etc/init.d/inetd, n) endif endif diff --git a/rules/initmethod-bbinit.in b/rules/initmethod-bbinit.in new file mode 100644 index 000000000..d9288eff0 --- /dev/null +++ b/rules/initmethod-bbinit.in @@ -0,0 +1,49 @@ +## SECTION=initmethod_bbinit + +if INITMETHOD_BBINIT + +config INITMETHOD_BBINIT_ETC_INITD_BANNER + bool + default y + prompt "install /etc/init.d/banner" + help + This Option adds a specific vendor string to + the script which displays a nifty ptxdist + _ + | |__ __ _ _ __ _ __ ___ _ __ + | '_ \ / _` | '_ \| '_ \ / _ \ '__| + | |_) | (_| | | | | | | | __/ | + |_.__/ \__,_|_| |_|_| |_|\___|_| + page with the hostname and other stuff at + startup. + +config INITMETHOD_BBINIT_ETC_INITD_MODULES + bool + prompt "install /etc/init.d/modules" + default y + help + Look at /etc/modules and load all modules specified there. + +config INITMETHOD_BBINIT_ETC_INITD_LOGROTATE + bool + prompt "install /etc/init.d/logrotate" + default y + help + The /etc/init.d/logrotate script is a minimal logrotator. + +config INITMETHOD_BBINIT_ETC_INITD_NETWORKING + bool + default y + prompt "install /etc/init.d/networking" + #select BUSYBOX_IFUPDOWN if BUSYBOX + #select BUSYBOX_IFCONFIG if BUSYBOX + #select BUSYBOX_CAT if BUSYBOX + #select BUSYBOX_FEATURE_IFUPDOWN_IP if BUSYBOX + help + When enabled, this option installs the generic /etc/init.d/networking + file. This script starts your network interfaces by calling ifup -a To + run this script you will need the shell commands 'cat', 'grep' and + 'ifconfig' + +endif + diff --git a/rules/initmethod-bbinit.make b/rules/initmethod-bbinit.make new file mode 100644 index 000000000..a5043801e --- /dev/null +++ b/rules/initmethod-bbinit.make @@ -0,0 +1,275 @@ +# -*-makefile-*- +# $Id: template-make 9053 2008-11-03 10:58:48Z wsa $ +# +# Copyright (C) 2009 by Robert Schwebel +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_INITMETHOD_BBINIT) += initmethod-bbinit + +# +# Paths and names +# +INITMETHOD_BBINIT_VERSION := 1.0.0 +INITMETHOD_BBINIT := initmethod-bbinit-$(INITMETHOD_BBINIT_VERSION) +INITMETHOD_BBINIT_SUFFIX := +INITMETHOD_BBINIT_URL := +INITMETHOD_BBINIT_SOURCE := +INITMETHOD_BBINIT_DIR := $(BUILDDIR)/$(INITMETHOD_BBINIT) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(INITMETHOD_BBINIT_SOURCE): + @$(call targetinfo) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +$(STATEDIR)/initmethod-bbinit.extract: + @$(call targetinfo) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +$(STATEDIR)/initmethod-bbinit.prepare: + @$(call targetinfo) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/initmethod-bbinit.compile: + @$(call targetinfo) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/initmethod-bbinit.install: + @$(call targetinfo) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/initmethod-bbinit.targetinstall: + @$(call targetinfo) + + @$(call install_init, initmethod-bbinit) + @$(call install_fixup, initmethod-bbinit,PACKAGE,initmethod-bbinit) + @$(call install_fixup, initmethod-bbinit,PRIORITY,optional) + @$(call install_fixup, initmethod-bbinit,VERSION,$(INITMETHOD_BBINIT_VERSION)) + @$(call install_fixup, initmethod-bbinit,SECTION,base) + @$(call install_fixup, initmethod-bbinit,AUTHOR,"Robert Schwebel ") + @$(call install_fixup, initmethod-bbinit,DEPENDS,) + @$(call install_fixup, initmethod-bbinit,DESCRIPTION,missing) + + # first of all: generate the required directories & rcS + @$(call install_copy, initmethod-bbinit, 0, 0, 0755, /etc/init.d) + @$(call install_copy, initmethod-bbinit, 0, 0, 0755, /etc/rc.d) + @$(call install_alternative, initmethod-bbinit, 0, 0, 0755, /etc/init.d/rcS, n) + @$(call install_alternative, initmethod-bbinit, 0, 0, 0644, /etc/inittab, n) + @$(call install_replace, initmethod-bbinit, /etc/inittab, \ + @CONSOLE@, \ + $(call remove_quotes,$(PTXCONF_CONSOLE_NAME))) + @$(call install_replace, initmethod-bbinit, /etc/inittab, \ + @SPEED@, \ + $(call remove_quotes,$(PTXCONF_CONSOLE_SPEED))) + + # + # start scripts + # + +ifdef PTXCONF_INITMETHOD_BBINIT_ETC_INITD_BANNER + @$(call install_alternative, initmethod-bbinit, 0, 0, 0755, /etc/init.d/banner, n) + @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ + @VENDOR@, $(PTXCONF_ROOTFS_ETC_VENDOR) ) + @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ + @PROJECT@, $(PTXCONF_PROJECT) ) + @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ + @PRJVERSION@, $(PTXCONF_PROJECT_VERSION) ) + @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ + @VERSION@, $(VERSION) ) + @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ + @PTXDIST@, $(PROJECT) ) + @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ + @PATCHLEVEL@, $(PATCHLEVEL) ) + @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ + @SUBLEVEL@, $(SUBLEVEL) ) + @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ + @EXTRAVERSION@, $(EXTRAVERSION) ) + @$(call install_replace, initmethod-bbinit, /etc/init.d/banner, \ + @DATE@, $(shell date -Iseconds) ) +endif + +ifdef PTXCONF_INITMETHOD_BBINIT_ETC_INITD_MODULES + @$(call install_alternative, initmethod-bbinit, 0, 0, 0755, /etc/init.d/modules, n) + @$(call install_alternative, initmethod-bbinit, 0, 0, 0644, /etc/modules, n) +endif + +ifdef PTXCONF_INITMETHOD_BBINIT_ETC_INITD_LOGROTATE + @$(call install_alternative, initmethod-bbinit, 0, 0, 0755, /etc/init.d/logrotate, n) +endif + +ifdef PTXCONF_INITMETHOD_BBINIT_ETC_INITD_NETWORKING + @$(call install_alternative, initmethod-bbinit, 0, 0, 0755, /etc/init.d/networking, n) + @$(call install_alternative, initmethod-bbinit, 0, 0, 0644, /etc/network/interfaces, n) + @$(call install_copy, initmethod-bbinit, 0, 0, 0755, /etc/network/if-down.d) + @$(call install_copy, initmethod-bbinit, 0, 0, 0755, /etc/network/if-up.d) + @$(call install_copy, initmethod-bbinit, 0, 0, 0755, /etc/network/if-post-down.d) + @$(call install_copy, initmethod-bbinit, 0, 0, 0755, /etc/network/if-pre-up.d) +endif + + # + # collect start links + # +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_DBUS)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/dbus, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_DBUS)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_DNSMASQ)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/dnsmasq, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_DNSMASQ)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_DROPBEAR)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/dropbear, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_DROPBEAR)) +endif +ifneq ($(call remove_quotes, $(PTXCONF_ROOTFS_SYSVINIT_LINK_INETD)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/inetd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_INETD)) +endif +ifneq ($(call remove_quotes, $(PTXCONF_ROOTFS_SYSVINIT_LINK_LIGHTTPD)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/lighttpd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_LIGHTTPD)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_MYSQL)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/mysql, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_MYSQL)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_NFSD)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/nfsd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_NFSD)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_NTP)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/ntp, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_NTP)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_NTPCLIENT)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/ntpclient, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_NTPCLIENT)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_OPENSSH)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/openssh, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_OPENSSH)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_PORTMAP)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/portmapd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_PORTMAP)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_PPPD)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/pppd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_PPPD)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_PROFTPD)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/proftpd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_PROFTPD)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_PURE_FTPD)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/pure-ftpd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_PURE_FTPD)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_RSYNCD)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/rsyncd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_RSYNCD)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_SAMBA)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/samba, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_SAMBA)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_SYSLOG_NG)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/syslog-ng, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_SYSLOG_NG)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_TELNETD)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/telnetd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_TELNETD)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_THTTPD)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/thttpd, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_THTTPD)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_UDEV)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/udev, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_UDEV)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_BANNER)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/banner, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_BANNER)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_LOGROTATE)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/logrotate, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_LOGROTATE)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_MODULES)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/modules, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_MODULES)) +endif +ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_SYSVINIT_LINK_NETWORKING)),) + @$(call install_link, initmethod-bbinit, \ + ../init.d/networking, \ + /etc/rc.d/$(PTXCONF_ROOTFS_SYSVINIT_LINK_NETWORKING)) +endif + @$(call install_finish, initmethod-bbinit) + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +initmethod-bbinit_clean: + rm -rf $(STATEDIR)/initmethod-bbinit.* + rm -rf $(PKGDIR)/initmethod-bbinit_* + rm -rf $(INITMETHOD_BBINIT_DIR) + +# vim: syntax=make + diff --git a/rules/initmethod.in b/rules/initmethod.in new file mode 100644 index 000000000..e40f5e892 --- /dev/null +++ b/rules/initmethod.in @@ -0,0 +1,181 @@ +## SECTION=rootfs + +menu "init " + +choice + prompt "init method" + + config INITMETHOD_BBINIT + bool + select BUSYBOX_HOSTNAME + select BUSYBOX_RUN_PARTS + prompt "busybox init " + + config INITMETHOD_UPSTART + bool + prompt "upstart " + + config INITMETHOD_INITNG + bool + prompt "init ng " + +endchoice + +source "generated/initmethod_bbinit.in" +#source "generated/initmethod_upstart.in" +#source "generated/initmethod_initng.in" + +if INITMETHOD_BBINIT + +menu "service startup configuration " + +config ROOTFS_SYSVINIT_LINK_DBUS + string + depends on DBUS + prompt "dbus" + default "S12dbus" + +config ROOTFS_SYSVINIT_LINK_DNSMASQ + string + depends on DNSMASQ + prompt "dnsmasq" + default "" + +config ROOTFS_SYSVINIT_LINK_DROPBEAR + string + depends on DROPBEAR + prompt "dropbear" + default "S16dropbear" + +config ROOTFS_SYSVINIT_LINK_INETD + string + depends on INETD + prompt "inetd" + default "S95inetd" + +config ROOTFS_SYSVINIT_LINK_LIGHTTPD + string + depends on LIGHTTPD + prompt "lighttpd" + default "S91lighttpd" + +config ROOTFS_SYSVINIT_LINK_MYSQL + string + depends on MYSQL + prompt "mysql" + default "" + +config ROOTFS_SYSVINIT_LINK_NFSD + string + depends on NFSD + prompt "nfsd" + default "S95nfsd" + +config ROOTFS_SYSVINIT_LINK_NTP + string + depends on NTP + prompt "ntp" + default "" + +config ROOTFS_SYSVINIT_LINK_NTPCLIENT + string + depends on NTPCLIENT + prompt "ntpclient" + default "" + +config ROOTFS_SYSVINIT_LINK_OPENSSH + string + depends on OPENSSH + prompt "openssh" + default "S16openssh" + +config ROOTFS_SYSVINIT_LINK_PORTMAPD + string + depends on PORTMAPD + prompt "portmapd" + default "" + +config ROOTFS_SYSVINIT_LINK_PPPD + string + depends on PPPD + prompt "pppd" + default "" + +config ROOTFS_SYSVINIT_LINK_PROFTPD + string + depends on PROFTPD + prompt "proftpd" + default "S91proftpd" + +config ROOTFS_SYSVINIT_LINK_PURE_FTPD + string + depends on PURE_FTPD + prompt "pureftpd" + default "S91pureftpd" + +config ROOTFS_SYSVINIT_LINK_RSYNCD + string + depends on RSYNCD + prompt "rsyncd" + default "S20rsyncd" + +config ROOTFS_SYSVINIT_LINK_SAMBA + string + depends on SAMBA + prompt "samba" + default "" + +config ROOTFS_SYSVINIT_LINK_SYSLOG_NG + string + depends on SYSLOG_NG + prompt "syslog-ng" + default "S10syslogd" + +config ROOTFS_SYSVINIT_LINK_TELNETD + string + depends on BUSYBOX_TELNETD + prompt "telnetd" + default "S16telnetd" + +config ROOTFS_SYSVINIT_LINK_THTTPD + string + depends on THTTPD + prompt "thttpd" + default "S91thttpd" + +config ROOTFS_SYSVINIT_LINK_UDEV + string + depends on UDEV + prompt "udev" + default "S00udev" + +config ROOTFS_SYSVINIT_LINK_BANNER + string + depends on INITMETHOD_BBINIT_ETC_INITD_BANNER + prompt "banner" + default "S99banner" + +config ROOTFS_SYSVINIT_LINK_LOGROTATE + string + depends on INITMETHOD_BBINIT_ETC_INITD_LOGROTATE + prompt "logrotate" + default "S99logrotate" + +config ROOTFS_SYSVINIT_LINK_MODULES + string + depends on INITMETHOD_BBINIT_ETC_INITD_MODULES + prompt "modules" + default "S99modules" + +config ROOTFS_SYSVINIT_LINK_NETWORKING + string + depends on INITMETHOD_BBINIT_ETC_INITD_NETWORKING + prompt "networking" + default "S26networking" + +endmenu + +endif + +endmenu + diff --git a/rules/lighttpd.in b/rules/lighttpd.in index bea9f8eed..34e87af12 100644 --- a/rules/lighttpd.in +++ b/rules/lighttpd.in @@ -114,59 +114,10 @@ config LIGHTTPD__LUA help lua engine for mod_cml - -choice - prompt "Kind of startup script" - default LIGHTTPD__ETC_INITD_GENERIC - depends on LIGHTTPD - help - The /etc/init.d/lighttpd script lets you control the lighttpd daemon. - - config LIGHTTPD__ETC_INITD_NONE - bool - prompt "no init.d script" - - config LIGHTTPD__ETC_INITD_GENERIC - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/lighttpd startup - script. The file from - /generic/etc/init.d/lighttpd - will be used. - - config LIGHTTPD__ETC_INITD_USER - bool - prompt "User defined" - help - This uses a user defined lighttpd. PTXdist uses - file projectroot/etc/init.d/lighttpd in your - local project -endchoice - - - -choice - prompt "Kind of httpd.conf" - default LIGHTTPD__CONFIG_DEFAULT - - config LIGHTTPD__CONFIG_NONE - bool "no config" - - config LIGHTTPD__CONFIG_DEFAULT - bool "Use generic" - help - Install generic lighttpd files. - See /generic/etc/lighttpd/lighttpd.conf - and /generic/etc/lighttpd/mod_fastcgi.conf - - config LIGHTTPD__CONFIG_USER - bool "User defined" - help - This uses a user defined lighttpd.conf file. - PTXdist uses file projectroot/etc/lighttpd/lighttpd.conf in your - local project. -endchoice +config LIGHTTPD_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/lighttpd" config LIGHTTPD__GENERIC_SITE bool diff --git a/rules/lighttpd.make b/rules/lighttpd.make index 160981673..61f541fdf 100644 --- a/rules/lighttpd.make +++ b/rules/lighttpd.make @@ -232,41 +232,27 @@ $(STATEDIR)/lighttpd.targetinstall: ) \ done - -ifdef PTXCONF_LIGHTTPD__ETC_INITD_GENERIC - @$(call install_copy, lighttpd, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/lighttpd, \ - /etc/init.d/lighttpd, n) + # + # config + # + @$(call install_alternative, lighttpd, 0, 0, 0644, /etc/lighttpd.conf, n) + # FIXME: withoug PTXCONF_PHP5_SAPI_CGI, we want to install + # $(PTXDIST_TOPDIR)/generic/etc/lighttpd/lighttpd-no_php.conf instead? + + # + # busybox init: start script + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_LIGHTTPD_STARTSCRIPT + @$(call install_alternative, lighttpd, 0, 0, 0755, /etc/init.d/lighttpd, n) endif - -ifdef PTXCONF_LIGHTTPD__ETC_INITD_USER - @$(call install_copy, lighttpd, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/lighttpd, \ - /etc/init.d/lighttpd, n) endif - -ifdef PTXCONF_LIGHTTPD__CONFIG_DEFAULT -# use generic one ifdef PTXCONF_PHP5_SAPI_CGI - @$(call install_copy, lighttpd, 12, 102, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/lighttpd/lighttpd.conf, \ - /etc/lighttpd/lighttpd.conf, n) - @$(call install_copy, lighttpd, 12, 102, 0644, \ $(PTXDIST_TOPDIR)/generic/etc/lighttpd/mod_fastcgi.conf, \ /etc/lighttpd/mod_fastcgi.conf, n) -else - @$(call install_copy, lighttpd, 12, 102, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/lighttpd/lighttpd-no_php.conf, \ - /etc/lighttpd/lighttpd.conf, n) -endif -endif -ifdef PTXCONF_LIGHTTPD__CONFIG_USER -# users one - @$(call install_copy, lighttpd, 12, 102, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/lighttpd/lighttpd.conf, \ - /etc/lighttpd/lighttpd.conf, n) endif ifdef PTXCONF_LIGHTTPD__GENERIC_SITE @@ -289,12 +275,6 @@ else endif endif -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_LIGHTTPD_LINK),"") - @$(call install_copy, lighttpd, 0, 0, 0755, /etc/rc.d) - @$(call install_link, lighttpd, ../init.d/lighttpd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_LIGHTTPD_LINK)) -endif - @$(call install_finish, lighttpd) @$(call touch, $@) diff --git a/rules/mysql.in b/rules/mysql.in index d60952423..77a76ff59 100644 --- a/rules/mysql.in +++ b/rules/mysql.in @@ -390,6 +390,10 @@ config MYSQL_QUERY_CACHE bool prompt "query cache" +config MYSQL_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/mysql" endif diff --git a/rules/mysql.make b/rules/mysql.make index e56621d46..283a3b9bf 100644 --- a/rules/mysql.make +++ b/rules/mysql.make @@ -345,7 +345,11 @@ $(STATEDIR)/mysql.targetinstall: # install config # @$(call install_copy, phycore-pxa270, 0, 0, 0644, $(PTXDIST_WORKSPACE)/projectroot/etc/my.cnf, /etc/my.cnf, n) -# @$(call install_copy, mysql, 0, 0, 0755, $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/mysql, /etc/init.d/mysql, n) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_MYSQL_STARTSCRIPT + @$(call install_alternative, mysql, 0, 0, 0755, /etc/init.d/mysql, n) +endif +endif @$(call install_finish,mysql) diff --git a/rules/nfsutils.in b/rules/nfsutils.in index 2801d346d..15f102780 100644 --- a/rules/nfsutils.in +++ b/rules/nfsutils.in @@ -107,26 +107,10 @@ config NFSUTILS_INSTALL_STATD comment "runtime options" -choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_NFS_DEFAULT - - config ROOTFS_ETC_INITD_NFS_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/nfsd startup script. - See /generic/etc/init.d/nfsd - - config ROOTFS_ETC_INITD_NFS_USER - bool - prompt "User defined" - help - This uses a user defined nfsd startup script. PTXdist - uses files projectroot/etc/init.d/nfsd in your local - project - -endchoice +config NFSUTILS_NFSD_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/nfsd" config NFSUTILS_INSTALL_USER_EXPORTS bool diff --git a/rules/nfsutils.make b/rules/nfsutils.make index e721286f6..e9e1009af 100644 --- a/rules/nfsutils.make +++ b/rules/nfsutils.make @@ -155,16 +155,6 @@ $(STATEDIR)/nfsutils.targetinstall: $(nfsutils_targetinstall_deps_default) @$(call install_fixup,nfsutils,DEPENDS,) @$(call install_fixup,nfsutils,DESCRIPTION,missing) -#ifdef PTXCONF_NFSUTILS_INSTALL_CLIENTSCRIPT -# @$(call install_copy, nfsutils, 0, 0, 0755, $(NFSUTILS_DIR)/etc/nodist/nfs-client, /etc/init.d/nfs-client, n) -#endif -#ifdef PTXCONF_NFSUTILS_INSTALL_FUNCTIONSSCRIPT -# @$(call install_copy, nfsutils, 0, 0, 0644, $(NFSUTILS_DIR)/etc/nodist/nfs-functions, /etc/init.d/nfs-functions, n) -#endif -#ifdef PTXCONF_NFSUTILS_INSTALL_SERVERSCRIPT -# @$(call install_copy, nfsutils, 0, 0, 0755, $(NFSUTILS_DIR)/etc/nodist/nfs-server, /etc/init.d/nfs-server, n) -#endif - ifdef PTXCONF_NFSUTILS_INSTALL_EXPORTFS @$(call install_copy, nfsutils, 0, 0, 0755, \ $(NFSUTILS_DIR)/utils/exportfs/exportfs, \ @@ -199,11 +189,12 @@ ifdef PTXCONF_NFSUTILS_INSTALL_STATD $(NFSUTILS_DIR)/utils/statd/statd,\ /usr/sbin/rpc.statd) endif + # + # create the /var/lib/nfs folder + # for locking this folder must be persistent on server side! + # Do not use tmpfs or any other non persistent filesystem. + # -# create the /var/lib/nfs folder -# for locking this folder must be persistent on server side! -# Do not use tmpfs or any other non persistent filesystem. -# @$(call install_copy, nfsutils, 0, 0, 0755, \ /var/lib/nfs) @@ -235,34 +226,31 @@ endif @$(call install_copy, nfsutils, $(NFSUTILS_RPCUSER_UID), 0, 0700, \ /var/lib/nfs/sm.bak) -ifdef PTXCONF_ROOTFS_ETC_INITD_NFS_DEFAULT -# install the generic one - @$(call install_copy, nfsutils, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/nfsd, \ - /etc/init.d/nfsd, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_NFS_USER -# install users one - @$(call install_copy, nfsutils, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/nfsd, \ - /etc/init.d/nfsd, n) -endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_NFS_LINK),"") - @$(call install_copy, nfsutils, 0, 0, 0755, /etc/rc.d) - @$(call install_link, nfsutils, ../init.d/nfsd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_NFS_LINK)) -endif - ifdef PTXCONF_NFSUTILS_INSTALL_USER_EXPORTS -# install user defined exportfs + # install user defined exportfs @$(call install_copy, nfsutils, 0, 0, 0644, \ ${PTXDIST_WORKSPACE}/projectroot/etc/exports, \ /etc/exports, n) endif + # + # busybox init: start scripts + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_NFSUTILS_NFSD_STARTSCRIPT + @$(call install_alternative, nfsutils, 0, 0, 0755, /etc/init.d/nfsd, n) +endif +#ifdef PTXCONF_NFSUTILS_INSTALL_CLIENTSCRIPT +# @$(call install_alternative, nfsutils, 0, 0, 0755, /etc/init.d/nfs-client, n) +#endif +#ifdef PTXCONF_NFSUTILS_INSTALL_FUNCTIONSSCRIPT +# @$(call install_alternative, nfsutils, 0, 0, 0755, /etc/init.d/nfs-functions, n) +#endif +#ifdef PTXCONF_NFSUTILS_INSTALL_SERVERSCRIPT +# @$(call install_alternative, nfsutils, 0, 0, 0755, /etc/init.d/nfs-server, n) +#endif +endif @$(call install_finish, nfsutils) @$(call touch, $@) diff --git a/rules/ntp.in b/rules/ntp.in index d40c4d0cf..354f7bd85 100644 --- a/rules/ntp.in +++ b/rules/ntp.in @@ -168,7 +168,7 @@ config NTP_ARLIB help FIXME: This item needs to be documented -endif +endif source "generated/networking_ntp.in" @@ -195,19 +195,11 @@ config NTP_NTPD maintains the system time of day in synchronism with Internet standard time servers. -config NTP_NTPD_RCD_LINK +config NTP_NTPD_STARTSCRIPT bool - prompt "install link in /etc/rc.d to start ntp-server" + default y depends on NTP_NTPD - help - This option installs a link into /etc/rc.d/ to /etc/init.d/ntp-server. - -config NTP_NTPD_USR_CONF - bool - prompt "install a user defined configuration file for ntp-server" - depends on NTP_NTPD - help - This option installs a config file from project-root to /etc/ntp-server.conf + prompt "install /etc/init.d/ntp-server" config NTP_NTPDC bool @@ -217,19 +209,11 @@ config NTP_NTPDC ntpdc is used to query the ntpd daemon about its current state and to request changes in that state. -config NTP_NTPDC_RCD_LINK +config NTP_NTPC_STARTSCRIPT bool - prompt "install link in /etc/rc.d to start ntp-client" - depends on NTP_NTPDC - help - This option installs a link into /etc/rc.d/ to /etc/init.d/ntp-client. - -config NTP_NTPDC_USR_CONF - bool - prompt "install a user defined configuration file for ntp-server" - depends on NTP_NTPDC - help - This option installs a config file from project-root to /etc/ntp-client.conf + default y + depends on NTP_NTPC + prompt "install /etc/init.d/ntp-client" config NTP_NTPQ bool diff --git a/rules/ntp.make b/rules/ntp.make index 684f788cc..2f0b9129f 100644 --- a/rules/ntp.make +++ b/rules/ntp.make @@ -340,44 +340,55 @@ $(STATEDIR)/ntp.targetinstall: @$(call install_fixup, ntp,DEPENDS,) @$(call install_fixup, ntp,DESCRIPTION,missing) + # + # ntpdate + # + ifdef PTXCONF_NTP_NTPDATE @$(call install_copy, ntp, 0, 0, 0755, $(NTP_DIR)/ntpdate/ntpdate, /usr/sbin/ntpdate) endif + # + # ntp server + # + ifdef PTXCONF_NTP_NTPD @$(call install_copy, ntp, 0, 0, 0755, $(NTP_DIR)/ntpd/ntpd, /usr/sbin/ntpd) - @$(call install_copy, ntp, 0, 0, 0755, $(PTXDIST_TOPDIR)/generic/etc/init.d/ntp, /etc/init.d/ntp-server, n) - ifdef PTXCONF_NTP_NTPD_RCD_LINK - @$(call install_copy, ntp, 0, 0, 0755, /etc/rc.d) - @$(call install_link, ntp, ../init.d/ntp-server, \ - /etc/rc.d/S19_ntp-server) - endif - ifdef PTXCONF_NTP_NTPD_USR_CONF - @$(call install_copy, ntp, 0, 0, 0644, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/ntp-server.conf, \ - /etc/ntp-server.conf, n) - endif + @$(call install_alternative, ntp, 0, 0, 0644, /etc/ntp-server.conf, n) + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_NTP_NTPD_STARTSCRIPT + @$(call install_alternative, ntp, 0, 0, 0755, /etc/init.d/ntp, n) +endif +endif endif + # + # ntpdc + # + ifdef PTXCONF_NTP_NTPDC @$(call install_copy, ntp, 0, 0, 0755, $(NTP_DIR)/ntpdc/ntpdc, /usr/sbin/ntpdc) - @$(call install_link, ntp, /etc/init.d/ntp-server, /etc/init.d/ntp-client, n) - ifdef PTXCONF_NTP_NTPDC_RCD_LINK - @$(call install_copy, ntp, 0, 0, 0755, /etc/rc.d) - @$(call install_link, ntp, ../init.d/ntp-client, \ - /etc/rc.d/S19_ntp-client) - endif - ifdef PTXCONF_NTP_NTPDC_USR_CONF - @$(call install_copy, ntp, 0, 0, 0644, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/ntp-client.conf, \ - /etc/ntp-client.conf, n) - endif + @$(call install_alternative, ntp, 0, 0, 0644, /etc/ntp-client.conf, n) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_NTP_NTPC_STARTSCRIPT + @$(call install_alternative, ntp, 0, 0, 0755, /etc/init.d/ntp-client, n) +endif +endif endif + # + # ntpq + # + ifdef PTXCONF_NTP_NTPQ @$(call install_copy, ntp, 0, 0, 0755, $(NTP_DIR)/ntpq/ntpq, /usr/sbin/ntpq) endif + # + # other files + # + @$(call install_copy, ntp, 0, 0, 0755, /var/log/ntpstats/) @$(call install_copy, ntp, 0, 0, 0755, /var/lib/ntp) diff --git a/rules/ntpclient.in b/rules/ntpclient.in index e071002b3..39c4cf7fe 100644 --- a/rules/ntpclient.in +++ b/rules/ntpclient.in @@ -43,37 +43,13 @@ comment "BusyBox' adjtimex is in use" comment "runtime options ---" -config NTPCLIENT_INSTALL_STARTSCRIPT +config NTPCLIENT_STARTSCRIPT bool - prompt "Install start script" default y - help - Enable this extry to let PTXdist install a startup script - -choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_NTPCLIENT_DEFAULT - depends on NTPCLIENT_INSTALL_STARTSCRIPT - - config ROOTFS_ETC_INITD_NTPCLIENT_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/ntpclient startup script. - See /generic/etc/init.d/ntpclient - - config ROOTFS_ETC_INITD_NTPCLIENT_USER - bool - prompt "User defined" - help - This uses a user defined ntclient startup script. PTXdist - uses files projectroot/etc/init.d/ntpclient in your local - project - -endchoice + prompt "install /etc/init.d/nfsclient" config NTPCLIENT_NTPSERVER_NAME - depends on NTPCLIENT_INSTALL_STARTSCRIPT + depends on NTPCLIENT_STARTSCRIPT string prompt "NTP server name" default "" diff --git a/rules/ntpclient.make b/rules/ntpclient.make index 8c6d06593..94e8bb614 100644 --- a/rules/ntpclient.make +++ b/rules/ntpclient.make @@ -101,6 +101,7 @@ $(STATEDIR)/ntpclient.targetinstall: $(ntpclient_targetinstall_deps_default) @$(call install_fixup, ntpclient,AUTHOR,"Robert Schwebel ") @$(call install_fixup, ntpclient,DEPENDS,) @$(call install_fixup, ntpclient,DESCRIPTION,missing) + ifdef PTXCONF_NTPCLIENT_BUILD_NTPCLIENT @$(call install_copy, ntpclient, 0, 0, 0755, \ $(NTPCLIENT_DIR)/ntpclient, /usr/sbin/ntpclient) @@ -110,33 +111,19 @@ ifdef PTXCONF_NTPCLIENT_BUILD_ADJTIMEX $(NTPCLIENT_DIR)/adjtimex, /sbin/adjtimex) endif -ifdef PTXCONF_NTPCLIENT_INSTALL_STARTSCRIPT -ifdef PTXCONF_ROOTFS_ETC_INITD_NTPCLIENT_DEFAULT -# install the generic one - @$(call install_copy, ntpclient, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/ntpclient, \ - /etc/init.d/ntpclient, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_NTPCLIENT_USER -# install users one - @$(call install_copy, ntpclient, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/ntpclient, \ - /etc/init.d/ntpclient, n) -endif -# replace the @HOST@ with name of NTP server + # + # busybox init: start script + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_NTPCLIENT_STARTSCRIPT + @$(call install_alternative, ntpclient, 0, 0, 0755, /etc/init.d/ntpclient, n) ifneq ($(PTXCONF_NTPCLIENT_NTPSERVER_NAME),"") + # replace the @HOST@ with name of NTP server @$(call install_replace, ntpclient, /etc/init.d/ntpclient, \ @HOST@, \ "$(PTXCONF_NTPCLIENT_NTPSERVER_NAME)" ) endif - -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_NTPCLIENT_LINK),"") - @$(call install_copy, ntpclient, 0, 0, 0755, /etc/rc.d) - @$(call install_link, ntpclient, ../init.d/ntpclient, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_NTPCLIENT_LINK)) endif endif diff --git a/rules/openntpd.in b/rules/openntpd.in index 0a583220d..493a6a708 100644 --- a/rules/openntpd.in +++ b/rules/openntpd.in @@ -16,8 +16,6 @@ menuconfig OPENNTPD if OPENNTPD -comment "build options ---" - config OPENNTPD_ARC4RANDOM bool prompt "Use builtin arc4random rather than OpenSSL's" @@ -26,24 +24,10 @@ config OPENNTPD_ARC4RANDOM Enabled by default - if unsure, say YES Say NO and install OpenSSL as alternative. -comment "install options ---" - depends on OPENNTPD - -config OPENNTPD_USERS_CONFIG +config OPENNTPD_STARTSCRIPT bool - prompt "install user defined /etc/ntpd.conf" - help - This uses a user defined ntpd.conf file. PTXdist will use the file - projectroot/etc/ntpd.conf in your local project. - A default ntpd.conf to generate your own one comes with the packet - itself. - -config OPENNTPD_INITD_SCRIPT - bool - prompt "install user defined init.d script" - help - This options installs a user defined init.d script. PTXdist will use - the file projectroot/etc/init.d/ntp in your local project. + default y + prompt "install /etc/init.d/openntpd" endif diff --git a/rules/openntpd.make b/rules/openntpd.make index b43c4950a..be3e89d54 100644 --- a/rules/openntpd.make +++ b/rules/openntpd.make @@ -81,23 +81,20 @@ $(STATEDIR)/openntpd.targetinstall: @$(call install_copy, openntpd, 0, 0, 0755, $(OPENNTPD_DIR)/ntpd, /usr/sbin/ntpd) -ifdef PTXCONF_OPENNTPD_USERS_CONFIG - @$(call install_copy, openntpd, 0, 0, 0644, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/ntpd.conf, \ - /etc/ntpd.conf, n) -else - @$(call install_copy, openntpd, 0, 0, 0644, \ - $(OPENNTPD_DIR)/ntpd.conf, \ - /etc/ntpd.conf, n) -endif + # + # config + # + + @$(call install_alternative, openntpd, 0, 0, 0644, /etc/ntpd.conf, n) -ifdef PTXCONF_OPENNTPD_INITD_SCRIPT - @$(call install_copy, openntpd, 0,0, 755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/ntp, \ - /etc/init.d/ntp, n) - @$(call install_copy, openntpd, 0, 0, 0755, /etc/rc.d) - @$(call install_link, openntpd, ../init.d/ntp, \ - /etc/rc.d/S19_ntp) + # + # busybox init + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_OPENNTPD_STARTSCRIPT + @$(call install_alternative, openntpd, 0, 0, 0644, /etc/init.d/ntp, n) +endif endif @$(call install_finish, openntpd) diff --git a/rules/openssh.in b/rules/openssh.in index 4ebe68f25..d68c11d85 100644 --- a/rules/openssh.in +++ b/rules/openssh.in @@ -16,58 +16,35 @@ menuconfig OPENSSH if OPENSSH config OPENSSH_SSH - bool "Install ssh (client)" + bool "ssh (client)" help Install the client program (ssh) on the target config OPENSSH_SSHD - bool "Install sshd (server)" + bool "sshd (server)" default y help Install the openSSH server program (sshd) on the target -config ROOTFS_ETC_INITD_OPENSSH - depends on OPENSSH_SSHD +config OPENSSH_SSHD_STARTSCRIPT bool default y - prompt "Install startup script" - help - Install a startup script for the openSSH daemon from a selectable source - choice - prompt "Kind of startup script" - depends on OPENSSH_SSHD && ROOTFS_ETC_INITD_OPENSSH - default ROOTFS_ETC_INITD_OPENSSH_DEFAULT - - config ROOTFS_ETC_INITD_OPENSSH_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/openssh - See /generic/etc/init.d/openssh - - config ROOTFS_ETC_INITD_OPENSSH_USER - bool - prompt "User defined" - help - This uses a user defined openssh startup script. PTXdist - uses file projectroot/etc/init.d/openssh in your local - project - - endchoice + depends on OPENSSH_SSHD + prompt "install /etc/init.d/openssh" config OPENSSH_SCP - bool "Install scp" + bool "scp" help Install the secure copy program (scp) on the target config OPENSSH_SFTP_SERVER - bool "Install sftp-server" + bool "sftp-server" help Install the secure ftp program (sftp) on the target config OPENSSH_KEYGEN - bool "Install ssh-keygen" + bool "ssh-keygen" default y help Install ssh-keygen on the target diff --git a/rules/openssh.make b/rules/openssh.make index ddbc0f868..161b2cd76 100644 --- a/rules/openssh.make +++ b/rules/openssh.make @@ -140,6 +140,11 @@ ifdef PTXCONF_OPENSSH_SSHD @$(call install_alternative, openssh, 0, 0, 0644, /etc/ssh/sshd_config) @$(call install_copy, openssh, 0, 0, 0755, $(OPENSSH_DIR)/sshd, \ /usr/sbin/sshd) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_OPENSSH_SSHD_STARTSCRIPT + @$(call install_alternative, openssh, 0, 0, 0755, /etc/init.d/openssh, n) +endif +endif endif ifdef PTXCONF_OPENSSH_SCP @@ -157,27 +162,6 @@ ifdef PTXCONF_OPENSSH_KEYGEN /usr/bin/ssh-keygen) endif -ifdef PTXCONF_ROOTFS_ETC_INITD_OPENSSH_DEFAULT -# install the generic one - @$(call install_copy, openssh, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/openssh, \ - /etc/init.d/openssh, n) -endif - -ifdef PTXCONF_ROOTFS_ETC_INITD_OPENSSH_USER -# install users one - @$(call install_copy, openssh, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/openssh, \ - /etc/init.d/openssh, n) -endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_OPENSSH_LINK),"") - @$(call install_link, openssh, ../init.d/openssh, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_OPENSSH_LINK)) -endif - @$(call install_finish, openssh) @$(call touch, $@) diff --git a/rules/portmap.in b/rules/portmap.in index b92630b05..70cb67fe6 100644 --- a/rules/portmap.in +++ b/rules/portmap.in @@ -11,67 +11,9 @@ menuconfig PORTMAP if PORTMAP -config PORTMAP_INSTALL_PORTMAPPER +config PORTMAP_STARTSCRIPT bool default y - prompt "Install /sbin/portmap" - help - Install the portmapper into /sbin/portmap - -comment "runtime options ---" - -choice - prompt "Kind of startup" - default PORTMAP_STARTUP_TYPE_STANDALONE - - config PORTMAP_INETD_SERVER - bool - prompt "inetd driven" - help - portmap will be started on demand from inetd. This installs - a startup configuration for portmap from inetd. It adds to the - /etc/inetd.conf a line like this: - portmap stream tcp nowait root /sbin/portmap portmap - Note: You must enable one of the two possible inet daemons: - There is one embedded in busybox and one in packet inetutils. - - config PORTMAP_STARTUP_TYPE_STANDALONE - bool - prompt "standalone" - help - This installs a startup script into /etc/init.d/portmapd. With - this script portmap will be started at system startup and waits - for connections - -endchoice - -config PORTMAP_INETD_STRING - string - depends on PORTMAP_INETD_SERVER - prompt "inetd service entry" - default "sunrpc stream tcp nowait root /sbin/portmap portmap" - help - This string is added to inetd's configuration /etc/inetd.conf. - -choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_PORTMAP_DEFAULT - depends on PORTMAP_STARTUP_TYPE_STANDALONE - - config ROOTFS_ETC_INITD_PORTMAP_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/portmapd startup script. - See /generic/etc/init.d/portmapd - - config ROOTFS_ETC_INITD_PORTMAP_USER - bool - prompt "User defined" - help - This uses a user defined portmap startup script. PTXdist - uses files projectroot/etc/init.d/portmapd in your local - project + prompt "install /etc/init.d/portmap" -endchoice endif diff --git a/rules/portmap.make b/rules/portmap.make index 07b1b70f3..ed3b25085 100644 --- a/rules/portmap.make +++ b/rules/portmap.make @@ -114,33 +114,26 @@ $(STATEDIR)/portmap.targetinstall: $(portmap_targetinstall_deps_default) @$(call install_fixup, portmap,DEPENDS,) @$(call install_fixup, portmap,DESCRIPTION,missing) -ifdef PTXCONF_PORTMAP_INSTALL_PORTMAPPER - @$(call install_copy, portmap, 0, 0, 0755, $(PORTMAP_DIR)/portmap, \ + @$(call install_copy, portmap, 0, 0, 0755, \ + $(PORTMAP_DIR)/portmap, \ /sbin/portmap) -endif -ifdef PTXCONF_PORTMAP_STARTUP_TYPE_STANDALONE -# provide everything for standalone mode -ifdef PTXCONF_ROOTFS_ETC_INITD_PORTMAP_DEFAULT -# install the generic one - @$(call install_copy, portmap, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/portmapd, \ - /etc/init.d/portmapd, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_PORTMAP_USER -# install users one - @$(call install_copy, portmap, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/portmapd, \ - /etc/init.d/portmapd, n) + # + # busybox init + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_PORTMAP_STARTSCRIPT + @$(call install_alternative, portmap, 0, 0, 0755, /etc/init.d/portmapd, n) endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_PORTMAP_LINK),"") - @$(call install_copy, portmap, 0, 0, 0755, /etc/rc.d) - @$(call install_link, portmap, ../init.d/portmapd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_PORTMAP_LINK)) endif + + # + # /etc/inetd.conf sniplet + # + +ifdef PTXCONF_PORTMAP_INETD_SERVER + @$(call install_alternative, portmap, 0, 0, 0644, /etc/inetd.conf.d/portmap, n) endif @$(call install_finish, portmap) diff --git a/rules/ppp.in b/rules/ppp.in index b72f62f6d..e60145f65 100644 --- a/rules/ppp.in +++ b/rules/ppp.in @@ -173,25 +173,9 @@ config PPP_INST_PPPSTATS The pppstats utility reports PPP-related statistics at regular intervals for a specified PPP interface. -comment "startup options" - -config PPP_INSTALL_START_SCRIPT +config PPP_STARTSCRIPT bool - prompt "install start script" - help - Enabling this entry will install a project specific start script. - PTXdist uses the file projectroot/etc/init.d/pppd in this case. - Note: There is no generic script availlable, you must provide your - own. - -config PPP_INSTALL_START_LINK - string - default "S10_pppd" - depends on PPP_INSTALL_START_SCRIPT - prompt "create start script link" - help - Enabling this entry will install a project specific start script. - Note: There is no generic script availlable, you must provide your - own. + default y + prompt "install /etc/init.d/pppd" endif diff --git a/rules/ppp.make b/rules/ppp.make index 17fb0d6d8..b32ec3340 100644 --- a/rules/ppp.make +++ b/rules/ppp.make @@ -171,14 +171,13 @@ endif @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/options.ttyS0, n) @$(call install_alternative, ppp, 0, 0, 0600, /etc/ppp/pap-secrets, n) -# handle system startup on demand -ifdef PTXCONF_PPP_INSTALL_START_SCRIPT - @$(call install_copy, ppp, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/pppd, \ - /etc/init.d/pppd) -ifneq ($(PTXCONF_PPP_INSTALL_START_LINK),"") - @$(call install_link, ppp, ../init.d/pppd, \ - /etc/rc.d/$(PTXCONF_PPP_INSTALL_START_LINK)) + # + # busybox init + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_PPP_STARTSCRIPT + @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/pppd, n) endif endif diff --git a/rules/proftpd.in b/rules/proftpd.in index b9b958f75..618688511 100644 --- a/rules/proftpd.in +++ b/rules/proftpd.in @@ -35,10 +35,9 @@ config PROFTPD_AUTOSHADOW help FIXME: This item needs to be documented -config PROFTPD_DEFAULTCONFIG +config PROFTPD_STARTSCRIPT bool - prompt "install default config file" - help - FIXME: This item needs to be documented + default y + prompt "install /etc/init.d/proftpd" endif diff --git a/rules/proftpd.make b/rules/proftpd.make index 2bd4dbb4a..a6ac26576 100644 --- a/rules/proftpd.make +++ b/rules/proftpd.make @@ -140,14 +140,16 @@ $(STATEDIR)/proftpd.targetinstall: $(proftpd_targetinstall_deps_default) @$(call install_copy, proftpd, 0, 0, 0755, \ $(PROFTPD_DIR)/proftpd, \ /usr/sbin/proftpd) - @$(call install_copy, proftpd, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/proftpd, \ - /etc/init.d/proftpd, n) -ifdef PTXCONF_PROFTPD_DEFAULTCONFIG - @$(call install_copy, proftpd, 11, 101, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/proftpd.conf, \ - /etc/proftpd.conf, n) + @$(call install_alternative, proftpd, 0, 0, 0644, /etc/proftpd.conf, n) + + # + # busybox init + # +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_PROFTPD_STARTSCRIPT + @$(call install_alternative, proftpd, 0, 0, 0755, /etc/init.d/proftpd, n) +endif endif @$(call install_finish, proftpd) diff --git a/rules/pureftpd.in b/rules/pureftpd.in index 2a470bef8..6186001f6 100644 --- a/rules/pureftpd.in +++ b/rules/pureftpd.in @@ -62,67 +62,9 @@ config PUREFTPD_SHRINK_MORE But note: Globbing is a nice feature and for Windows clients most of time required! -comment "runtime options ---" - -config PUREFTPD_ETC_CONFIG +config PUREFTPD_STARTSCRIPT bool - prompt "default config" - 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 - - 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_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 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 /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 + default y + prompt "install /etc/init.d/pure-ftpd" -endchoice endif diff --git a/rules/pureftpd.make b/rules/pureftpd.make index 5288c08ef..1a3204bcd 100644 --- a/rules/pureftpd.make +++ b/rules/pureftpd.make @@ -130,49 +130,26 @@ $(STATEDIR)/pureftpd.targetinstall: $(PUREFTPD_DIR)/src/pure-ftpd, \ /usr/sbin/pure-ftpd) + @$(call install_alternative, pureftpd, 0, 0, 0644, /etc/pure-ftpd.conf, n) + @$(call install_alternative, pureftpd, 0, 0, 0644, /etc/inetd.conf.d/pure-ftpd, n) + ifdef PTXCONF_PUREFTPD_UPLOADSCRIPT @$(call install_copy, pureftpd, 0, 0, 0755, \ $(PUREFTPD_DIR)/src/pure-uploadscript, \ /usr/sbin/pure-uploadscript, n) endif + # + # busybox init + # -ifdef PTXCONF_ROOTFS_ETC_INITD_PUREFTPD -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, pureftpd, 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? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_PUREFTPD_LINK),"") - @$(call install_copy, pureftpd, 0, 0, 0755, /etc/rc.d) - @$(call install_link, pureftpd, ../init.d/pure-ftpd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_PUREFTPD_LINK)) -endif -endif - -ifdef PTXCONF_PUREFTPD_ETC_CONFIG -ifdef PTXCONF_ROOTFS_ETC_INITD_PUREFTPD_DEFAULT - @$(call install_copy, pureftpd, 0, 0, 0644, \ - ${PTXDIST_TOPDIR}/generic/etc/pure-ftpd.conf, \ - /etc/pure-ftpd.conf, n) -else - @$(call install_copy, pureftpd, 0, 0, 0644, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/pure-ftpd.conf, \ - /etc/pure-ftpd.conf, n) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_PUREFTPD_STARTSCRIPT + @$(call install_alternative, pureftpd, 0, 0, 0755, /etc/init.d/pure-ftpd, n) endif endif - @$(call install_finish,pureftpd) + @$(call install_finish, pureftpd) @$(call touch) diff --git a/rules/rootfs.in b/rules/rootfs.in index 4f14ab57e..68743c0ca 100644 --- a/rules/rootfs.in +++ b/rules/rootfs.in @@ -1,7 +1,7 @@ ## SECTION=rootfs # ---------------------------------------------------------------------------- -menu "populate rootfs " +menu "directories in rootfs " # ---------------------------------------------------------------------------- config ROOTFS @@ -221,3 +221,63 @@ config ROOTFS_VAR_LIB # ---------------------------------------------------------------------------- endmenu + +# ---------------------------------------------------------------------------- +menu "files in rootfs " +# ---------------------------------------------------------------------------- + +config ROOTFS_PASSWD + bool + prompt "install /etc/passwd" + +config ROOTFS_SHADOW + bool + prompt "install /etc/shadow" + +config ROOTFS_GROUP + bool + prompt "install /etc/group" + +config ROOTFS_GSHADOW + bool + prompt "install /etc/gshadow" + +config ROOTFS_FSTAB + bool + prompt "install /etc/fstab" + +config ROOTFS_MTAB + bool + prompt "install /etc/mtab" + +config ROOTFS_HOSTNAME + bool + prompt "install /etc/hostname" + +config ROOTFS_ETC_HOSTNAME + string + prompt "hostname" + depends on ROOTFS_HOSTNAME + +config ROOTFS_HOSTS + bool + prompt "install /etc/hosts" + +config ROOTFS_NSSWITCH_CONF + bool + prompt "install /etc/nsswitch" + +config ROOTFS_PROFILE + bool + prompt "install /etc/profile" + +config ROOTFS_PROTOCOLS + bool + prompt "install /etc/protocols" + +config ROOTFS_RESOLV + bool + prompt "install /etc/resolv.conf" + +endmenu + diff --git a/rules/rootfs.make b/rules/rootfs.make index 7dff15f57..544a51710 100644 --- a/rules/rootfs.make +++ b/rules/rootfs.make @@ -85,9 +85,9 @@ $(STATEDIR)/rootfs.targetinstall: $(rootfs_targetinstall_deps_default) @$(call install_fixup, rootfs,DEPENDS,) @$(call install_fixup, rootfs,DESCRIPTION,missing) -# ----------------------------------------------------------------------------- -# This part generates root filesystem's structure -# ----------------------------------------------------------------------------- + # + # install directories in rootfs + # ifdef PTXCONF_ROOTFS_DEV @$(call install_copy, rootfs, 0, 0, 0755, /dev) @@ -162,742 +162,55 @@ endif ifdef PTXCONF_ROOTFS_VAR_LIB @$(call install_copy, rootfs, 0, 0, 0755, /var/lib) endif -# ----------------------------------------------------------------------------- -# This part installs startscrips into /etc/init.d and links into /etc/rc.d -# ----------------------------------------------------------------------------- -# First of all: generate the required directories - - @$(call install_copy, rootfs, 0, 0, 0755, /etc/init.d) - @$(call install_copy, rootfs, 0, 0, 0755, /etc/rc.d) - -# ----------------------------------------------------------------------------- -# /etc/init.d/rcS from selectable source -# -ifdef PTXCONF_ROOTFS_ETC_INITD_RCS -ifdef PTXCONF_ROOTFS_ETC_INITD_RCS_DEFAULT - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/rcS, \ - /etc/init.d/rcS, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_RCS_USER - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/rcS, \ - /etc/init.d/rcS, n) -endif -endif - -# ----------------------------------------------------------------------------- -# FIXME provide also a user defined file! -ifdef PTXCONF_ROOTFS_ETC_INITD_LOGROTATE - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/logrotate, \ - /etc/init.d/logrotate, n) -endif - -# ----------------------------------------------------------------------------- -# initd's script is here, because the busybox entry does not provide it -# initd from inetutils package uses its own startscript -# -ifdef PTXCONF_ROOTFS_ETC_INITD_INETD - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/inetd, \ - /etc/init.d/inetd, n) -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_INETD_LINK),"") - @$(call install_link, rootfs, ../init.d/inetd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_INETD_LINK)) -endif -endif - -# ----------------------------------------------------------------------------- -ifdef PTXCONF_ROOTFS_ETC_INITD_MODULES - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/modules, \ - /etc/init.d/modules, n) -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_MODULES_LINK),"") - @$(call install_link, rootfs, ../init.d/modules, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_MODULES_LINK)) -endif -endif - -# ----------------------------------------------------------------------------- -ifdef PTXCONF_ROOTFS_ETC_INITD_NETWORKING - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/networking, \ - /etc/init.d/networking, n) - @$(call install_copy, rootfs, 0, 0, 0755, /etc/network/if-down.d) - @$(call install_copy, rootfs, 0, 0, 0755, /etc/network/if-up.d) - @$(call install_copy, rootfs, 0, 0, 0755, /etc/network/if-post-down.d) - @$(call install_copy, rootfs, 0, 0, 0755, /etc/network/if-pre-up.d) -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_NETWORKING_LINK),"") - @$(call install_link, rootfs, ../init.d/networking, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_NETWORKING_LINK)) -endif -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_NETWORKING_INTERFACES),"") - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXCONF_ROOTFS_ETC_INITD_NETWORKING_INTERFACES), \ - /etc/network/interfaces, n) -endif -endif - -# ----------------------------------------------------------------------------- -# telnetd's script is here, because the busybox entry does not provide it -# telnetd from other packets are useing their own startscript -# -ifdef PTXCONF_ROOTFS_ETC_INITD_TELNETD -# provide everything for standalone mode -ifdef PTXCONF_ROOTFS_ETC_INITD_TELNETD_DEFAULT -# use the generic one - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/telnetd, \ - /etc/init.d/telnetd, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_TELNETD_USER -# user defined one - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/telnetd, \ - /etc/init.d/telnetd, n) -endif - -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_TELNETD_LINK),"") - @$(call install_link, rootfs, ../init.d/telnetd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_TELNETD_LINK)) -endif -endif - -# ----------------------------------------------------------------------------- -# syslogd/klogd's script is here, because the busybox entry does not provide it -# syslogd/klogd from other packets are useing their own startscript -# -ifdef PTXCONF_ROOTFS_ETC_INITD_SYSLOGD_KLOGD -# provide everything for standalone mode -ifdef PTXCONF_ROOTFS_ETC_INITD_SYSLOGD_KLOGD_DEFAULT -# use the generic one - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/syslogd, \ - /etc/init.d/syslogd, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_SYSLOGD_KLOGD_USER -# user defined one - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/syslogd, \ - /etc/init.d/syslogd, n) -endif - -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_SYSLOGD_KLOGD_LINK),"") - @$(call install_link, rootfs, ../init.d/syslogd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_SYSLOGD_KLOGD_LINK)) -endif -endif - -# ----------------------------------------------------------------------------- -# crond's script is here, because the busybox entry does not provide it -# -ifdef PTXCONF_ROOTFS_ETC_INITD_CROND -# provide everything for standalone mode -ifdef PTXCONF_ROOTFS_ETC_INITD_CROND_DEFAULT -# use the generic one - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/crond, \ - /etc/init.d/crond, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_CROND_USER -# user defined one - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/crond, \ - /etc/init.d/crond, n) -endif - -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_CROND_LINK),"") - @$(call install_link, rootfs, ../init.d/crond, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_CROND_LINK)) -endif -endif - -# ----------------------------------------------------------------------------- -# timekeepers script is here, because the busybox entry does not provide it -# -ifdef PTXCONF_ROOTFS_ETC_INITD_HWCLOCK -ifdef PTXCONF_ROOTFS_ETC_INITD_HWCLOCK_DEFAULT -# use the generic one - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/timekeeping, \ - /etc/init.d/timekeeping, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_HWCLOCK_USER -# user defined one - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/timekeeping, \ - /etc/init.d/timekeeping, n) -endif - -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_TIMEKEEPER_LINK),"") - @$(call install_link, rootfs, ../init.d/timekeeping, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_TIMEKEEPER_LINK)) -endif -endif - -# ----------------------------------------------------------------------------- -# startup is handled here as there is no other location where it could be done -# -ifdef PTXCONF_ROOTFS_ETC_INITD_STARTUP - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/startup, \ - /etc/init.d/startup, n) - -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_STARTUP_LINK),"") - @$(call install_link, rootfs, ../init.d/startup, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_STARTUP_LINK)) -endif -endif - -# ----------------------------------------------------------------------------- -ifdef PTXCONF_ROOTFS_ETC_INITD_BANNER -ifdef PTXCONF_ROOTFS_ETC_INITD_BANNER_DEFAULT - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/banner, \ - /etc/init.d/banner, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_BANNER_USER - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/banner, \ - /etc/init.d/banner, n) -endif - - @$(call install_replace, rootfs, /etc/init.d/banner, \ - @VENDOR@, $(PTXCONF_ROOTFS_ETC_VENDOR) ) - @$(call install_replace, rootfs, /etc/init.d/banner, \ - @PROJECT@, $(PTXCONF_PROJECT) ) - @$(call install_replace, rootfs, /etc/init.d/banner, \ - @PRJVERSION@, $(PTXCONF_PROJECT_VERSION) ) - @$(call install_replace, rootfs, /etc/init.d/banner, \ - @VERSION@, $(VERSION) ) - @$(call install_replace, rootfs, /etc/init.d/banner, \ - @PTXDIST@, $(PROJECT) ) - @$(call install_replace, rootfs, /etc/init.d/banner, \ - @PATCHLEVEL@, $(PATCHLEVEL) ) - @$(call install_replace, rootfs, /etc/init.d/banner, \ - @SUBLEVEL@, $(SUBLEVEL) ) - @$(call install_replace, rootfs, /etc/init.d/banner, \ - @EXTRAVERSION@, $(EXTRAVERSION) ) - @$(call install_replace, rootfs, /etc/init.d/banner, \ - @DATE@, $(shell date -Iseconds) ) - -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_BANNER_LINK),"") - @$(call install_link, rootfs, ../init.d/banner, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_BANNER_LINK)) -endif -endif - -# ----------------------------------------------------------------------------- -ifdef PTXCONF_ROOTFS_ETC_INITD_SRAMDISK - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/sramdisk, \ - /etc/init.d/sramdisk, n) -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_SRAMDISK_LINK),"") - @$(call install_link, rootfs, ../init.d/sramdisk, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_SRAMDISK_LINK)) -endif -endif - - -# ----------------------------------------------------------------------------- -# This part installs configuration files into /etc -# ----------------------------------------------------------------------------- + # + # install files in rootfs + # ifdef PTXCONF_ROOTFS_PASSWD -# /etc/passwd -ifdef PTXCONF_ROOTFS_GENERIC_PASSWD - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/passwd, \ - /etc/passwd, n) -endif -ifdef PTXCONF_ROOTFS_USER_PASSWD - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/passwd, \ - /etc/passwd, n) -endif + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/passwd, n) endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_SHADOW -# /etc/shadow, /etc/shadow- -ifdef PTXCONF_ROOTFS_GENERIC_SHADOW - @$(call install_copy, rootfs, 0, 0, 0640, \ - $(PTXDIST_TOPDIR)/generic/etc/shadow, \ - /etc/shadow, n) - @$(call install_copy, rootfs, 0, 0, 0600, \ - $(PTXDIST_TOPDIR)/generic/etc/shadow-, \ - /etc/shadow-, n) -endif -ifdef PTXCONF_ROOTFS_USER_SHADOW - @$(call install_copy, rootfs, 0, 0, 0640, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/shadow, \ - /etc/shadow, n) - @$(call install_copy, rootfs, 0, 0, 0600, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/shadow-, \ - /etc/shadow-, n) -endif + @$(call install_alternative, rootfs, 0, 0, 0640, /etc/shadow, n) + @$(call install_alternative, rootfs, 0, 0, 0600, /etc/shadow-, n) endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_GROUP -# /etc/group, /etc/gshadow -ifdef PTXCONF_ROOTFS_GENERIC_GROUP - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/group, \ - /etc/group, n) - @$(call install_copy, rootfs, 0, 0, 0640, \ - $(PTXDIST_TOPDIR)/generic/etc/gshadow, \ - /etc/gshadow, n) -endif -ifdef PTXCONF_ROOTFS_USER_GROUP - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/group, \ - /etc/group, n) - @$(call install_copy, rootfs, 0, 0, 0640, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/gshadow, \ - /etc/gshadow, n) + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/group, n) endif +ifdef PTXCONF_ROOTFS_GSHADOW + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/gshadow, n) endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_FSTAB -# /etc/fstab -ifdef PTXCONF_ROOTFS_GENERIC_FSTAB - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/fstab, \ - /etc/fstab, n) + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/fstab, n) endif -ifdef PTXCONF_ROOTFS_USER_FSTAB - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/fstab, \ - /etc/fstab, n) -endif -endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_MTAB -# /etc/mtab -ifdef PTXCONF_ROOTFS_GENERIC_MTAB - @$(call install_link, rootfs, /proc/mounts, /etc/mtab) -endif -ifdef PTXCONF_ROOTFS_USER_MTAB - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/mtab, \ - /etc/mtab, n) + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/mtab, n) endif -endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_HOSTNAME -# /etc/hostname -ifdef PTXCONF_ROOTFS_GENERIC_HOSTNAME - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/hostname, \ - /etc/hostname, n) + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/hostname, n) @$(call install_replace, rootfs, /etc/hostname, \ @HOSTNAME@, \ $(call remove_quotes,$(PTXCONF_ROOTFS_ETC_HOSTNAME))) endif -ifdef PTXCONF_ROOTFS_USER_HOSTNAME - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/hostname, \ - /etc/hostname, n) -endif -endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_HOSTS -# /etc/hosts -ifdef PTXCONF_ROOTFS_GENERIC_HOSTS - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/hosts, \ - /etc/hosts, n) -endif -ifdef PTXCONF_ROOTFS_USER_HOSTS - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/hosts, \ - /etc/hosts, n) -endif -endif - -# ----------------------------------------------------------------------------- -ifdef PTXCONF_ROOTFS_INITTAB -# /etc/inittab -ifdef PTXCONF_ROOTFS_GENERIC_INITTAB - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/inittab, \ - /etc/inittab, n) -endif -ifdef PTXCONF_ROOTFS_USER_INITTAB - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/inittab, \ - /etc/inittab, n) -endif - @$(call install_replace, rootfs, /etc/inittab, \ - @CONSOLE@, \ - $(call remove_quotes,$(PTXCONF_CONSOLE_NAME))) - @$(call install_replace, rootfs, /etc/inittab, \ - @SPEED@, \ - $(call remove_quotes,$(PTXCONF_CONSOLE_SPEED))) + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/hosts, n) endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_NSSWITCH -# /etc/nsswitch -ifdef PTXCONF_ROOTFS_GENERIC_NSSWITCH - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/nsswitch.conf, \ - /etc/nsswitch.conf, n) -endif -ifdef PTXCONF_ROOTFS_USER_NSSWITCH - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/nsswitch.conf, \ - /etc/nsswitch.conf, n) + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/nsswitch.conf, n) endif -endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_PROFILE -# /etc/profile -ifdef PTXCONF_ROOTFS_GENERIC_PROFILE - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/profile, \ - /etc/profile, n) + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/profile, n) endif -ifdef PTXCONF_ROOTFS_USER_PROFILE - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/profile, \ - /etc/profile, n) -endif -endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_PROTOCOLS -# /etc/protocols -ifdef PTXCONF_ROOTFS_GENERIC_PROTOCOLS - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/protocols, \ - /etc/protocols, n) -endif -ifdef PTXCONF_ROOTFS_USER_PROTOCOLS - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/protocols, \ - /etc/protocols, n) + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/protocols, n) endif -endif - -# ----------------------------------------------------------------------------- ifdef PTXCONF_ROOTFS_RESOLV -# /etc/resolv - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/resolv.conf, \ - /etc/resolv.conf, n) + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/resolv.conf, n) endif - -# ----------------------------------------------------------------------------- -ifdef PTXCONF_ROOTFS_ETC_MODULES -# /etc/modules - @$(call install_copy, rootfs, 0, 0, 0644, $(PTXDIST_WORKSPACE)/projectroot/etc/modules, /etc/modules, n) +ifdef PTXCONF_ROOTFS_SERVICES + @$(call install_alternative, rootfs, 0, 0, 0644, /etc/services, n) endif -# ----------------------------------------------------------------------------- -ifdef PTXCONF_ROOTFS_UDHCPC - -ifdef PTXCONF_ROOTFS_GENERIC_UDHCPC - @$(call install_copy, rootfs, 0, 0, 0754, \ - $(PTXDIST_TOPDIR)/generic/etc/udhcpc.script, \ - /etc/udhcpc.script, n) -endif - -ifdef PTXCONF_ROOTFS_USER_UDHCPC - @$(call install_copy, rootfs, 0, 0, 0754, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/udhcpc.script, \ - /etc/udhcpc.script, n) -endif - -# udhcp expects the script to be called /usr/share/udhcpc/default.script, -# so we make a link - @$(call install_link, rootfs, /etc/udhcpc.script, \ - /usr/share/udhcpc/default.script) - -endif -# ----------------------------------------------------------------------------- -ifdef PTXCONF_ROOTFS_USER_CROND_CONF - @$(call install_copy, rootfs, 0, 0, 0755, /etc/cron) - @$(call install_copy, rootfs, 0, 0, 0755, /var/spool/cron/crontabs/) - - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/crond/root, \ - /var/spool/cron/crontabs/root, n) - - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/crond/daily, \ - /etc/cron/daily, n) -endif - -# ----------------------------------------------------------------------------- -# This part creates /etc/inetd.conf and /etc/services on demand -# ----------------------------------------------------------------------------- - -# create /etc/services if urshd is enabled without inetd -# -ifdef PTXCONF_URSHD -ifndef PTXCONF_ROOTFS_INETD - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/services.urshd_only, \ - /etc/services, n ) -endif -endif - -# -# Normal procedure when inetd is enabled -# -ifdef PTXCONF_ROOTFS_INETD -# /etc/inetd.conf -ifdef PTXCONF_ROOTFS_GENERIC_INETD - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/inetd.conf, \ - /etc/inetd.conf, n ) - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/services, \ - /etc/services, n ) -endif -ifdef PTXCONF_ROOTFS_USER_INETD - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/inetd.conf, \ - /etc/inetd.conf, n ) - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/services, \ - /etc/services, n ) -endif - -# -# Replace all markers if service is enabled -# or delete markers if service is disabled -# ----------------------------------------------------------------------------- -# add rshd if enabled -# -ifdef PTXCONF_INETUTILS_RSHD - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @RSHD@, "shell stream tcp nowait root /usr/sbin/rshd" ) - @$(call install_replace, rootfs, /etc/services, \ - @RSHD@, "shell 514/tcp cmd" ) -else - @$(call install_replace, rootfs, /etc/inetd.conf, @RSHD@, ) - @$(call install_replace, rootfs, /etc/services, @RSHD@, ) -endif - -# ----------------------------------------------------------------------------- -# add NTP if enabled -# -ifdef PTXCONF_INETUTILS_NTP -# FIXME: Whats needed to start ntpd with inted? - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @NTP@, "" ) - @$(call install_replace, rootfs, /etc/services, \ - @NTP@, \ - "ntp 123/tcp\nntp 123/udp" ) -else - @$(call install_replace, rootfs, /etc/inetd.conf, @NTP@, ) - @$(call install_replace, rootfs, /etc/services, @NTP@, ) -endif - -# ----------------------------------------------------------------------------- -# add cvs if enabled -# -ifdef PTXCONF_CVS_INETD_SERVER -ifneq ($(PTXCONF_CVS_INETD_STRING),"") -# add user defined string to start the cvs server into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @CVSD@, $(PTXCONF_CVS_INETD_STRING) ) -else -# add default string to start the cvs server into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @CVSD@, \ - "cvspserver stream tcp nowait root /usr/bin/cvs cvsd -f @ROOT@ pserver" ) -endif -ifneq ($(PTXCONF_CVS_SERVER_REPOSITORY),"") -# add info about repository's root - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @ROOT@, \ - "--allow-root=$(PTXCONF_CVS_SERVER_REPOSITORY)" ) -else -# use cvs' default if not otherwise specified - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @ROOT@, ) -endif -# add cvs service - @$(call install_replace, rootfs, \ - /etc/services, \ - @CVSD@, \ - "cvspserver 2401/tcp\ncvspserver 2401/udp") -else -# remove all cvs entries if this service is not enabled - @$(call install_replace, rootfs, /etc/inetd.conf, @CVSD@, ) - @$(call install_replace, rootfs, /etc/services, @CVSD@, ) -endif - -# ----------------------------------------------------------------------------- -# add rsync if enabled -# -ifdef PTXCONF_RSYNC_INETD_SERVER -ifneq ($(PTXCONF_RSYNC_INETD_STRING),"") -# add user defined string to start rsync server into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @RSYNCD@, $(PTXCONF_RSYNC_INETD_STRING) ) -else -# add default string to start the rsync server into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @RSYNCD@, \ - "rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon @CONFIG@" ) -endif -ifneq ($(PTXCONF_RSYNC_CONFIG_FILE),"") -# add path and name of config file - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @CONFIG@, "--config=$(PTXCONF_RSYNC_CONFIG_FILE)" ) -else -# use rpath' default if not otherwise specified - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @CONFIG@, ) -endif -# add rsync service - @$(call install_replace, rootfs, \ - /etc/services, \ - @RSYNCD@, \ - "rsync 873/tcp\nrsync 873/udp" ) -else -# remove all cvs entries if this service is not enabled - @$(call install_replace, rootfs, /etc/inetd.conf, @RSYNCD@, ) - @$(call install_replace, rootfs, /etc/services, @RSYNCD@, ) -endif - -# ----------------------------------------------------------------------------- -# add famd if enabled -# -ifdef PTXCONF_FAM_INETD_SERVER -ifneq ($(PTXCONF_FAM_INETD_STRING),"") -# add user defined string to start famd server into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @FAMD@, $(PTXCONF_FAM_INETD_STRING) ) -else -# add default string to start the rsync server into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @FAMD@, \ - "sgi_fam/1-2 stream rpc/tcp wait root /usr/sbin/famd famd -c /etc/fam.conf" ) -endif -else -# remove all famd entries if this service is not enabled - @$(call install_replace, rootfs, /etc/inetd.conf, @FAMD@, ) -endif - -# ----------------------------------------------------------------------------- -# add telnetd if enabled -# -ifdef PTXCONF_BUSYBOX_TELNETD -ifdef PTXCONF_BUSYBOX_FEATURE_TELNETD_STANDALONE -# remove all telnetd entries if this service is not enabled - @$(call install_replace, rootfs, /etc/inetd.conf, @TELNETD@, ) - @$(call install_replace, rootfs, /etc/services, @TELNETD@, ) -else -# for busybox only! -# add default string to start the telnetd from busybox into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @TELNETD@, \ - "telnet stream tcp nowait root /usr/sbin/telnetd telnetd" ) - - @$(call install_replace, rootfs, \ - /etc/services, \ - @TELNETD@, \ - "telnet 23/tcp\ntelnet 23/udp" ) -endif -else - @$(call install_replace, rootfs, /etc/inetd.conf, @TELNETD@, ) - @$(call install_replace, rootfs, /etc/services, @TELNETD@, ) -endif - -# ----------------------------------------------------------------------------- -# add portmap if enabled -# -ifdef PTXCONF_PORTMAP_INETD_SERVER -ifneq ($(PTXCONF_PORTMAP_INETD_STRING),"") - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @PORTMAPD@, $(PTXCONF_PORTMAP_INETD_STRING) ) -else -# add default string to start the portmap into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @PORTMAPD@, \ - "sunrpc stream tcp nowait root /sbin/portmap portmap" ) -endif - @$(call install_replace, rootfs, \ - /etc/services, \ - @PORTMAPD@, \ - "sunrpc 111/tcp\nsunrpc 111/udp" ) -else -# remove all portmapd entries if this service is not enabled - @$(call install_replace, rootfs, /etc/inetd.conf, @PORTMAPD@, ) - @$(call install_replace, rootfs, /etc/services, @PORTMAPD@, ) - -endif - -# ----------------------------------------------------------------------------- -# add dnsmasq if enabled -# -ifdef PTXCONF_DNSMASQ_INETD_SERVER -ifneq ($(PTXCONF_DNSMASQ_INETD_STRING),"") - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @DNSD@, \ - $(PTXCONF_DNSMASQ_INETD_STRING) ) -else -# add default string to start the dnsmasq into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @DNSD@, \ - "domain stream tcp nowait root /sbin/dnsmasq domain" ) -endif -# add dns service - @$(call install_replace, rootfs, \ - /etc/services, \ - @DNSD@, \ - "domain 53/tcp\ndomain 53/udp" ) -else -# remove all dnsmasq entries if this service is not enabled - @$(call install_replace, rootfs, /etc/inetd.conf, @DNSD@, ) - @$(call install_replace, rootfs, /etc/services, @DNSD@, ) -endif -# ----------------------------------------------------------------------------- -# add tftpd if enabled -# -ifdef PTXCONF_INETUTILS_TFTPD -ifneq ($(PTXCONF_INETUTILS_TFTPD_STRING),"") - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @TFTPD@, \ - $(PTXCONF_INETUTILS_TFTPD_STRING) ) -else -# add default string to start the tftpd into inetd.conf - @$(call install_replace, rootfs, /etc/inetd.conf, \ - @TFTPD@, \ - "tftp dgram udp wait nobody /sbin/tftpd tftpd -l @ROOT@" ) -endif -# replace the base dir on demand -ifneq ($(PTXCONF_INETUTILS_TFTPD_BASE_DIR),"") - @$(call install_replace, rootfs, \ - /etc/inetd.conf, \ - @ROOT@, \ - $(PTXCONF_INETUTILS_TFTPD_BASE_DIR) ) -endif -# add tftp service - @$(call install_replace, rootfs, \ - /etc/services, \ - @TFTPD@, \ - "tftp 69/udp" ) -else -# remove all tftp entries if this service is not enabled - @$(call install_replace, rootfs, /etc/inetd.conf, @TFTPD@, ) - @$(call install_replace, rootfs, /etc/services, @TFTPD@, ) -endif -endif -# ----------------------------------------------------------------------------- @$(call install_finish, rootfs) @$(call touch, $@) diff --git a/rules/rootfs_configfiles.in b/rules/rootfs_configfiles.in index f743769c1..e69de29bb 100644 --- a/rules/rootfs_configfiles.in +++ b/rules/rootfs_configfiles.in @@ -1,520 +0,0 @@ -## SECTION=rootfs - -# ---------------------------------------------------------------------------- -menu "config files " -# ---------------------------------------------------------------------------- - -# -# /etc/passwd -# -menuconfig ROOTFS_PASSWD - depends on ROOTFS - bool - prompt "/etc/passwd " - default y - help - Installs a /etc/passwd file from a selectable source. - - choice - prompt "Kind of /etc/passwd" - depends on ROOTFS_PASSWD - default ROOTFS_GENERIC_PASSWD - - config ROOTFS_GENERIC_PASSWD - bool - prompt "Use generic" - help - Installs a generic /etc/passwd file. This file does - not offer any security, the root login is without a - password. So don't use it in a network environment - which is available to the outside. - See /generic/passwd - - config ROOTFS_USER_PASSWD - bool - prompt "User defined" - help - This uses a user defined passwd. PTXdist uses file - projectroot/etc/passwd in your local project - endchoice - -# -# /etc/shadow, /etc/shadow- -# -menuconfig ROOTFS_SHADOW - depends on ROOTFS - bool - prompt "/etc/shadow, /etc/shadow- " - default y - help - Installs a /etc/shadow and /etc/shadow- file from a selectable source. - - choice - prompt "Kind of /etc/shadow|shadow-" - depends on ROOTFS_SHADOW - default ROOTFS_GENERIC_SHADOW - - config ROOTFS_GENERIC_SHADOW - bool - prompt "Use generic" - help - Installs a generic /etc/shadow and /etc/shadow- file. - See /generic/etc/shadow|shadow- - - config ROOTFS_USER_SHADOW - bool - prompt "User defined" - help - This uses a user defined shadow|shadow-. PTXdist uses - files projectroot/etc/shadow|shadow- in your local - project - endchoice - -# -# /etc/group, /etc/gshadow -# -menuconfig ROOTFS_GROUP - depends on ROOTFS - bool - prompt "/etc/group, /etc/gshadow " - default y - help - Installs a /etc/group and /etc/gshadow file from a selectable source. - - choice - prompt "Kind of /etc/group|gshadow" - depends on ROOTFS_GROUP - default ROOTFS_GENERIC_GROUP - - config ROOTFS_GENERIC_GROUP - bool - prompt "Use generic" - help - Installs a generic /etc/group and /etc/gshadow file. - See /generic/group|gshadow - - config ROOTFS_USER_GROUP - bool - prompt "User defined" - help - This uses a user defined group|gshadow. PTXdist uses files - projectroot/etc/group|gshadow in your local project - endchoice - -# -# /etc/fstab -# -menuconfig ROOTFS_FSTAB - depends on ROOTFS - bool - prompt "/etc/fstab " - default y - help - Installs a /etc/fstab file from a selectable source. - - choice - prompt "Kind of /etc/fstab" - depends on ROOTFS_FSTAB - default ROOTFS_GENERIC_FSTAB - - config ROOTFS_GENERIC_FSTAB - bool - prompt "Use generic" - help - This uses a generic fstab for this project. See - /generic/fstab - - config ROOTFS_USER_FSTAB - bool - prompt "User defined" - help - This uses a user defined fstab. PTXdist uses file - projectroot/etc/fstab in your local project - endchoice - -# -# /etc/mtab -# -menuconfig ROOTFS_MTAB - depends on ROOTFS - bool - prompt "/etc/mtab " - default y - help - Installs a /etc/mtab file from a selectable source. - - choice - prompt "Kind of /etc/mtab" - depends on ROOTFS_MTAB - default ROOTFS_GENERIC_MTAB - - config ROOTFS_GENERIC_MTAB - bool - prompt "Use link" - help - Installs a link to /proc/mounts as /etc/mtab. Some tools - like those from the e2fs-tools suite need this file to - function properly. However, it is a good idea to keep this - file around, since a real /etc/mtab would have to be - read-write to be accurate, which is not a good idea in - embedded environments with ro-mounted rootfs. - - config ROOTFS_USER_MTAB - bool - prompt "User defined" - help - This uses a user defined fstab. PTXdist uses file - projectroot/etc/mtab in your local project - endchoice - -# -# /etc/hostname -# -menuconfig ROOTFS_HOSTNAME - depends on ROOTFS - bool - prompt "/etc/hostname " - default y - help - Installs a generic /etc/hostname file. - - choice - prompt "Kind of /etc/hostname" - depends on ROOTFS_HOSTNAME - default ROOTFS_GENERIC_HOSTNAME - - config ROOTFS_GENERIC_HOSTNAME - bool - prompt "Use generic" - help - Installs a generic /etc/hostname file. - See /generic/hostname - - config ROOTFS_USER_HOSTNAME - bool - prompt "User defined" - help - This uses a user defined /etc/hostname. PTXdist uses - file projectroot/etc/hostname in your local project - - endchoice - - config ROOTFS_ETC_HOSTNAME - depends on ROOTFS_HOSTNAME - depends on ROOTFS_GENERIC_HOSTNAME - string - default ptx - prompt "set hostname in /etc/hostname" - -# -# /etc/hosts -# -menuconfig ROOTFS_HOSTS - depends on ROOTFS - bool - prompt "/etc/hosts " - default y - help - Installs a /etc/hosts file from a selectable source. - - choice - prompt "Kind of /etc/hosts" - depends on ROOTFS_HOSTS - default ROOTFS_GENERIC_HOSTS - - config ROOTFS_GENERIC_HOSTS - bool - prompt "Use generic" - help - Installs a generic /etc/hosts file. - See /generic/hosts - - config ROOTFS_USER_HOSTS - bool - prompt "User defined" - help - This uses a user defined /etc/hosts. PTXdist uses file - projectroot/etc/hosts in your local project - - endchoice - -# -# /etc/inittab -# -menuconfig ROOTFS_INITTAB - depends on ROOTFS - select BUSYBOX_GETTY if BUSYBOX - bool - prompt "/etc/inittab " - default y - help - Installs a /etc/inittab file from a selectable source. - - choice - prompt "Kind of /etc/inittab" - depends on ROOTFS_INITTAB - default ROOTFS_GENERIC_INITTAB - - config ROOTFS_GENERIC_INITTAB - bool - prompt "Use generic" - help - Installs a generic /etc/inittab file. - See /generic/inittab - - config ROOTFS_USER_INITTAB - bool - prompt "User defined" - help - This uses a user defined /etc/inittab. PTXdist uses file - projectroot/etc/inittab in your local project. - Note: The placeholders @SPEED@ and @CONSOLE@ will be - replaced before installing with the values below. - See /generic/inittab how to use them. - endchoice - -# -# /etc/nsswitch -# -menuconfig ROOTFS_NSSWITCH - depends on ROOTFS - bool - prompt "/etc/nsswitch.conf " - default y - help - Installs a /etc/nsswitch.conf file from a selectable source. - - choice - prompt "Kind of /etc/nsswitch.conf" - depends on ROOTFS_NSSWITCH - default ROOTFS_GENERIC_NSSWITCH - - config ROOTFS_GENERIC_NSSWITCH - bool - prompt "Use generic" - help - Installs a generic /etc/nsswitch.conf file. See - /generic/nsswitch.conf. - Note: This file only supports local name resolution. It - does not use any DNS service, so it makes no sense to - use a /etc/resolv.conf if this generic file is in use. - - config ROOTFS_USER_NSSWITCH - bool - prompt "User defined" - help - This uses a user defined /etc/nsswitch.conf. PTXdist - uses file projectroot/etc/nsswitch.conf in your local - project. Refer "man nsswitch.conf" how to create a - specific file to achive your requirements. - endchoice - -# -# /etc/resolv.conf -# This file makes only sense when: -# - dns is activated in nsswitch.conf (our generic one does not so) -# - the network DNS is known -# -config ROOTFS_RESOLV - depends on ROOTFS - depends on ROOTFS_USER_NSSWITCH - bool - prompt "project's /etc/resolv.conf" - help - Installs a /etc/resolv.conf file from projectroot/etc/resolv.conf in - your local project. Refer "man resolv.conf" how to create a specific - file to achive your requirements. - -# -# /etc/profile -# -menuconfig ROOTFS_PROFILE - depends on ROOTFS - bool - prompt "/etc/profile " - default y - help - Installs a generic /etc/profile file. - - choice - prompt "Kind of /etc/profile" - depends on ROOTFS_PROFILE - default ROOTFS_GENERIC_PROFILE - - config ROOTFS_GENERIC_PROFILE - bool - prompt "Use generic" - help - Installs a generic /etc/profile file. - See /generic/profile - - config ROOTFS_USER_PROFILE - bool - prompt "User defined" - help - This uses a user defined /etc/profile. PTXdist - uses file projectroot/etc/profile in your local - project. - - endchoice - -# -# /etc/protocols -# -menuconfig ROOTFS_PROTOCOLS - depends on ROOTFS - bool - prompt "/etc/protocols " - default y - help - Installs a /etc/protocols file from a selectable source. - - choice - prompt "Kind of /etc/protocols" - depends on ROOTFS_PROTOCOLS - default ROOTFS_GENERIC_PROTOCOLS - - config ROOTFS_GENERIC_PROTOCOLS - bool - prompt "Use generic" - help - Install a generic /etc/protocols file. See - /generic/protocols. - Note: This will provide only the required - entries. If you need a full blown protocols, - use your own. - - config ROOTFS_USER_PROTOCOLS - bool - prompt "User defined" - help - This uses a user defined /etc/protocols. PTXdist - uses file projectroot/etc/protocols in your local - project. - - endchoice - -# -# /etc/inetd.conf -# -menuconfig ROOTFS_INETD - depends on ROOTFS - depends on BUSYBOX_INETD || INETUTILS_INETD - bool - prompt "/etc/inetd.conf " - default y - help - Installs a /etc/inetd.conf file from a selectable source. - - choice - prompt "Kind of /etc/inetd.conf" - depends on ROOTFS_INETD - default ROOTFS_GENERIC_INETD - - config ROOTFS_GENERIC_INETD - bool - prompt "Use generic" - help - Install a generic /etc/inetd.conf file. See - /generic/inetd.conf. But there are - mostly placeholders in. It depends on the selections - you made, what placeholders expand to a valid value. - Not selected tools expand their placeholder to empty - space. - - config ROOTFS_USER_INETD - bool - prompt "User defined" - help - This uses a user defined /etc/inetd.conf. PTXdist - uses file projectroot/etc/inetd.conf in your local - project. You can also use the placeholders from the - generic part if you like. - - endchoice - -# -# /etc/modules -# -config ROOTFS_ETC_MODULES - depends on ROOTFS - depends on ROOTFS_ETC_INITD_MODULES - bool - prompt "project's /etc/modules" - help - Installs a /etc/modules file from projectroot/etc/modules in - your local project. - -# -# /etc/udhcpc.script -# specific to BusyBox' udhcp-client -# -menuconfig ROOTFS_UDHCPC - depends on ROOTFS - depends on BUSYBOX_APP_UDHCPC - select BUSYBOX_IFCONFIG - bool - prompt "/etc/udhcpc.script " - default y - help - Installs a /etc/udhcpc.script file from a selectable source. - You have checked BusyBox' udhcpc feature. It accepts the -s file or - --script=file option. So this /etc/udhcpc.script will be run at dhcp - events. - If your network supports DNS, this script will generate /etc/resolv.conf. - To use this feature, you also need a user defined /etc/nsswitch.conf - file that enables DNS for name resolution. The generic one shipped - with PTXdist does not so. - - choice - prompt "Kind of /etc/udhcpc.script" - depends on ROOTFS_UDHCPC - default ROOTFS_GENERIC_UDHCPC - - config ROOTFS_GENERIC_UDHCPC - bool - prompt "Use generic" - help - Install a generic /etc/udhcpc.script file. See - /generic/etc/udhcpc.script. - - config ROOTFS_USER_UDHCPC - bool - prompt "User defined" - help - This uses a user defined /etc/udhcpc.script. PTXdist - uses file projectroot/etc/udhcpc.script in your local - project. - - endchoice - -# -# for BusyBox' crond only -# /var/spool/cron/crontabs/ -# /etc/crond.conf -# -config ROOTFS_USER_CROND_CONF - depends on ROOTFS - depends on ROOTFS_ETC_INITD_CROND - bool - prompt "project's crond configuration" - help - Install /var/spool/cron/crontabs/root from projectroot/crond/root and - /etc/cron/daily from projectroot/crond/daily - -# -# for BusyBox' http only -# install users httpd.conf -# -config ROOTFS_BUSYBOX_USER_HTTPD_CONF - depends on ROOTFS - depends on BUSYBOX_HTTPD - bool - prompt "project's httpd.conf configuration" - help - Install /etc/httpd.conf from projectroot/etc/httpd.conf - Note: This is for the busysbox based httpd only! - -# ---------------------------------------------------------------------------- - -endmenu diff --git a/rules/rootfs_init_d_files.in b/rules/rootfs_init_d_files.in index 6acc135c1..e69de29bb 100644 --- a/rules/rootfs_init_d_files.in +++ b/rules/rootfs_init_d_files.in @@ -1,310 +0,0 @@ -## SECTION=rootfs - -# ---------------------------------------------------------------------------- -menu "start scripts (/etc/init.d) " -# ---------------------------------------------------------------------------- - -config ROOTFS_ETC_INITD - depends on ROOTFS - bool - prompt "Generic Scripts for /etc/init.d" - default y - select BUSYBOX_RUN_PARTS if BUSYBOX - help - When enabled, this option copies the files from - ${PTXDIST_TOPDIR}/generic/etc/init.d to the target root - filesystem. The files contain useful defaults for most projects, - so if you don't intend to use your completely self-made etc - directory you should problably switch this on. - -########################## rcS startup control ############################ - -menuconfig ROOTFS_ETC_INITD_RCS - bool - prompt "rcS " - depends on ROOTFS_ETC_INITD - default y - select BUSYBOX_HOSTNAME if BUSYBOX - help - The /etc/init.d/rcS script is started by init in /etc/inittab. - Its main purpose is to run the other init scripts by calling - run-parts. - The generic rcS script needs a '/bin/sh' shell and the commands - 'mount', 'grep' and 'hostname'. - - choice - prompt "Kind of rcS script" - default ROOTFS_ETC_INITD_RCS_DEFAULT - depends on ROOTFS_ETC_INITD_RCS - - config ROOTFS_ETC_INITD_RCS_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/rcS startup script. - See /generic/etc/init.d/rcS - - config ROOTFS_ETC_INITD_RCS_USER - bool - prompt "User defined" - help - This installs a user defined rcS startup script. - PTXdist uses the file projectroot/etc/init.d/rcS in - your local project - endchoice - -########################## inetd for BusyBox ############################ - -# initd startscript is for busysbox only -config ROOTFS_ETC_INITD_INETD - depends on ROOTFS_ETC_INITD - depends on BUSYBOX_INETD - bool - prompt "inetd" - help - When enabled, this option installs the generic /etc/init.d/inetd - file. This script starts your internet super server (inetd). - This is for BusyBox' inetd only. - -config ROOTFS_ETC_INITD_LOGROTATE - bool - prompt "minimal logrotate" - depends on ROOTFS_ETC_INITD - help - The /etc/init.d/logrotate script is a minimal logrotator. - -config ROOTFS_ETC_INITD_MODULES - depends on ROOTFS_ETC_INITD - bool - prompt "modules" - help - When enabled, load all modules in /etc/modules. This requires - one type of the tool "grep" (from BusyBox or paket procps) - -menuconfig ROOTFS_ETC_INITD_NETWORKING - depends on ROOTFS_ETC_INITD - bool - default y - prompt "networking " - select BUSYBOX_IFUPDOWN if BUSYBOX - select BUSYBOX_IFCONFIG if BUSYBOX - select BUSYBOX_CAT if BUSYBOX - select BUSYBOX_FEATURE_IFUPDOWN_IP if BUSYBOX - help - When enabled, this option installs the generic - /etc/init.d/networking file. This script starts - your network interfaces by calling ifup -a - To run this script you will need the shell commands - 'cat', 'grep' and 'ifconfig' - - config ROOTFS_ETC_INITD_NETWORKING_INTERFACES - depends on ROOTFS_ETC_INITD - depends on ROOTFS_ETC_INITD_NETWORKING - string - prompt "/etc/network/interfaces file" - default "${PTXDIST_WORKSPACE}/projectroot/etc/network/interfaces" - help - Copy this file to /etc/network/interfaces. - -########################## Telnetd from Busysbox ############################ - -menuconfig ROOTFS_ETC_INITD_TELNETD - depends on ROOTFS_ETC_INITD - depends on BUSYBOX_TELNETD - depends on BUSYBOX_FEATURE_TELNETD_STANDALONE - bool - default y - prompt "telnetd " - help - The /etc/init.d/telnetd script starts up your busybox based telnetd - daemon. Depending on your configuration utelnetd or telnetd - is started. - - choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_TELNETD_DEFAULT - depends on ROOTFS_ETC_INITD - depends on ROOTFS_ETC_INITD_TELNETD - - config ROOTFS_ETC_INITD_TELNETD_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/telnetd startup script. - See /generic/etc/init.d/telnetd - - config ROOTFS_ETC_INITD_TELNETD_USER - bool - prompt "User defined" - help - This uses a user defined telnetd startup script. - PTXdist uses file projectroot/etc/init.d/telnetd in - your local project - endchoice - -######################## syslogd/klogd from Busysbox ########################## - -menuconfig ROOTFS_ETC_INITD_SYSLOGD_KLOGD - depends on ROOTFS_ETC_INITD - depends on BUSYBOX_SYSLOGD - bool - prompt "syslogd " - help - The /etc/init.d/syslogd script starts up your busybox based - syslogd/klogd daemon. Depending on your configuration also klogd will - be started. - - choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_SYSLOGD_KLOGD_DEFAULT - depends on ROOTFS_ETC_INITD - depends on ROOTFS_ETC_INITD_SYSLOGD_KLOGD - - config ROOTFS_ETC_INITD_SYSLOGD_KLOGD_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/syslogd startup script. - See /generic/etc/init.d/syslogd - - config ROOTFS_ETC_INITD_SYSLOGD_KLOGD_USER - bool - prompt "User defined" - help - This uses a user defined syslogd startup script. - PTXdist uses file projectroot/etc/init.d/syslogd in - your local project - endchoice - -######################## hwclock from Busysbox ########################## - -menuconfig ROOTFS_ETC_INITD_HWCLOCK - depends on ROOTFS_ETC_INITD - depends on BUSYBOX_HWCLOCK - bool - prompt "timekeeper " - help - The /etc/init.d/timekeeper script syncs the target with an internal - real time clock at startup - - choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_HWCLOCK_DEFAULT - depends on ROOTFS_ETC_INITD - depends on ROOTFS_ETC_INITD_HWCLOCK - - config ROOTFS_ETC_INITD_HWCLOCK_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/timekeeper script. - See /generic/etc/init.d/timekeeper - - config ROOTFS_ETC_INITD_HWCLOCK_USER - bool - prompt "User defined" - help - This uses a user defined timekeeper script. - PTXdist uses file projectroot/etc/init.d/timepeeper in - your local project - endchoice - -########################## User startup script ############################## - -config ROOTFS_ETC_INITD_STARTUP - depends on ROOTFS_ETC_INITD - bool - prompt "startup" - help - This script runs /home/startup if it exists and is - executable - -########################## Banner ########################################## - -menuconfig ROOTFS_ETC_INITD_BANNER - depends on ROOTFS_ETC_INITD - select FIGLET - bool - default y - prompt "banner " - help - This Option adds a specific vendor string to - the script which displays a nifty ptxdist - _ - | |__ __ _ _ __ _ __ ___ _ __ - | '_ \ / _` | '_ \| '_ \ / _ \ '__| - | |_) | (_| | | | | | | | __/ | - |_.__/ \__,_|_| |_|_| |_|\___|_| - page with the hostname and other stuff at - startup. - - config ROOTFS_ETC_VENDOR - depends on ROOTFS_ETC_INITD_BANNER - string - prompt "vendorname in /etc/init.d/banner" - help - Type in here your favorite vendorname. It gets displayed - whenever your system starts. - - choice - prompt "Kind of banner script" - depends on ROOTFS_ETC_INITD_BANNER - default ROOTFS_ETC_INITD_BANNER_DEFAULT - - config ROOTFS_ETC_INITD_BANNER_DEFAULT - bool - prompt "Use generic" - help - A file from generic/etc/init.d/banner will be used. - - config ROOTFS_ETC_INITD_BANNER_USER - bool - prompt "User defined" - help - This uses a user defined banner script. - PTXdist uses file projectroot/etc/init.d/banner of - your local project - endchoice - - -########################## crond ########################################## -# this is for BusyBox' crond only -# -menuconfig ROOTFS_ETC_INITD_CROND - depends on ROOTFS_ETC_INITD && BUSYBOX_CROND - bool - default y - prompt "crond " - help - The /etc/init.d/crond script lets you control BusyBox' crond daemon. - - choice - prompt "Kind of startup scrict" - depends on ROOTFS_ETC_INITD_CROND - default ROOTFS_ETC_INITD_CROND_DEFAULT - - config ROOTFS_ETC_INITD_CROND_DEFAULT - bool - prompt "Use generic" - help - A file from generic/etc/init.d/crond will be used. - - config ROOTFS_ETC_INITD_CROND_USER - bool - prompt "User defined" - help - This uses a user defined crond startup script. - PTXdist uses file projectroot/etc/init.d/crond in - your local project - endchoice - -# ---------------------------------------------------------------------------- - -config ROOTFS_ETC_INITD_SRAMDISK - bool - depends on ROOTFS_ETC_INITD - prompt "sramdisk " - help - Start script for SRAM ramdisk. - -endmenu diff --git a/rules/rootfs_rc_d_links.in b/rules/rootfs_rc_d_links.in deleted file mode 100644 index fa1f844bf..000000000 --- a/rules/rootfs_rc_d_links.in +++ /dev/null @@ -1,309 +0,0 @@ -## SECTION=rootfs - -# ---------------------------------------------------------------------------- -menu "startscript links (/etc/rc.d) " -# ---------------------------------------------------------------------------- - -config ROOTFS_ETC_INITD_UDEV_LINK - depends on ROOTFS_ETC_INITD_UDEV - string - prompt "udev link name" - default "S00_udev" - help - Set a link to with this name in /etc/rc.d which points to - /etc/init.d/udev. Keep this entry empty if you do not want to start - this service automatically. - -config ROOTFS_ETC_INITD_MODULES_LINK - depends on ROOTFS_ETC_INITD_MODULES - string - prompt "modules link name" - default "S01_modules" - help - Set a link to with this name in /etc/rc.d which points to - /etc/init.d/modules. Keep this entry empty if you do not want to start - this service automatically. - -config ROOTFS_ETC_INITD_NETWORKING_LINK - depends on ROOTFS_ETC_INITD_NETWORKING - string - prompt "network link name" - default "S02_networking" - help - Set a link to with this name in /etc/rc.d which points to - /etc/init.d/networking. Keep this entry empty if you do not want to - start this service automatically. - -config ROOTFS_ETC_INITD_ALSA_UTILS_LINK - depends on ALSA_UTILS - string - prompt "alsa-utils link name" - default "S02_alsa-utils" - help - Set a link to with this name in /etc/rc.d which points to - /etc/init.d/alsa-utils. Keep this entry empty if you do not want to - start this service automatically. - -config ROOTFS_ETC_INITD_BANNER_LINK - depends on ROOTFS_ETC_INITD_BANNER - string - prompt "banner link name" - default "S03_banner" - help - Set a link to with this name in /etc/rc.d which points to - /etc/init.d/banner. Keep this entry empty if you do not want to start - this service automatically. - -config ROOTFS_ETC_INITD_SRAMDISK_LINK - depends on ROOTFS_ETC_INITD_SRAMDISK - string - prompt "sramdisk link name" - default "S05_sramdisk" - help - Set a link to with this name in /etc/rc.d which points to - /etc/init.d/sramdisk. Keep this entry empty if you do not want to start - this service automatically. - -config ROOTFS_ETC_INITD_CHRONY_LINK - depends on ROOTFS_ETC_INITD_CHRONY_DEFAULT || ROOTFS_ETC_INITD_CHRONY_USER - string - prompt "chrony link name" - default "S03_chrony" - help - Set a link into /etc/rc.d which points to /etc/init.d/chrony to - start chronyd ntp client/server when system starts. Keep this - entry empty if you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_NFS_LINK - depends on ROOTFS_ETC_INITD_NFS_DEFAULT || ROOTFS_ETC_INITD_NFS_USER - string - prompt "nfsd link name" - default "S06_nfsd" - help - Set a link into /etc/rc.d which points to /etc/init.d/nfsd to - start nfs server when system starts. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_TELNETD_LINK - depends on ROOTFS_ETC_INITD_TELNETD || ROOTFS_ETC_INITD_UTELNETD - string - prompt "telnetd link name" - default "S07_telnetd" - help - Set a link to with this name in /etc/rc.d which points to - /etc/init.d/telnetd. Keep this entry empty if you do not want to start - this service automatically. - -config ROOTFS_ETC_INITD_SYSLOGNG_LINK - depends on ROOTFS_ETC_INITD_SYSLOGNG_STARTSCRIPT - string - prompt "syslog-ng link name" - default "S08_syslog-ng" - help - Set a link into /etc/rc.d which points to /etc/init.d/syslog-ng to - start the syslog-ng daemon when system boots. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_HTTPD_LINK - depends on ROOTFS_ETC_INITD_HTTPD - string - prompt "apache link name" - default "S08_httpd" - help - Set a link into /etc/rc.d which points to /etc/init.d/httpd to - start apache when system boots. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_DROPBEAR_LINK - depends on ROOTFS_ETC_INITD_DROPBEAR - string - prompt "dropbear link name" - default "S08_dropbear" - help - Set a link into /etc/rc.d which points to /etc/init.d/dropbear to - start dropbear when system boots. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_OPENSSH_LINK - depends on ROOTFS_ETC_INITD_OPENSSH - string - prompt "openssh link name" - default "S08_openssh" - help - Set a link into /etc/rc.d which points to /etc/init.d/openssh to - start openssh when system boots. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_PUREFTPD_LINK - depends on ROOTFS_ETC_INITD_PUREFTPD - string - prompt "pureftpd link name" - default "S09_pureftpd" - help - Set a link into /etc/rc.d which points to /etc/init.d/pure-ftpd to - start pure ftp daemon when system starts. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_SAMBA_LINK - depends on ROOTFS_ETC_INITD_SAMBA - string - prompt "samba link name" - default "S10_samba" - help - Set a link into /etc/rc.d which points to /etc/init.d/samba to - start the samba server. - -config ROOTFS_ETC_INITD_THTTPD_LINK - depends on THTTPD - string - prompt "thttpd link name" - default "S10_thttpd" - help - Set a link into /etc/rc.d which points to /etc/init.d/thttpd to - start thin http daemon when system starts. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_LIGHTTPD_LINK - depends on LIGHTTPD - string - prompt "lighttpd link name" - default "S10_lighttpd" - help - Set a link into /etc/rc.d which points to /etc/init.d/lighttpd to - start thin http daemon when system starts. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_DNSMASQ_LINK - depends on DNSMASQ_STARTUP_TYPE_STANDALONE - string - prompt "dnsmasq link name" - default "S10_dnsmasq" - help - Set a link into /etc/rc.d which points to /etc/init.d/dnsmasq to - start dnsmasq as a standalone service when system starts. Keep this - entry empty if you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_PORTMAP_LINK - depends on PORTMAP_STARTUP_TYPE_STANDALONE - string - prompt "portmap link name" - default "S11_portmapd" - help - Set a link into /etc/rc.d which points to /etc/init.d/portmapd to - start portmap as a standalone service when system starts. Keep this - entry empty if you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_INETD_LINK - depends on ROOTFS_ETC_INITD_INETD || INETUTILS_ETC_INITD_INETD - string - prompt "inted link name" - default "S11_inetd" - help - Set a link to with this name in /etc/rc.d which points to - /etc/init.d/inetd. Keep this entry empty if you do not want to start - this service automatically. - -config ROOTFS_ETC_INITD_CVS_LINK - depends on CVS_STARTUP_TYPE_STANDALONE - string - prompt "cvs link name" - default "S13_cvs" - help - Set a link into /etc/rc.d which points to /etc/init.d/cvs to - start cvs as a standalone service when system starts. Keep this entry - empty if you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_RSYNC_LINK - depends on RSYNC_STARTUP_TYPE_STANDALONE - string - prompt "rsync link name" - default "S14_rsync" - help - Set a link into /etc/rc.d which points to /etc/init.d/rsync to - start rsync as a standalone service when system starts. Keep this - entry empty if you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_RSYNC3_LINK - depends on RSYNC3_STARTUP_TYPE_STANDALONE - string - prompt "rsync3 link name" - default "S14_rsync" - help - Set a link into /etc/rc.d which points to /etc/init.d/rsync to - start rsync as a standalone service when system starts. Keep this - entry empty if you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_FAM_LINK - depends on FAM_STARTUP_TYPE_STANDALONE - string - prompt "fam link name" - default "S15_famd" - help - Set a link into /etc/rc.d which points to /etc/init.d/famd to - start fam as a standalone service when system starts. Keep this entry - empty if you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_SYSLOGD_KLOGD_LINK - depends on ROOTFS_ETC_INITD_SYSLOGD_KLOGD - string - prompt "syslogd link name" - default "S16_syslogd" - help - Set a link into /etc/rc.d which points to /etc/init.d/syslogd to - start syslogd/klogd when system starts. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_CROND_LINK - depends on ROOTFS_ETC_INITD_CROND - string - prompt "crond link name" - default "S17_crond" - help - Set a link into /etc/rc.d which points to /etc/init.d/crond to - start crond when system starts. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_DBUS_LINK - depends on DBUS_INSTALL_STARTUP_SCRIPT - string - prompt "dbus link name" - default "S18_dbus" - help - Set a link into /etc/rc.d which points to /etc/init.d/dbus to - start dbus when system starts. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_NTPCLIENT_LINK - depends on ROOTFS_ETC_INITD_NTPCLIENT_DEFAULT || ROOTFS_ETC_INITD_NTPCLIENT_USER - string - prompt "ntpclient link name" - default "S19_ntpclient" - help - Set a link into /etc/rc.d which points to /etc/init.d/ntpclient to - start ntpclientd when system starts. Keep this entry empty if - you do not want to start this service automatically. - -config ROOTFS_ETC_INITD_TIMEKEEPER_LINK - depends on ROOTFS_ETC_INITD_HWCLOCK - string - prompt "timekeeper link name" - default "S20_timekeeper" - help - Set a link into /etc/rc.d which points to /etc/init.d/timekeerper to - sync the system with an internal real time clock when it starts up. - Keep this entry empty if you want to sync manually. - -config ROOTFS_ETC_INITD_STARTUP_LINK - depends on ROOTFS_ETC_INITD_STARTUP - string - prompt "startup link name" - default "S21_startup" - help - Set a link into /etc/rc.d which points to /etc/init.d/startup to - allow a user to start his own application in /home/startup when - the system starts up. - Keep this entry empty if you don't want it to be done automatically. - -# ---------------------------------------------------------------------------- - -endmenu diff --git a/rules/rsync.in b/rules/rsync.in index e55949789..a2513d294 100644 --- a/rules/rsync.in +++ b/rules/rsync.in @@ -81,29 +81,10 @@ choice endchoice -choice - prompt "Kind of startup script" - depends on RSYNC_STARTUP_TYPE_STANDALONE - default ROOTFS_ETC_INITD_RSYNC_DEFAULT - - config ROOTFS_ETC_INITD_RSYNC_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/rsyncd startup script. - See /generic/etc/init.d/rsyncd - - config ROOTFS_ETC_INITD_RSYNC_USER - bool - prompt "User defined" - help - This uses a user defined rsync startup script. PTXdist - uses files projectroot/etc/init.d/rsyncd in your local - project. You should use "@CONFIG@" in your script. - This gets replaced by "--config=" and the path to the config - file given above. - -endchoice +config RSYNC_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/rsync" config RSYNC_INETD_STRING string diff --git a/rules/rsync.make b/rules/rsync.make index 4256ac583..bed18b73f 100644 --- a/rules/rsync.make +++ b/rules/rsync.make @@ -77,7 +77,7 @@ endif $(STATEDIR)/rsync.targetinstall: @$(call targetinfo) - @$(call install_init, rsync) + @$(call install_init, rsync) @$(call install_fixup, rsync,PACKAGE,rsync) @$(call install_fixup, rsync,PRIORITY,optional) @$(call install_fixup, rsync,VERSION,$(RSYNC_VERSION)) @@ -90,68 +90,30 @@ $(STATEDIR)/rsync.targetinstall: $(RSYNC_DIR)/rsync, \ /usr/bin/rsync) -ifdef PTXCONF_RSYNC_CONFIG_FILE_DEFAULT -ifneq ($(call remove_quotes,$(PTXCONF_RSYNC_CONFIG_FILE)),) - @$(call install_copy, rsync, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/rsyncd.conf, \ - $(call remove_quotes,$(PTXCONF_RSYNC_CONFIG_FILE)), n ) -else -# use default - @$(call install_copy, rsync, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/rsyncd.conf, \ - /etc/rsyncd.conf, n) -endif - @$(call install_copy, rsync, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/rsyncd.secrets, \ - /etc/rsyncd.secrets, n) -endif - -ifdef PTXCONF_RSYNC_CONFIG_FILE_USER -ifneq ($(call remove_quotes,$(PTXCONF_RSYNC_CONFIG_FILE)),) - @$(call install_copy, rsync, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/rsyncd.conf, \ - $(call remove_quotes,$(PTXCONF_RSYNC_CONFIG_FILE)), n ) -else -# use as default - @$(call install_copy, rsync, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/rsyncd.conf, \ - /etc/rsyncd.conf, n) -endif - @$(call install_copy, rsync, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/rsyncd.secrets, \ - /etc/rsyncd.secrets, n) -endif + @$(call install_alternative, rsync, 0, 0, 0644, /etc/rsyncd.conf, n) + @$(call install_alternative, rsync, 0, 0, 0644, /etc/rsyncd.secrets, n) ifdef PTXCONF_RSYNC_STARTUP_TYPE_STANDALONE -# provide everything for standalone mode -ifdef PTXCONF_ROOTFS_ETC_INITD_RSYNC_DEFAULT -# install generic one - @$(call install_copy, rsync, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/rsyncd, \ - /etc/init.d/rsyncd, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_RSYNC_USER -# install users one - @$(call install_copy, rsync, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/rsyncd, \ - /etc/init.d/rsyncd, n) -endif -# replace the @CONFIG@ with path and name of the configfile -ifneq ($(PTXCONF_RSYNC_CONFIG_FILE),"") +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_RSYNC_STARTSCRIPT + @$(call install_alternative, rsync, 0, 0, 0755, /etc/init.d/rsyncd, n) @$(call install_replace, rsync, /etc/init.d/rsyncd, \ @CONFIG@, \ "--config=$(PTXCONF_RSYNC_CONFIG_FILE)" ) endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_RSYNC_LINK),"") - @$(call install_copy, rsync, 0, 0, 0755, /etc/rc.d) - @$(call install_link, rsync, ../init.d/rsyncd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_RSYNC_LINK), n) endif endif + # + # /etc/inetd.conf sniplet + # + +ifdef PTXCONF_RSYNC_INETD_SERVER + @$(call install_alternative, rsync, 0, 0, 0644, /etc/inetd.conf.d/rsync, n) + @$(call install_replace, rsync, /etc/inetd.conf.d/rsync, \ + @CONFIG@, "--config=$(PTXCONF_RSYNC_CONFIG_FILE)" ) +endif + @$(call install_finish, rsync) @$(call touch) diff --git a/rules/rsync3.in b/rules/rsync3.in index 743d9aded..ec22f3cfa 100644 --- a/rules/rsync3.in +++ b/rules/rsync3.in @@ -24,95 +24,9 @@ config RSYNC3_LARGE_FILE help Support for large files -config RSYNC3_CONFIG_FILE - string - default "/etc/rsyncd.conf" - prompt "Configuration file at runtime" - help - Set configuration file for rsync server to given path on your target - -comment "runtime options ---" - -choice - -prompt "Kind of rsyncd.conf/rsyncd.secrets file" -default RSYNC3_CONFIG_FILE_DEFAULT - -config RSYNC3_CONFIG_FILE_DEFAULT +config RSYNC3_STARTSCRIPT bool - prompt "Use generic" - help - The files from generic/etc/rsyncd.conf|rsyncd.secrets will be used. - Its a very good idea to start with this default files and save a - customised version into your project, because the generic files are - really useless. You can use your own version if you select - "User defined" here. - -config RSYNC3_CONFIG_FILE_USER - bool - prompt "User defined" - help - The files from /projectroot/etc/rsyncd.conf|rsyncd.secrets - will be used. - -endchoice - -choice - prompt "Kind of startup" - default RSYNC3_INETD_SERVER - - config RSYNC3_INETD_SERVER - bool - prompt "inetd driven" - help - This installs a startup configuration for rsync from inetd. It adds to - the /etc/inetd.conf a line like this: - rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon @CONFIG@ - Note: You must enable one of the two possible inet daemons: There is - one embedded in busybox and one in packet inetutils. - - config RSYNC3_STARTUP_TYPE_STANDALONE - bool - prompt "standalone" - help - This installs rsync startup script /etc/init.d/rsyncd. With this - script the rsync server will be started at system startup and - waits for connections - -endchoice - -choice - prompt "Kind of startup script" - depends on RSYNC3_STARTUP_TYPE_STANDALONE - default ROOTFS_ETC_INITD_RSYNC3_DEFAULT - - config ROOTFS_ETC_INITD_RSYNC3_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/rsyncd startup script. - See /generic/etc/init.d/rsyncd - - config ROOTFS_ETC_INITD_RSYNC3_USER - bool - prompt "User defined" - help - This uses a user defined rsync startup script. PTXdist - uses files projectroot/etc/init.d/rsyncd in your local - project. You should use "@CONFIG@" in your script. - This gets replaced by "--config=" and the path to the config - file given above. - -endchoice - -config RSYNC3_INETD_STRING - string - depends on RSYNC3_INETD_SERVER - prompt "inetd service entry" - default "rsync stream tcp nowait root /usr/bin/rsync rsyncd --daemon @CONFIG@" - help - This string is added to inetd's configuration /etc/inetd.conf. @CONFIG@ - in this string will be replaced with the --config option, and the - path given above for configuration + default y + prompt "install /etc/init.d/rsync" endif diff --git a/rules/rsync3.make b/rules/rsync3.make index 4d122ad73..9ff821f0d 100644 --- a/rules/rsync3.make +++ b/rules/rsync3.make @@ -72,7 +72,7 @@ endif $(STATEDIR)/rsync3.targetinstall: @$(call targetinfo) - @$(call install_init, rsync3) + @$(call install_init, rsync3) @$(call install_fixup, rsync3,PACKAGE,rsync3) @$(call install_fixup, rsync3,PRIORITY,optional) @$(call install_fixup, rsync3,VERSION,$(RSYNC3_VERSION)) @@ -85,68 +85,18 @@ $(STATEDIR)/rsync3.targetinstall: $(RSYNC3_DIR)/rsync, \ /usr/bin/rsync) -ifdef PTXCONF_RSYNC3_CONFIG_FILE_DEFAULT -ifneq ($(call remove_quotes,$(PTXCONF_RSYNC3_CONFIG_FILE)),) - @$(call install_copy, rsync3, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/rsyncd.conf, \ - $(PTXCONF_RSYNC3_CONFIG_FILE), n) -else -# use default - @$(call install_copy, rsync3, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/rsyncd.conf, \ - /etc/rsyncd.conf, n) -endif - @$(call install_copy, rsync3, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/rsyncd.secrets, \ - /etc/rsyncd.secrets, n) -endif + @$(call install_alternative, rsync3, 0, 0, 0644, /etc/rsyncd.conf, n) + @$(call install_alternative, rsync3, 0, 0, 0644, /etc/rsyncd.secrets, n) -ifdef PTXCONF_RSYNC3_CONFIG_FILE_USER -ifneq ($(call remove_quotes,$(PTXCONF_RSYNC3_CONFIG_FILE)),) - @$(call install_copy, rsync3, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/rsyncd.conf, \ - $(PTXCONF_RSYNC3_CONFIG_FILE), n) -else -# use as default - @$(call install_copy, rsync3, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/rsyncd.conf, \ - /etc/rsyncd.conf, n) -endif - @$(call install_copy, rsync3, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/rsyncd.secrets, \ - /etc/rsyncd.secrets, n) -endif + # + # busybox init + # -ifdef PTXCONF_RSYNC3_STARTUP_TYPE_STANDALONE -# provide everything for standalone mode -ifdef PTXCONF_ROOTFS_ETC_INITD_RSYNC3_DEFAULT -# install generic one - @$(call install_copy, rsync3, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/rsyncd, \ - /etc/init.d/rsyncd, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_RSYNC3_USER -# install users one - @$(call install_copy, rsync3, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/rsyncd, \ - /etc/init.d/rsyncd, n) -endif -# replace the @CONFIG@ with path and name of the configfile -ifneq ($(PTXCONF_RSYNC3_CONFIG_FILE),"") - @$(call install_replace, rsync3, /etc/init.d/rsyncd, \ - @CONFIG@, \ - "--config=$(PTXCONF_RSYNC3_CONFIG_FILE)" ) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_RSYNC3_STARTSCRIPT + @$(call install_alternative, rsync3, 0, 0, 0755, /etc/init.d/rsyncd, n) endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_RSYNC3_LINK),) - @$(call install_copy, rsync3, 0, 0, 0755, /etc/rc.d) - @$(call install_link, rsync3, ../init.d/rsyncd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_RSYNC3_LINK), n) endif -endif - @$(call install_finish, rsync3) @$(call touch) diff --git a/rules/samba.in b/rules/samba.in index 0df2a41ae..22ada7c7d 100644 --- a/rules/samba.in +++ b/rules/samba.in @@ -132,31 +132,6 @@ if SAMBA have to enable this. If you say n here. The samba server will generates his own secrets.tdb after initialisation. - config ROOTFS_ETC_INITD_SAMBA - bool - depends on SAMBA_SERVER - select BUSYBOX_START_STOP_DAEMON if BUSYBOX - default y - choice - prompt "Kind of samba start script" - depends on SAMBA - depends on SAMBA_SERVER - default ROOTFS_ETC_INITD_SAMBA_DEFAULT - - config ROOTFS_ETC_INITD_SAMBA_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/samba file. - - config ROOTFS_ETC_INITD_SAMBA_USER - bool - prompt "User defined" - help - This uses a user defined init file. Will use - the file out of projectroot/etc/init.d/samba - endchoice - config SAMBA_CLIENT bool select SAMBA_COMMON @@ -185,4 +160,9 @@ if SAMBA help Turn on CUPS support + config SAMBA_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/samba" + endif diff --git a/rules/samba.make b/rules/samba.make index 51de6724b..a626d41b4 100644 --- a/rules/samba.make +++ b/rules/samba.make @@ -150,21 +150,15 @@ ifdef PTXCONF_ROOTFS_ETC_SAMBA_SECRETS_USER $(PTXDIST_WORKSPACE)/projectroot/etc/samba/secrets.tdb,\ /etc/samba/secrets.tdb, n) endif -ifdef PTXCONF_ROOTFS_ETC_INITD_SAMBA_DEFAULT - @$(call install_copy, rootfs, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/samba, \ - /etc/init.d/samba, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_SAMBA_USER - @$(call install_copy, rootfs, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/samba,\ - /etc/init.d/samba, n) -endif -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_SAMBA_LINK),"") - @$(call install_copy, samba, 0, 0, 0755, /etc/rc.d) - @$(call install_link, samba, ../init.d/samba, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_SAMBA_LINK)) + # + # busybox init + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_SAMBA_STARTSCRIPT + @$(call install_alternative, samba, 0, 0, 0755, /etc/init.d/samba, n) +endif endif ifdef PTXCONF_SAMBA_CLIENT diff --git a/rules/syslogng.in b/rules/syslogng.in index cc219b8c3..5a11f073e 100644 --- a/rules/syslogng.in +++ b/rules/syslogng.in @@ -85,33 +85,9 @@ config ROOTFS_ETC_SYSLOGNG_CONFIG endchoice -config ROOTFS_ETC_INITD_SYSLOGNG_STARTSCRIPT +config SYSLOGNG_STARTSCRIPT bool default y - prompt "Install startup script" - help - The /etc/init.d/syslog-ng script lets you control the syslog-ng daemon. - - choice - prompt "Kind of startup script" - depends on ROOTFS_ETC_INITD_SYSLOGNG_STARTSCRIPT - default ROOTFS_ETC_INITD_SYSLOGNG_DEFAULT - - config ROOTFS_ETC_INITD_SYSLOGNG_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/syslog-ng startup script. - See /generic/etc/init.d/syslog-ng - - config ROOTFS_ETC_INITD_SYSLOGNG_USER - bool - prompt "User defined" - help - This uses a user defined syslog-ng startup script. PTXdist - uses file projectroot/etc/init.d/syslog-ng in your local - project - - endchoice + prompt "install /etc/init.d/syslog-ng" endif diff --git a/rules/syslogng.make b/rules/syslogng.make index 7c8e9218f..f4074b1c1 100644 --- a/rules/syslogng.make +++ b/rules/syslogng.make @@ -85,47 +85,22 @@ $(STATEDIR)/syslogng.targetinstall: @$(call install_fixup, syslogng,DEPENDS,) @$(call install_fixup, syslogng,DESCRIPTION,missing) + # binary @$(call install_copy, syslogng, 0, 0, 0755, \ $(SYSLOGNG_DIR)/src/syslog-ng, /sbin/syslog-ng) -ifdef PTXCONF_ROOTFS_ETC_INITD_SYSLOGNG_STARTSCRIPT -ifdef PTXCONF_ROOTFS_ETC_INITD_SYSLOGNG_DEFAULT -# install the generic one - @$(call install_copy, syslogng, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/syslog-ng, \ - /etc/init.d/syslog-ng, n) -endif -ifdef PTXCONF_ROOTFS_ETC_INITD_SYSLOGNG_USER -# install users one - @$(call install_copy, syslogng, 0, 0, 0755, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/syslog-ng, \ - /etc/init.d/syslog-ng, n) -endif -# -# FIXME: Is this packet the right location for the link? -# -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_SYSLOGNG_LINK),"") - @$(call install_copy, syslogng, 0, 0, 0755, /etc/rc.d) - @$(call install_link, syslogng, ../init.d/syslog-ng, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_SYSLOGNG_LINK)) -endif -endif + # config + @$(call install_alternative, syslogng, 0, 0, 0644, /etc/syslog-ng.conf, n) -ifdef PTXCONF_ROOTFS_ETC_SYSLOGNG_CONFIG -ifdef PTXCONF_ROOTFS_ETC_SYSLOGNG_CONFIG_DEFAULT -# install the generic one - @$(call install_copy, syslogng, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/syslog-ng.conf, \ - /etc/syslog-ng.conf, n) -endif -ifdef PTXCONF_ROOTFS_ETC_SYSLOGNG_CONFIG_USER -# install users one - @$(call install_copy, syslogng, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/syslog-ng.conf, \ - /etc/syslog-ng.conf, n) + # + # bb init: start scripts + # + +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_SYSLOGNG + @$(call install_alternative, syslogng, 0, 0, 0755, /etc/init.d/syslog-ng, n) endif endif - @$(call install_finish, syslogng) @$(call touch) diff --git a/rules/thttpd.in b/rules/thttpd.in index b00abfc59..669c470e9 100644 --- a/rules/thttpd.in +++ b/rules/thttpd.in @@ -17,35 +17,6 @@ menuconfig THTTPD if THTTPD -choice - prompt "Kind of startup script" - default THTTPD__ETC_INITD_GENERIC - depends on THTTPD - help - The /etc/init.d/thttpd script lets you control the thttpd daemon. - - config THTTPD__ETC_INITD_NONE - bool - prompt "no init.d script" - - config THTTPD__ETC_INITD_GENERIC - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/thttpd startup - script. The file from - /generic/etc/init.d/thttpd - will be used. - - config THTTPD__ETC_INITD_USER - bool - prompt "User defined" - help - This uses a user defined thttpd. PTXdist uses - file projectroot/etc/init.d/thttpd in your - local project -endchoice - config THTTPD__GENERIC_SITE depends on THTTPD bool @@ -61,4 +32,10 @@ config THTTPD__INSTALL_HTPASSWD help Install the mkpasswd tool. It can create and manage .htpasswd file for authentication of users. + +config THTTPD_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/thttpd" + endif diff --git a/rules/thttpd.make b/rules/thttpd.make index 1070f130c..f23b5fa21 100644 --- a/rules/thttpd.make +++ b/rules/thttpd.make @@ -60,7 +60,7 @@ $(STATEDIR)/thttpd.install: $(STATEDIR)/thttpd.targetinstall: @$(call targetinfo) - @$(call install_init, thttpd) + @$(call install_init, thttpd) @$(call install_fixup, thttpd,PACKAGE,thttpd) @$(call install_fixup, thttpd,PRIORITY,optional) @$(call install_fixup, thttpd,VERSION,$(THTTPD_VERSION)) @@ -72,22 +72,10 @@ $(STATEDIR)/thttpd.targetinstall: @$(call install_copy, thttpd, 0, 0, 0755, $(THTTPD_DIR)/thttpd, \ /usr/sbin/thttpd) -ifdef PTXCONF_THTTPD__ETC_INITD_GENERIC - @$(call install_copy, thttpd, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/thttpd, \ - /etc/init.d/thttpd, n) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_THTTPD_STARTSCRIPT + @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/thttpd, n) endif - -ifdef PTXCONF_THTTPD__ETC_INITD_USER - @$(call install_copy, thttpd, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/thttpd, \ - /etc/init.d/thttpd, n) -endif - -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_THTTPD_LINK),"") - @$(call install_copy, thttpd, 0, 0, 0755, /etc/rc.d) - @$(call install_link, thttpd, ../init.d/thttpd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_THTTPD_LINK)) endif ifdef PTXCONF_THTTPD__GENERIC_SITE diff --git a/rules/udev.in b/rules/udev.in index 635f20db0..58db64298 100644 --- a/rules/udev.in +++ b/rules/udev.in @@ -134,15 +134,6 @@ menu "install options " help FIXME - config UDEV__RC_D_LINK - string - prompt "link name in /etc/rc.d" - default "S00_udev" - help - Enter the name of the udev start link in /etc/init.d; this should - be something like "S00_udev". An empty string means that no link - is created. - config UDEV__ETC_CONF bool default y @@ -179,6 +170,11 @@ menu "install options " help Install libudev.so on the target. + config UDEV_STARTSCRIPT + bool + default y + prompt "install /etc/init.d/udev" + endmenu endif diff --git a/rules/udev.make b/rules/udev.make index 54c22c7fc..21a1e0173 100644 --- a/rules/udev.make +++ b/rules/udev.make @@ -131,14 +131,11 @@ endif # # startup script # +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_UDEV_STARTSCRIPT @$(call install_alternative, udev, 0, 0, 0755, /etc/init.d/udev) - -ifneq ($(PTXCONF_UDEV__RC_D_LINK),"") - @$(call install_copy, udev, 0, 0, 0755, /etc/rc.d) - @$(call install_link, udev, ../init.d/udev, \ - /etc/rc.d/$(PTXCONF_UDEV__RC_D_LINK)) endif - +endif # # Install a configuration on demand only diff --git a/rules/urshd.in b/rules/urshd.in index 797947308..7627d7194 100644 --- a/rules/urshd.in +++ b/rules/urshd.in @@ -26,13 +26,4 @@ config URSHD_STARSCRIPT /etc/init.d. If no local 'projectroot/etc/init.d/urshd' exists, a generic start script will be used. -config URSHD_RC_D_LINK - string - prompt "link name in /etc/rc.d" - default "S12_urshd" - help - Enter the name of the urshd start link in /etc/init.d; this should - be something like "S12_urshd". An empty string means that no link - is created. - endif diff --git a/rules/urshd.make b/rules/urshd.make index 22e89bfb2..a5afc835c 100644 --- a/rules/urshd.make +++ b/rules/urshd.make @@ -66,15 +66,11 @@ $(STATEDIR)/urshd.targetinstall: $(URSHD_DIR)/src/urshd, \ /usr/sbin/urshd) +ifdef PTXCONF_INITMETHOD_BBINIT ifdef PTXCONF_URSHD_STARSCRIPT @$(call install_copy, urshd, 0, 0, 0755, /etc/init.d) @$(call install_alternative, urshd, 0, 0, 0755, /etc/init.d/urshd) endif - -ifneq ($(PTXCONF_URSHD_RC_D_LINK),"") - @$(call install_copy, urshd, 0, 0, 0755, /etc/rc.d) - @$(call install_link, urshd, ../init.d/urshd, \ - /etc/rc.d/$(PTXCONF_URSHD_RC_D_LINK)) endif @$(call install_finish, urshd) diff --git a/rules/utelnetd.in b/rules/utelnetd.in index 39ab4c5a9..02e2f1edc 100644 --- a/rules/utelnetd.in +++ b/rules/utelnetd.in @@ -6,36 +6,11 @@ menuconfig UTELNETD help utelnet is a very small telnetd implementation. -comment "runtime options ---" - depends on UTELNETD +if UTELNETD -config ROOTFS_ETC_INITD_UTELNETD - depends on UTELNETD +config UTELNETD_STARTSCRIPT bool default y - prompt "Install startup script" - help - The /etc/init.d/telnetd script lets you control the telnetd daemon. - - choice - prompt "Kind of startup script" - default ROOTFS_ETC_INITD_UTELNETD_DEFAULT - depends on ROOTFS_ETC_INITD_UTELNETD - - config ROOTFS_ETC_INITD_UTELNETD_DEFAULT - bool - prompt "Use generic" - help - Installs a generic /etc/init.d/telnetd startup script. - See /generic/etc/init.d/telnetd - - config ROOTFS_ETC_INITD_UTELNETD_USER - bool - prompt "User defined" - help - This uses a user defined telnetd startup script. PTXdist - uses files projectroot/etc/init.d/utelnetd in your local - project. Note the leading 'u' in utelnetd! But it will - be copied to /etc/init.d/telnetd without 'u'! + prompt "install /etc/init.d/utelnetd" - endchoice +endif diff --git a/rules/utelnetd.make b/rules/utelnetd.make index b8a394e8f..d5b62bfb9 100644 --- a/rules/utelnetd.make +++ b/rules/utelnetd.make @@ -68,31 +68,19 @@ $(STATEDIR)/utelnetd.targetinstall: @$(call install_fixup, utelnetd,DEPENDS,) @$(call install_fixup, utelnetd,DESCRIPTION,missing) -# -# Install the startup script on request only -# -ifdef PTXCONF_ROOTFS_ETC_INITD_UTELNETD_DEFAULT -# install the generic one @$(call install_copy, utelnetd, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/etc/init.d/telnetd, \ - /etc/init.d/telnetd, n) -endif + $(UTELNETD_DIR)/utelnetd, \ + /sbin/utelnetd) -ifdef PTXCONF_ROOTFS_ETC_INITD_UTELNETD_USER -# install users one - @$(call install_copy, utelnetd, 0, 0, 0755, \ - ${PTXDIST_WORKSPACE}/projectroot/etc/init.d/utelnetd, \ - /etc/init.d/telnetd, n) -endif + # + # busybox init + # -ifneq ($(PTXCONF_ROOTFS_ETC_INITD_TELNETD_LINK),"") - @$(call install_copy, utelnetd, 0, 0, 0755, /etc/rc.d) - @$(call install_link, utelnetd, ../init.d/telnetd, \ - /etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_TELNETD_LINK)) +ifdef PTXCONF_INITMETHOD_BBINIT +ifdef PTXCONF_UTELNETD_STARTSCRIPT + @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/telnetd, n) +endif endif - - @$(call install_copy, utelnetd, 0, 0, 0755, $(UTELNETD_DIR)/utelnetd, \ - /sbin/utelnetd) @$(call install_finish, utelnetd) -- cgit v1.2.3