]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test: ping watchdog in dhcp servers
authorHarald Hoyer <harald@redhat.com>
Thu, 19 Mar 2015 15:40:05 +0000 (16:40 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 20 Mar 2015 13:28:42 +0000 (14:28 +0100)
test/TEST-20-NFS/server-init.sh
test/TEST-30-ISCSI/server-init.sh
test/TEST-40-NBD/server-init.sh
test/TEST-50-MULTINIC/server-init.sh

index 6f5f86060e6429affedbaaa85117b6bd814413f4..5b6f42f2452e752b61a56a66f04eaa7964535a49 100755 (executable)
@@ -50,9 +50,11 @@ echo > /dev/watchdog
 echo > /dev/watchdog
 chmod 777 /var/lib/dhcpd/dhcpd.leases
 echo > /dev/watchdog
-dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases
-echo -n "V" > /dev/watchdog
+dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases &
 echo "Serving NFS mounts"
-while :; do sleep 30; done
+while :; do
+       [ -n "$(jobs -rp)" ] && echo > /dev/watchdog
+       sleep 10
+done
 mount -n -o remount,ro /
 poweroff -f
index 4bdd5e3c15579066666bbf4f40747363bcb5d32d..0407b170d65b6b224bfb2cd9c187522271f6e5fa 100755 (executable)
@@ -14,8 +14,13 @@ ip addr add 192.168.50.1/24 dev ens3
 ip link set ens3 up
 >/var/lib/dhcpd/dhcpd.leases
 chmod 777 /var/lib/dhcpd/dhcpd.leases
-dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases
+dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases &
+/usr/sbin/iscsi-target -D -t iqn.2009-06.dracut &
 # Wait forever for the VM to die
-/usr/sbin/iscsi-target -D -t iqn.2009-06.dracut
+echo "Serving iSCSI"
+while :; do
+       [ -n "$(jobs -rp)" ] && echo > /dev/watchdog
+       sleep 10
+done
 mount -n -o remount,ro /
 poweroff -f
index 56012d21505d76ec6d65b8e48b916c85a8ef06db..73c64d6e5e3e155516e78b5e01b89ec0687ae158 100755 (executable)
@@ -17,9 +17,11 @@ nbd-server 2000 /dev/sdb -C /dev/null
 nbd-server 2001 /dev/sdc -C /dev/null
 >/var/lib/dhcpd/dhcpd.leases
 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
+dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases &
+echo "Serving NBD disks"
+while :; do
+       [ -n "$(jobs -rp)" ] && echo > /dev/watchdog
+       sleep 10
+done
 mount -n -o remount,ro /
 poweroff -f
index 2e05bb4f7ae9b4949a0be85cbecf134ca60d7895..3a9c8cbf09d4ae61a129f253832da7f21b5d0c03 100755 (executable)
@@ -84,15 +84,11 @@ exportfs -r
 >/dev/watchdog
 chmod 777 /var/lib/dhcpd/dhcpd.leases
 >/dev/watchdog
-dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases
-#echo -n 'V' > /dev/watchdog
-#sh -i
-#tcpdump -i ens3
-# Wait forever for the VM to die
+dhcpd -d -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases &
 echo "Serving NFS mounts"
 while :; do
+       [ -n "$(jobs -rp)" ] && echo > /dev/watchdog
        sleep 10
-       >/dev/watchdog
 done
 mount -n -o remount,ro /
 poweroff -f