NFS test: switch the ISC dhcpd server
authorDavid Dillow <dave@thedillows.org>
Sat, 6 Jun 2009 05:13:16 +0000 (01:13 -0400)
committerDavid Dillow <dave@thedillows.org>
Sat, 6 Jun 2009 05:13:16 +0000 (01:13 -0400)
This will let us expand the number of client configs we can test

test/TEST-20-NFS/dhcpd.conf [new file with mode: 0644]
test/TEST-20-NFS/exports [new file with mode: 0644]
test/TEST-20-NFS/hosts [new file with mode: 0644]
test/TEST-20-NFS/server-init
test/TEST-20-NFS/test.sh

diff --git a/test/TEST-20-NFS/dhcpd.conf b/test/TEST-20-NFS/dhcpd.conf
new file mode 100644 (file)
index 0000000..7ee1cac
--- /dev/null
@@ -0,0 +1,23 @@
+ddns-update-style none;
+
+use-host-decl-names true;
+
+subnet 192.168.50.0 netmask 255.255.255.0 {
+       option subnet-mask      255.255.255.0;
+       option routers          192.168.50.1;
+       next-server             192.168.50.1;
+       server-identifier       192.168.50.1;
+       option domain-name-servers 192.168.50.1;
+       option domain-search "example.com";
+       option domain-name "other.com";
+
+       group {
+               # NFSv3 root=dhcp or root={/dev/,}nfs, use server-id
+               option root-path "/client";
+
+               host nfs3-1 {
+                       hardware ethernet 52:54:00:12:34:00;
+                       fixed-address 192.168.50.101;
+               }
+       }
+}
diff --git a/test/TEST-20-NFS/exports b/test/TEST-20-NFS/exports
new file mode 100644 (file)
index 0000000..0ec4f0c
--- /dev/null
@@ -0,0 +1,3 @@
+/       192.168.50.0/24(ro,fsid=0,insecure,no_subtree_check,no_root_squash)
+/client 192.168.50.0/24(ro,insecure,no_subtree_check,no_root_squash)
+
diff --git a/test/TEST-20-NFS/hosts b/test/TEST-20-NFS/hosts
new file mode 100644 (file)
index 0000000..5aca4ed
--- /dev/null
@@ -0,0 +1,6 @@
+127.0.0.1      localhost
+192.168.50.1   server
+192.168.50.100 workstation1
+192.168.50.101 workstation2
+192.168.50.102 workstation3
+192.168.50.103 workstation4
index f9c822f..397efa2 100755 (executable)
@@ -13,7 +13,8 @@ modprobe nfsd
 exportfs -r
 rpc.nfsd
 rpc.mountd
-/usr/sbin/dnsmasq
+>/var/lib/dhcpd/dhcpd.leases
+dhcpd
 #sh -i
 # Wait forever for the VM to die
 while sleep 60; do sleep 60; done
index e641edf..e120f64 100755 (executable)
@@ -71,34 +71,18 @@ test_setup() {
        . $basedir/dracut-functions
        dracut_install sh ls shutdown poweroff stty cat ps ln ip \
            /lib/terminfo/l/linux dmesg mkdir cp ping exportfs \
-           rpcbind modprobe rpc.nfsd rpc.mountd dnsmasq showmount tcpdump \
+           rpcbind modprobe rpc.nfsd rpc.mountd dhcpd showmount tcpdump \
            /etc/netconfig /etc/services sleep
        instmods nfsd sunrpc
        inst ./server-init /sbin/init
+       inst ./hosts /etc/hosts
+       inst ./exports /etc/exports
+       inst ./dhcpd.conf /etc/dhcpd.conf
        (
            cd "$initdir";
-           mkdir -p dev sys proc etc var/run tmp var/lib/{dnsmasq,rpcbind,nfs}
+           mkdir -p dev sys proc etc var/run tmp var/lib/{dhcpd,rpcbind,nfs}
            mkdir -p var/lib/nfs/v4recovery
            chmod 777 var/lib/rpcbind var/lib/nfs
-
-           cat > etc/hosts <<EOF 
-127.0.0.1                localhost
-192.168.50.1          server
-192.168.50.100        workstation1
-192.168.50.101        workstation2
-192.168.50.102        workstation3
-192.168.50.103        workstation4
-EOF
-           cat > etc/dnsmasq.conf <<EOF
-expand-hosts
-domain=test.net
-dhcp-range=192.168.50.100,192.168.50.150,168h
-dhcp-option=17,"192.168.50.1:/client"
-EOF
-            cat > etc/exports <<EOF
-/      192.168.50.0/24(ro,fsid=0,insecure,no_subtree_check,no_root_squash)
-/client        192.168.50.0/24(ro,insecure,no_subtree_check,no_root_squash)
-EOF
        )
        inst /etc/nsswitch.conf /etc/nsswitch.conf
        inst /etc/passwd /etc/passwd