From: Philippe Seewer Date: Tue, 16 Jun 2009 08:06:21 +0000 (+0200) Subject: TEST: Add dhcpd support for debian based distros X-Git-Tag: 0.1~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45630db1a77789605c11896a1b42401ddacd550f;p=platform%2Fupstream%2Fdracut.git TEST: Add dhcpd support for debian based distros Debian based distros use dhcpd3 instead of just dhcpd. Accordingly paths to lease files etc are different as well. This patch ensures that the test-suite can run with either dhcpd or dhcpd3. --- diff --git a/test/TEST-20-NFS/server-init b/test/TEST-20-NFS/server-init index 44ee193..9921071 100755 --- a/test/TEST-20-NFS/server-init +++ b/test/TEST-20-NFS/server-init @@ -25,7 +25,8 @@ rpc.mountd rpc.idmapd exportfs -r >/var/lib/dhcpd/dhcpd.leases -dhcpd -cf /etc/dhcpd.conf +chmod 777 /var/lib/dhcpd/dhcpd.leases +dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases #sh -i # Wait forever for the VM to die echo "Serving NFS mounts" diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh index 5e64850..00bdc0d 100755 --- a/test/TEST-20-NFS/test.sh +++ b/test/TEST-20-NFS/test.sh @@ -272,11 +272,13 @@ 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 \ - modprobe rpc.nfsd rpc.mountd dhcpd showmount tcpdump \ - /etc/services sleep mount + modprobe rpc.nfsd rpc.mountd showmount tcpdump \ + /etc/services sleep mount chmod which portmap >/dev/null 2>&1 && dracut_install portmap which rpcbind >/dev/null 2>&1 && dracut_install rpcbind [ -f /etc/netconfig ] && dracut_install /etc/netconfig + which dhcpd >/dev/null 2>&1 && dracut_install dhcpd + [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd instmods nfsd sunrpc ipv6 inst ./server-init /sbin/init inst ./hosts /etc/hosts diff --git a/test/TEST-40-NBD/server-init b/test/TEST-40-NBD/server-init index 1df2801..a9bbab6 100755 --- a/test/TEST-40-NBD/server-init +++ b/test/TEST-40-NBD/server-init @@ -11,7 +11,8 @@ ip link set eth0 up nbd-server 2000 /dev/sdb -C /dev/null nbd-server 2001 /dev/sdc -C /dev/null >/var/lib/dhcpd/dhcpd.leases -dhcpd -cf /etc/dhcpd.conf +chmod 777 /var/lib/dhcpd/dhcpd.leases +dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases #sh -i # Wait forever for the VM to die while sleep 60; do sleep 60; done diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh index 286cbbe..e806d6d 100755 --- a/test/TEST-40-NBD/test.sh +++ b/test/TEST-40-NBD/test.sh @@ -255,8 +255,10 @@ make_server_root() { initdir=mnt . $basedir/dracut-functions dracut_install sh ls shutdown poweroff stty cat ps ln ip \ - /lib/terminfo/l/linux dmesg mkdir cp ping grep dhcpd \ - sleep nbd-server + /lib/terminfo/l/linux dmesg mkdir cp ping grep \ + sleep nbd-server chmod + which dhcpd >/dev/null 2>&1 && dracut_install dhcpd + [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd inst ./server-init /sbin/init inst ./hosts /etc/hosts inst ./dhcpd.conf /etc/dhcpd.conf