From 882acab043fad0d49b5e6e8bda776e39bcde4cee Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Wed, 17 Jun 2009 11:16:19 +0200 Subject: [PATCH] 'fixed nfs support --- lib/initcpio/install/arch_pacman | 2 +- lib/initcpio/install/arch_remote | 18 +++++--- usr/share/archboot/remote/etc/conf.d/nfs | 20 --------- .../remote/etc/conf.d/nfs-common.conf | 43 +++++++++++++++++++ .../remote/etc/conf.d/nfs-server.conf | 29 +++++++++++++ usr/share/archboot/remote/etc/exports | 19 +++++--- .../archboot/remote/etc/gssapi_mech.conf | 22 ++++++++++ usr/share/archboot/remote/etc/idmapd.conf | 14 ++++++ usr/share/archboot/remote/etc/netconfig | 20 +++++++++ 9 files changed, 154 insertions(+), 33 deletions(-) delete mode 100644 usr/share/archboot/remote/etc/conf.d/nfs create mode 100644 usr/share/archboot/remote/etc/conf.d/nfs-common.conf create mode 100644 usr/share/archboot/remote/etc/conf.d/nfs-server.conf create mode 100644 usr/share/archboot/remote/etc/gssapi_mech.conf create mode 100644 usr/share/archboot/remote/etc/idmapd.conf create mode 100644 usr/share/archboot/remote/etc/netconfig diff --git a/lib/initcpio/install/arch_pacman b/lib/initcpio/install/arch_pacman index d786cc612..421c53c74 100644 --- a/lib/initcpio/install/arch_pacman +++ b/lib/initcpio/install/arch_pacman @@ -21,7 +21,7 @@ rt2x00-rt61-fw rt2x00-rt71w-fw ndiswrapper ndiswrapper-utils \ zd1211-firmware ipw2100-fw ipw2200-fw iwlwifi-3945-ucode iwlwifi-4965-ucode iwlwifi-5000-ucode \ smbclient tdb tiacx tiacx-firmware dmraid linux-atm netcfg tiacx tiacx-firmware parted tzdata ntp \ v86d wlan-ng26-utils iw crda wireless-regdb libnl iproute2 dhclient syslinux mtools perl \ -gmp heimdal sqlite3 db dbus-core libcap fsarchiver iwlwifi-5150-ucode xz-utils" +gmp heimdal sqlite3 db dbus-core libcap fsarchiver iwlwifi-5150-ucode xz-utils librpcsecgss libtirpc" for i in $DEPENDS; do for k in $(echo /var/lib/pacman/local/$i-[0-9]*-[0-9]*); do diff --git a/lib/initcpio/install/arch_remote b/lib/initcpio/install/arch_remote index a4b42df71..c58ee6327 100644 --- a/lib/initcpio/install/arch_remote +++ b/lib/initcpio/install/arch_remote @@ -4,7 +4,7 @@ install () { MODULES=" $(checked_modules "/drivers/net/") " - BINARIES="tcpd findssl.sh scp sftp ssh-add ssh-agent ssh-copy-id ssh-keygen ssh-keyscan sshd pmap_set pmap_dump portmap xinetd telnetd rsync exportfs nfsstat rpc.idmapd rpc.mountd rpc.nfsd rpc.statd rpcdebug showmount sm-notify start-statd slogin screen" + BINARIES="tcpd findssl.sh scp sftp ssh-add ssh-agent ssh-copy-id ssh-keygen ssh-keyscan sshd pmap_set pmap_dump xinetd telnetd rsync exportfs nfsstat rpc.idmapd rpc.mountd rpc.nfsd rpc.statd rpcdebug showmount sm-notify start-statd slogin screen rpcbind rpcinfo gss_clnt_send_err gss_destroy_creds rpc.gssd rpc.svcgssd" FILES="" SCRIPT="arch_remote" add_file "/usr/share/archboot/remote/etc/hosts.allow" "/etc/hosts.allow" @@ -28,18 +28,24 @@ install () done add_file "/usr/lib/ssh/sftp-server" add_file "/usr/lib/ssh/ssh-keysign" - add_file "/etc/rc.d/portmap" + add_file "/etc/rc.d/rpcbind" add_file "/etc/rc.d/sshd" add_file "/etc/rc.d/xinetd" add_file "/etc/rc.d/rsyncd" add_dir "/var/empty" - add_file "/etc/rc.d/nfsd" - add_file "/etc/rc.d/nfslock" - add_file "/usr/share/archboot/remote/etc/conf.d/nfs" "/etc/conf.d/nfs" + add_file "/etc/rc.d/nfs-server" + add_file "/etc/rc.d/nfs-common" + add_file "/usr/share/archboot/remote/etc/conf.d/nfs-common" "/etc/conf.d/nfs-common" + add_file "/usr/share/archboot/remote/etc/conf.d/nfs-server" "/etc/conf.d/nfs-server" + add_file "/usr/share/archboot/remote/etc/gssapi_mech.conf" "/etc/gssapi_mech.conf" + add_file "/usr/share/archboot/remote/etc/idmapd.conf" "/etc/idmapd.conf" + add_file "/usr/share/archboot/remote/etc/netconfig" "/etc/netconfig" add_dir "/var/lib/nfs/sm" add_dir "/var/lib/nfs/sm.bak" add_dir "/var/lib/nfs/v4recovery" + add_dir "/var/lib/nfs/rpc_pipefs" # fix licenses + add_file "/usr/share/licenses/rpcbind/COPYING" add_file "/usr/share/licenses/xinetd/COPYRIGHT" add_file "/usr/share/licenses/libsasl/COPYING" add_file "/usr/share/licenses/libldap/LICENSE" @@ -51,4 +57,4 @@ help () cat< server -# STATD_OPTS="-p 32765 -o 32766" -> client -STATD_OPTS="" - -# Options to pass to sm-notify -# e.g. SMNOTIFY_OPTS="-p 32764" -SMNOTIFY_OPTS="" - diff --git a/usr/share/archboot/remote/etc/conf.d/nfs-common.conf b/usr/share/archboot/remote/etc/conf.d/nfs-common.conf new file mode 100644 index 000000000..a9291be40 --- /dev/null +++ b/usr/share/archboot/remote/etc/conf.d/nfs-common.conf @@ -0,0 +1,43 @@ +# Parameters to be passed to nfs-common (nfs clients & server) init script. +# + +# If you do not set values for the NEED_ options, they will be attempted +# autodetected; this should be sufficient for most people. Valid alternatives +# for the NEED_ options are "yes" and "no". + +# Do you want to start the statd daemon? It is not needed for NFSv4. +NEED_STATD= + +# Options to pass to rpc.statd. +# See rpc.statd(8) for more details. +# N.B. statd normally runs on both client and server, and run-time +# options should be specified accordingly. Specifically, the Arch +# NFS init scripts require the --no-notify flag on the server, +# but not on the client e.g. +# STATD_OPTS="--no-notify -p 32765 -o 32766" -> server +# STATD_OPTS="-p 32765 -o 32766" -> client +STATD_OPTS= + +# Options to pass to sm-notify +# e.g. SMNOTIFY_OPTS="-p 32764" +SMNOTIFY_OPTS="" + +# Do you want to start the idmapd daemon? It is only needed for NFSv4. +NEED_IDMAPD= + +# Options to pass to rpc.idmapd. +# See rpc.idmapd(8) for more details. +IDMAPD_OPTS= + +# Do you want to start the gssd daemon? It is required for Kerberos mounts. +NEED_GSSD= + +# Options to pass to rpc.gssd. +# See rpc.gssd(8) for more details. +GSSD_OPTS= + +# Where to mount rpc_pipefs filesystem; the default is "/var/lib/nfs/rpc_pipefs". +PIPEFS_MOUNTPOINT= + +# Options used to mount rpc_pipefs filesystem; the default is "defaults". +PIPEFS_MOUNTOPTS= diff --git a/usr/share/archboot/remote/etc/conf.d/nfs-server.conf b/usr/share/archboot/remote/etc/conf.d/nfs-server.conf new file mode 100644 index 000000000..bf1952d27 --- /dev/null +++ b/usr/share/archboot/remote/etc/conf.d/nfs-server.conf @@ -0,0 +1,29 @@ +# Parameters to be passed to nfs-server init script. +# + +# Options to pass to rpc.nfsd. +# See rpc.nfsd(8) for more details. +NFSD_OPTS= + +# Number of servers to start up; the default is 8 servers. +NFSD_COUNT= + +# Where to mount nfsd filesystem; the default is "/proc/fs/nfsd". +PROCNFSD_MOUNTPOINT= + +# Options used to mount nfsd filesystem; the default is "rw,nodev,noexec,nosuid". +PROCNFSD_MOUNTOPTS= + +# Options for rpc.mountd. +# If you have a port-based firewall, you might want to set up +# a fixed port here using the --port option. +# See rpc.mountd(8) for more details. +MOUNTD_OPTS="--no-nfs-version 1 --no-nfs-version 2" + +# Do you want to start the svcgssd daemon? It is only required for Kerberos +# exports. Valid alternatives are "yes" and "no"; the default is "no". +NEED_SVCGSSD= + +# Options to pass to rpc.svcgssd. +# See rpc.svcgssd(8) for more details. +SVCGSSD_OPTS= diff --git a/usr/share/archboot/remote/etc/exports b/usr/share/archboot/remote/etc/exports index c9f93c6a8..8f4aac598 100644 --- a/usr/share/archboot/remote/etc/exports +++ b/usr/share/archboot/remote/etc/exports @@ -1,8 +1,15 @@ # /etc/exports # -# See exports(5) for a description. - -# use exportfs -arv to reread -#/export 192.168.1.10(rw,no_root_squash) - - +# List of directories exported to NFS clients. See exports(5). +# Use exportfs -arv to reread. +# +# Example for NFSv2 and NFSv3: +# /srv/home hostname1(rw,sync) hostname2(ro,sync) +# +# Example for NFSv4: +# /srv/nfs4 hostname1(rw,sync,fsid=0) +# /srv/nfs4/home hostname1(rw,sync,nohide) +# Using Kerberos and integrity checking: +# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt) +# /srv/nfs4/home gss/krb5i(rw,sync,nohide) +# diff --git a/usr/share/archboot/remote/etc/gssapi_mech.conf b/usr/share/archboot/remote/etc/gssapi_mech.conf new file mode 100644 index 000000000..f71aca08e --- /dev/null +++ b/usr/share/archboot/remote/etc/gssapi_mech.conf @@ -0,0 +1,22 @@ +# Example /etc/gssapi_mech.conf file +# +# GSSAPI Mechanism Definitions +# +# This configuration file determines which GSS-API mechanisms +# the gssd code should use +# +# NOTE: +# The initiaiization function "mechglue_internal_krb5_init" +# is used for the MIT krb5 gssapi mechanism. This special +# function name indicates that an internal function should +# be used to determine the entry points for the MIT gssapi +# mechanism funtions. +# +# library initialization function +# ================================ ========================== +# The MIT K5 gssapi library, use special function for initialization. +#/usr/lib/libgssapi_krb5.so mechglue_internal_krb5_init +/usr/lib/libgssapi.so mechglue_internal_krb5_init +# +# The SPKM3 gssapi library function. Use the function spkm3_gss_initialize. +# /usr/local/gss_mechs/spkm/spkm3/libgssapi_spkm3.so spkm3_gss_initialize diff --git a/usr/share/archboot/remote/etc/idmapd.conf b/usr/share/archboot/remote/etc/idmapd.conf new file mode 100644 index 000000000..b1b23afe9 --- /dev/null +++ b/usr/share/archboot/remote/etc/idmapd.conf @@ -0,0 +1,14 @@ +[General] + +Verbosity = 0 +Pipefs-Directory = /var/lib/nfs/rpc_pipefs +Domain = localdomain + +[Mapping] + +Nobody-User = nobody +Nobody-Group = nobody + +[Translation] + +Method = nsswitch diff --git a/usr/share/archboot/remote/etc/netconfig b/usr/share/archboot/remote/etc/netconfig new file mode 100644 index 000000000..f329cf6d9 --- /dev/null +++ b/usr/share/archboot/remote/etc/netconfig @@ -0,0 +1,20 @@ +# +# The network configuration file. This file is currently only used in +# conjunction with the TI-RPC code in the libtirpc library. +# +# Entries consist of: +# +# \ +# +# +# The and fields are always empty in this +# implementation. +# +udp tpi_clts v inet udp - - +tcp tpi_cots_ord v inet tcp - - +udp6 tpi_clts v inet6 udp - - +tcp6 tpi_cots_ord v inet6 tcp - - +rawip tpi_raw - inet - - - +local tpi_cots_ord - loopback - - - +unix tpi_cots_ord - loopback - - - +