]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
add ipv6 rpc.idmapd and various conf files for NFS
authorHarald Hoyer <harald@redhat.com>
Mon, 8 Jun 2009 12:50:22 +0000 (14:50 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 8 Jun 2009 12:50:22 +0000 (14:50 +0200)
rpcbind on Fedora does not seem work for NFS4 without IPv6

modules.d/95nfs/install
modules.d/95nfs/nfsroot-cleanup.sh
test/TEST-20-NFS/server-init
test/TEST-20-NFS/test.sh

index 218c64f4dd51860d15ed1fbf9cac55f96c3c2af7..12cc27d4a9319dc467b1ac0266ff34fb32235657 100755 (executable)
@@ -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"
index 1a5f1876bef1510e2bbaaba355b67a4925c9a33e..e3b3d17359b4c9169e42a23e9e992a4baa33aed7 100644 (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
 
index c3fa58dcb0d77ffae163401a31e57357cf2b967a..c64a1ea4e2870fb266d3cdd94b6c07490c05fab3 100755 (executable)
@@ -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
index e66d2888298de97a47257a739fd39175a9be786c..e87a14ddc872c3bf00b45b6222d47bb922c8e80f 100755 (executable)
@@ -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}