diff options
Diffstat (limited to 'test/TEST-20-NFS/client-init.sh')
-rwxr-xr-x | test/TEST-20-NFS/client-init.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/TEST-20-NFS/client-init.sh b/test/TEST-20-NFS/client-init.sh index 061a2b1..04fb6a7 100755 --- a/test/TEST-20-NFS/client-init.sh +++ b/test/TEST-20-NFS/client-init.sh @@ -20,10 +20,17 @@ echo "made it to the rootfs! Powering down." while read -r dev _ fstype opts rest || [ -n "$dev" ]; do [ "$fstype" != "nfs" -a "$fstype" != "nfs4" ] && continue - echo "nfs-OK $dev $fstype $opts" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker + echo "nfs-OK $dev $fstype $opts" | dd oflag=direct,dsync of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none break done < /proc/mounts +# fail the test of rd.live.overlay did not worked as expected +if grep -qF 'rd.live.overlay' /proc/cmdline; then + if ! strstr "$(cat /proc/mounts)" LiveOS_rootfs; then + echo "nfs-FAIL" | dd oflag=direct,dsync of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker status=none + fi +fi + if [ "$fstype" = "nfs" -o "$fstype" = "nfs4" ]; then serverip=${dev%:*} @@ -36,11 +43,11 @@ if [ "$fstype" = "nfs" -o "$fstype" = "nfs4" ]; then echo test:nfs_fetch_url nfs::"${serverip}":"${path}"/root/fetchfile if nfs_fetch_url nfs::"${serverip}":"${path}"/root/fetchfile /run/nfsfetch.out; then echo nfsfetch-OK - echo "nfsfetch-OK" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker2 + echo "nfsfetch-OK" | dd oflag=direct,dsync of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker2 status=none fi else echo nfsfetch-BYPASS fstype="${fstype}" - echo "nfsfetch-OK" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker2 + echo "nfsfetch-OK" | dd oflag=direct,dsync of=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_marker2 status=none fi : > /dev/watchdog |