diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2009-02-20 23:13:39 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2009-02-20 23:13:39 +0000 |
commit | 2e878658a02ca4651673cad2f41a57f27557d6dc (patch) | |
tree | fd1c10f972e4e7f79775a2b3c52fe907869e6032 /rules/rsync.make | |
parent | be1d99320d214120a306d659e3eacac4411b5ad3 (diff) | |
download | ptxdist-2e878658a02ca4651673cad2f41a57f27557d6dc.tar.gz ptxdist-2e878658a02ca4651673cad2f41a57f27557d6dc.tar.xz |
* 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
Diffstat (limited to 'rules/rsync.make')
-rw-r--r-- | rules/rsync.make | 70 |
1 files changed, 16 insertions, 54 deletions
diff --git a/rules/rsync.make b/rules/rsync.make index 4256ac58..bed18b73 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) |