summaryrefslogtreecommitdiffstats
path: root/rules/rootfs.make
diff options
context:
space:
mode:
authorJuergen Beisert <j.beisert@pengutronix.de>2006-10-22 20:25:56 +0000
committerJuergen Beisert <j.beisert@pengutronix.de>2006-10-22 20:25:56 +0000
commit00973e37efd0e606eac0f900f496a33221dd966d (patch)
tree2c3ce6557609ecabb24b28850d2b6e6512320843 /rules/rootfs.make
parent59d1a4c62c48491bf238b01bf3a847e1db14797d (diff)
downloadptxdist-00973e37efd0e606eac0f900f496a33221dd966d.tar.gz
ptxdist-00973e37efd0e606eac0f900f496a33221dd966d.tar.xz
make it work again
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6211 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/rootfs.make')
-rw-r--r--rules/rootfs.make104
1 files changed, 95 insertions, 9 deletions
diff --git a/rules/rootfs.make b/rules/rootfs.make
index 82c7c14aa..ae3526d43 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -214,18 +214,104 @@ endif
ifdef PTXCONF_ROOTFS_GENERIC_RESOLV
@$(call install_copy, rootfs, 0, 0, 0644, $(PTXDIST_TOPDIR)/projects-example/generic/etc/resolv.conf, /etc/resolv.conf, n)
endif
+###########################################################################################
ifdef PTXCONF_ROOTFS_GENERIC_INETD
- @$(call install_copy, rootfs, 0, 0, 0644, $(PTXDIST_TOPDIR)/projects-example/generic/etc/inetd.conf, /etc/inetd.conf, n);
- @$(call install_copy, rootfs, 0, 0, 0644, $(PTXDIST_TOPDIR)/projects-example/generic/etc/inetd.conf, /etc/services, n);
+# does the user wants a generic file?
+ $(call install_copy, rootfs, 0, 0, 0644, \
+ $(PTXDIST_TOPDIR)/projects-example/generic/etc/inetd.conf, \
+ /etc/inetd.conf, n )
+ @$(call install_copy, rootfs, 0, 0, 0644, \
+ $(PTXDIST_TOPDIR)/projects-example/generic/etc/services, \
+ /etc/services, n )
+#
+# 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: What to start ntp with inted?
+ @$(call install_replace, rootfs, /etc/inetd.conf, \
+ @NTP@, "" )
+ @$(call install_replace, rootfs, /etc/services, @NTP@, "ntp 123/tcp" )
+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@, "cvs 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")
+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" )
+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
- @if [ "$(PTXCONF_INETUTILS_RSHD)" = "y" ]; then \
- $(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@, ) \
- fi;
+#
+###########################################################################################
endif
+
ifdef PTXCONF_ROOTFS_GENERIC_SHADOW
@$(call install_copy, rootfs, 0, 0, 0640, $(PTXDIST_TOPDIR)/projects-example/generic/etc/shadow, /etc/shadow, n)
@$(call install_copy, rootfs, 0, 0, 0600, $(PTXDIST_TOPDIR)/projects-example/generic/etc/shadow-, /etc/shadow-, n)