add ipv6 rpc.idmapd and various conf files for NFS

rpcbind on Fedora does not seem work for NFS4 without IPv6
master
Harald Hoyer 2009-06-08 14:50:22 +02:00
parent 6b28bb54b6
commit 169363e827
4 changed files with 29 additions and 4 deletions

View File

@ -1,10 +1,19 @@
#!/bin/sh
dracut_install rpcbind rpc.statd mount.nfs mount.nfs4 umount
dracut_install /etc/netconfig /etc/passwd /etc/services
dracut_install /etc/netconfig /etc/passwd /etc/services
dracut_install /etc/nsswitch.conf /etc/rpc /etc/protocols
dracut_install rpc.idmapd /etc/idmapd.conf
if ldd $(which rpc.idmapd) |grep -q lib64; then
LIBDIR="/lib64"
else
LIBDIR="/lib"
fi

dracut_install $(ls {/usr,}$LIBDIR/libnfsidmap*.so* 2>/dev/null )
dracut_install $(ls {/usr,}$LIBDIR/libnss*.so 2>/dev/null)
dracut_install grep

instmods nfs sunrpc
instmods nfs sunrpc ipv6
inst_hook cmdline 90 "$moddir/parse-nfsroot.sh"
inst_hook netroot 90 "$moddir/nfs-netroot.sh"
inst_hook pre-pivot 70 "$moddir/nfsroot-cleanup.sh"

View File

@ -1,6 +1,9 @@
pid=$(pidof rpc.statd)
[ -n "$pid" ] && kill $pid

pid=$(pidof rpc.idmapd)
[ -n "$pid" ] && kill $pid

pid=$(pidof rpcbind)
[ -n "$pid" ] && kill $pid


View File

@ -21,10 +21,13 @@ mount -t nfsd nfsd /proc/fs/nfsd
exportfs -r
rpc.nfsd
rpc.mountd
rpc.idmapd
exportfs -r
>/var/lib/dhcpd/dhcpd.leases
dhcpd -cf /etc/dhcpd.conf
#sh -i
# Wait forever for the VM to die
echo "Serving NFS mounts"
while sleep 60; do sleep 60; done
mount -n -o remount,ro /
poweroff -f

View File

@ -228,7 +228,7 @@ test_run() {

test_setup() {
# Make server root
dd if=/dev/zero of=server.ext2 bs=1M count=30
dd if=/dev/zero of=server.ext2 bs=1M count=60
mke2fs -F server.ext2
mkdir mnt
sudo mount -o loop server.ext2 mnt
@ -241,11 +241,21 @@ test_setup() {
/lib/terminfo/l/linux dmesg mkdir cp ping exportfs \
rpcbind modprobe rpc.nfsd rpc.mountd dhcpd showmount tcpdump \
/etc/netconfig /etc/services sleep mount
instmods nfsd sunrpc
instmods nfsd sunrpc ipv6
inst ./server-init /sbin/init
inst ./hosts /etc/hosts
inst ./exports /etc/exports
inst ./dhcpd.conf /etc/dhcpd.conf
dracut_install /etc/nsswitch.conf /etc/rpc /etc/protocols
dracut_install rpc.idmapd /etc/idmapd.conf
if ldd $(which rpc.idmapd) |grep -q lib64; then
LIBDIR="/lib64"
else
LIBDIR="/lib"
fi

dracut_install $(ls {/usr,}$LIBDIR/libnfsidmap*.so* 2>/dev/null )
dracut_install $(ls {/usr,}$LIBDIR/libnss*.so 2>/dev/null)
(
cd "$initdir";
mkdir -p dev sys proc etc var/run tmp var/lib/{dhcpd,rpcbind}