From 58841a46010748a392526f26141c9273035ff60a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 7 Aug 2020 14:42:19 +0200 Subject: [run-virt] Fix timeout calls wrt busybox commit c9720a76 --- .../run-virt/data/opt/openslx/scripts/systemd-mount_vm_store | 10 +++++----- .../run-virt/data/opt/openslx/scripts/systemd-run_virt_env | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'core/modules/run-virt') diff --git a/core/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store b/core/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store index a18b21c7..a9ce62b6 100755 --- a/core/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store +++ b/core/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store @@ -17,15 +17,15 @@ if [ "${SLX_VM_NFS#//}" = "${SLX_VM_NFS}" ]; then # doesn't start with '//' -> assume NFS RET=1 if [ -n "$SLX_VM_NFS_OPTS" ]; then - /opt/openslx/bin/timeout -t 10 -s 9 mount -v -t nfs -o "${SLX_VM_NFS_OPTS},ro" "$SLX_VM_NFS" /mnt/vmstore + /opt/openslx/bin/timeout -s 9 10 mount -v -t nfs -o "${SLX_VM_NFS_OPTS},ro" "$SLX_VM_NFS" /mnt/vmstore RET=$? fi if [ "$RET" != "0" ]; then - /opt/openslx/bin/timeout -t 6 -s 9 mount -v -t nfs -o ro,async,nolock "$SLX_VM_NFS" /mnt/vmstore + /opt/openslx/bin/timeout -s 9 6 mount -v -t nfs -o ro,async,nolock "$SLX_VM_NFS" /mnt/vmstore RET=$? fi 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 + /opt/openslx/bin/timeout -s 9 6 mount -v -t nfs -o vers=3,ro,async,nolock "$SLX_VM_NFS" /mnt/vmstore RET=$? fi else @@ -34,7 +34,7 @@ else export PASSWD="$SLX_VM_NFS_PASSWD" RET=1 if [ -n "$SLX_VM_NFS_OPTS" ]; then - /opt/openslx/bin/timeout -t 10 -s 9 mount -v -t cifs -o "${SLX_VM_NFS_OPTS},uid=0,gid=0,forceuid,forcegid,file_mode=0664,dir_mode=0775,ro" "$SLX_VM_NFS" /mnt/vmstore + /opt/openslx/bin/timeout -s 9 10 mount -v -t cifs -o "${SLX_VM_NFS_OPTS},uid=0,gid=0,forceuid,forcegid,file_mode=0664,dir_mode=0775,ro" "$SLX_VM_NFS" /mnt/vmstore RET=$? fi if [ "$RET" != "0" ]; then @@ -42,7 +42,7 @@ else [ -n "$vers" ] && vers=",vers=${vers}" for sec in "" "ntlmssp" "ntlmv2" "ntlm"; do [ -n "$sec" ] && sec=",sec=${sec}" - /opt/openslx/bin/timeout -t 10 -s 9 mount -v -t cifs -o "ro,file_mode=0644,dir_mode=0755,uid=0,gid=0,forceuid,forcegid,nounix${vers}${sec}" "$SLX_VM_NFS" /mnt/vmstore + /opt/openslx/bin/timeout -s 9 10 mount -v -t cifs -o "ro,file_mode=0644,dir_mode=0755,uid=0,gid=0,forceuid,forcegid,nounix${vers}${sec}" "$SLX_VM_NFS" /mnt/vmstore RET=$? [ "$RET" = "0" ] && break done diff --git a/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env b/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env index f556c368..77dfa194 100755 --- a/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env +++ b/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env @@ -193,7 +193,7 @@ getips () { [ -z "$1" ] && return [ "$1" = "$FALLBACK_DOMAIN" ] && return # Output in one line by using echo without quotes - echo $(busybox timeout -t 2 nslookup "$1" 2>/dev/null | grep -A 4 '^Name:' | grep -E '^Address\s*[0-9]*: ' | awk -F': ' '{print $2}' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | awk '{print $1}') + echo $(busybox timeout 2 nslookup "$1" 2>/dev/null | grep -A 4 '^Name:' | grep -E '^Address\s*[0-9]*: ' | awk -F': ' '{print $2}' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | awk '{print $1}') } # read the DNS configuration and configure the udhcpd -- cgit v1.2.3-55-g7522