Test for `pidof tgtd` and not the shell background jobs.
tgtadm --lld iscsi --mode target --op bind --tid 2 -I 192.168.51.101
tgtadm --lld iscsi --mode target --op bind --tid 3 -I 192.168.50.101
+echo "Serving iSCSI"
+
# Wait forever for the VM to die
-while :; do
- echo "Serving iSCSI"
- [ -n "$(jobs -rp)" ] && echo > /dev/watchdog
- sleep 10
+while pidof tgtd > /dev/null; do
+ : > /dev/watchdog
+ dmesg -c
+ sleep 1
done
+dmesg -c
mount -n -o remount,ro /
poweroff -f
inst_multiple sh ls shutdown poweroff stty cat ps ln ip \
dmesg mkdir cp ping \
modprobe tcpdump setsid \
- /etc/services sleep mount chmod
+ /etc/services sleep mount chmod pidof
inst_multiple tgtd tgtadm
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
[ -f ${_terminfodir}/l/linux ] && break
# Wait forever for the VM to die
echo "Serving iSCSI"
-while :; do
- [ -n "$(jobs -rp)" ] && echo > /dev/watchdog
- sleep 10
+while pidof tgtd > /dev/null; do
+ : > /dev/watchdog
+ dmesg -c
+ sleep 1
done
+dmesg -c
mount -n -o remount,ro /
poweroff -f
inst_multiple sh ls shutdown poweroff stty cat ps ln ip \
dmesg mkdir cp ping \
modprobe tcpdump setsid \
- /etc/services sleep mount chmod
+ /etc/services sleep mount chmod pidof
inst_multiple tgtd tgtadm
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
[ -f ${_terminfodir}/l/linux ] && break