summaryrefslogtreecommitdiffstats
path: root/remote/modules
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules')
-rwxr-xr-xremote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store8
1 files changed, 6 insertions, 2 deletions
diff --git a/remote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store b/remote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store
index 9d478918..363e5253 100755
--- a/remote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store
+++ b/remote/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store
@@ -13,8 +13,12 @@ OUTFILE=$(mktemp)
# no bash, so this is a bit ugly...
if [ "${SLX_VM_NFS#//}" = "${SLX_VM_NFS}" ]; then
# doesn't start with '//' -> assume NFS
- /opt/openslx/bin/timeout -t 10 -s 9 mount -v -t nfs -o ro,async,nolock "$SLX_VM_NFS" /mnt/vmstore
+ /opt/openslx/bin/timeout -t 6 -s 9 mount -v -t nfs -o ro,async,nolock "$SLX_VM_NFS" /mnt/vmstore
RET=$?
+ if [ "$RET" != "0" ]; then
+ /opt/openslx/bin/timeout -t 6 -s 9 mount -v -t nfs -o vers=3,ro,async,nolock "$SLX_VM_NFS" /mnt/vmstore
+ RET=$?
+ fi
else
# starts with '//' -> assume CIFS
export USER="$SLX_VM_NFS_USER"
@@ -25,7 +29,7 @@ else
RET=$?
fi > "$OUTFILE" 2>&1
-if [ $RET -ne 0 ]; then
+if [ "$RET" -ne "0" ]; then
if [ -s "$OUTFILE" ]; then
slxlog "mount-vmstore-fail" "Mounting '$SLX_VM_NFS' failed. VMs will not boot." "$OUTFILE"
sleep 1