summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorJuergen Beisert <j.beisert@pengutronix.de>2006-11-19 16:10:41 +0000
committerJuergen Beisert <j.beisert@pengutronix.de>2006-11-19 16:10:41 +0000
commit7319d00ceae2e4c52f8a608015ec47901addb165 (patch)
treef913a9acd4eea3d046abb4f25bbc741f5d20d35b /rules
parent4b16d7bb6a682e71524798abc16818ef81660592 (diff)
downloadptxdist-7319d00ceae2e4c52f8a608015ec47901addb165.tar.gz
ptxdist-7319d00ceae2e4c52f8a608015ec47901addb165.tar.xz
adding start script and configuration to nfs service
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6350 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules')
-rw-r--r--rules/nfsutils.in40
-rw-r--r--rules/nfsutils.make54
-rw-r--r--rules/rootfs_rc_d_links.in13
3 files changed, 99 insertions, 8 deletions
diff --git a/rules/nfsutils.in b/rules/nfsutils.in
index ac01a791c..0eec208c7 100644
--- a/rules/nfsutils.in
+++ b/rules/nfsutils.in
@@ -14,7 +14,7 @@ config NFSUTILS_SECURE_STATD
config NFSUTILS_RQUOTAD
bool
prompt "Enable rquotad"
- depends on NFSUTILS
+ depends on NFSUTILS
config NFSUTILS_WITH_TCPWRAPPERS
bool
@@ -96,3 +96,41 @@ config NFSUTILS_INSTALL_STATD
bool
prompt "Install /sbin/statd"
depends on NFSUTILS
+
+# -----
+
+comment "runtime options"
+ depends on NFSUTILS
+
+choice
+ prompt "Kind of startup script"
+ default ROOTFS_ETC_INITD_NFS_DEFAULT
+ depends on NFSUTILS
+
+ config ROOTFS_ETC_INITD_NFS_DEFAULT
+ bool
+ prompt "Use generic"
+ help
+ Installs a generic /etc/init.d/nfsd startup script.
+ See <ptxdist-install>/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_INSTALL_USER_EXPORTS
+ depends on NFSUTILS
+ default n
+ bool
+ prompt "Install user's /etc/exports"
+ help
+ This installs a user defined /etc/exports. PTXdist
+ uses files projectroot/etc/exports in your local
+ project
+
diff --git a/rules/nfsutils.make b/rules/nfsutils.make
index 9a36c6676..3e8d2f3b2 100644
--- a/rules/nfsutils.make
+++ b/rules/nfsutils.make
@@ -2,7 +2,7 @@
# $Id: template 5709 2006-06-09 13:55:00Z mkl $
#
# Copyright (C) 2003-2006 by Pengutronix e.K., Hildesheim, Germany
-#
+#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
@@ -155,23 +155,33 @@ $(STATEDIR)/nfsutils.targetinstall: $(nfsutils_targetinstall_deps_default)
#endif
ifdef PTXCONF_NFSUTILS_INSTALL_EXPORTFS
- @$(call install_copy, nfsutils, 0, 0, 0755, $(NFSUTILS_DIR)/utils/exportfs/exportfs, /usr/sbin/exportfs)
+ @$(call install_copy, nfsutils, 0, 0, 0755, \
+ $(NFSUTILS_DIR)/utils/exportfs/exportfs, \
+ /usr/sbin/exportfs)
endif
ifdef PTXCONF_NFSUTILS_INSTALL_LOCKD
- @$(call install_copy, nfsutils, 0, 0, 0755, $(NFSUTILS_DIR)/utils/lockd/lockd, /sbin/rpc.lockd)
+ @$(call install_copy, nfsutils, 0, 0, 0755, \
+ $(NFSUTILS_DIR)/utils/lockd/lockd, \
+ /sbin/rpc.lockd)
endif
ifdef PTXCONF_NFSUTILS_INSTALL_MOUNTD
- @$(call install_copy, nfsutils, 0, 0, 0755, $(NFSUTILS_DIR)/utils/mountd/mountd, /usr/sbin/mountd)
+ @$(call install_copy, nfsutils, 0, 0, 0755, \
+ $(NFSUTILS_DIR)/utils/mountd/mountd, \
+ /usr/sbin/mountd)
endif
ifdef PTXCONF_NFSUTILS_INSTALL_NFSD
- @$(call install_copy, nfsutils, 0, 0, 0755, $(NFSUTILS_DIR)/utils/nfsd/nfsd, /usr/sbin/rpc.nfsd)
+ @$(call install_copy, nfsutils, 0, 0, 0755, \
+ $(NFSUTILS_DIR)/utils/nfsd/nfsd, \
+ /usr/sbin/rpc.nfsd)
endif
ifdef PTXCONF_NFSUTILS_INSTALL_NFSSTAT
- @$(call install_copy, nfsutils, 0, 0, 0755, $(NFSUTILS_DIR)/utils/nfsstat/nfsstat, /usr/sbin/nfsstat)
+ @$(call install_copy, nfsutils, 0, 0, 0755, \
+ $(NFSUTILS_DIR)/utils/nfsstat/nfsstat, \
+ /usr/sbin/nfsstat)
endif
ifdef PTXCONF_NFSUTILS_INSTALL_NHFSGRAPH
@@ -195,7 +205,9 @@ ifdef PTXCONF_NFSUTILS_INSTALL_SHOWMOUNT
endif
ifdef PTXCONF_NFSUTILS_INSTALL_STATD
- @$(call install_copy, nfsutils, 0, 0, 0755, $(NFSUTILS_DIR)/utils/statd/statd, /sbin/rpc.statd)
+ @$(call install_copy, nfsutils, 0, 0, 0755, \
+ $(NFSUTILS_DIR)/utils/statd/statd,\
+ /usr/sbin/rpc.statd)
endif
mkdir -p $(NFSUTILS_DIR)/ptxdist_install_tmp
@@ -226,6 +238,34 @@ endif
@$(call install_copy, nfsutils, 65534, 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
+ @$(call install_copy, nfsutils, 0, 0, 0644, \
+ ${PTXDIST_WORKSPACE}/projectroot/etc/exports, \
+ /etc/exports, n)
+endif
+
@$(call install_finish, nfsutils)
@$(call touch, $@)
diff --git a/rules/rootfs_rc_d_links.in b/rules/rootfs_rc_d_links.in
index 6f70153d9..73d839ec0 100644
--- a/rules/rootfs_rc_d_links.in
+++ b/rules/rootfs_rc_d_links.in
@@ -217,3 +217,16 @@ config ROOTFS_ETC_INITD_CROND_LINK
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.
+
+################################ nfs #######################################
+
+config ROOTFS_ETC_INITD_NFS_LINK
+ depends on ROOTFS_ETC_INITD_NFS_DEFAULT || ROOTFS_ETC_INITD_NFS_DEFAULT
+ 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.
+