summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2023-11-28 12:13:15 +0100
committerSimon Rettberg2023-11-28 12:13:15 +0100
commita4f9b1d0836c66728f9d5c78a9b76ecf7513471d (patch)
treed10646bfc1c4b58e04f3141332f2de7ab4a2718e
parent[run-virt/fspanel] Use modded version of fspanel without always-on-top (diff)
downloadmltk-a4f9b1d0836c66728f9d5c78a9b76ecf7513471d.tar.gz
mltk-a4f9b1d0836c66728f9d5c78a9b76ecf7513471d.tar.xz
mltk-a4f9b1d0836c66728f9d5c78a9b76ecf7513471d.zip
[run-virt] Use mapfile for getips
-rwxr-xr-xcore/modules/run-virt/data/opt/openslx/scripts/runvirt-start_dhcpd4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/scripts/runvirt-start_dhcpd b/core/modules/run-virt/data/opt/openslx/scripts/runvirt-start_dhcpd
index 99320dd6..42091584 100755
--- a/core/modules/run-virt/data/opt/openslx/scripts/runvirt-start_dhcpd
+++ b/core/modules/run-virt/data/opt/openslx/scripts/runvirt-start_dhcpd
@@ -14,8 +14,8 @@ FALLBACK_DOMAIN="virtual.localnet"
getips () {
[ -z "$1" ] && return
[ "$1" = "$FALLBACK_DOMAIN" ] && return
- # Output in one line by using echo without quotes
- 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}')
+ mapfile -t out < <( 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]+' )
+ printf "%s" "${out[*]}"
}
# read the DNS configuration and configure the udhcpd