scripts: fix quoting issues
This commit is contained in:
parent
a51172fbfd
commit
16637d6d16
|
@ -6,8 +6,8 @@ device="$1"
|
|||
name="${device#vm-}"
|
||||
. "$rootdir/utils.sh"
|
||||
|
||||
file=$(basename "$name.conf")
|
||||
conf=$(resolve_includes "$rootdir/conf" "$rootdir/conf/$file")
|
||||
file="$(basename "$name.conf")"
|
||||
conf="$(resolve_includes "$rootdir/conf" "$rootdir/conf/$file")"
|
||||
|
||||
# Set configuration
|
||||
while read -r k v ; do
|
||||
|
|
|
@ -7,8 +7,8 @@ name="${device#vm-}"
|
|||
. "$rootdir/utils.sh"
|
||||
|
||||
# Read files
|
||||
file=$(basename "$name.conf")
|
||||
conf=$(resolve_includes "$rootdir/conf" "$rootdir/conf/$file")
|
||||
file="$(basename "$name.conf")"
|
||||
conf="$(resolve_includes "$rootdir/conf" "$rootdir/conf/$file")"
|
||||
|
||||
# Set configuration
|
||||
while read -r k v ; do
|
||||
|
|
|
@ -6,9 +6,9 @@ name="$1"
|
|||
. "$rootdir/utils.sh"
|
||||
|
||||
# Read files.
|
||||
file=$(basename "$name.conf")
|
||||
conf=$(resolve_includes "$rootdir/conf" "$rootdir/conf/$file")
|
||||
params=$(resolve_includes "$rootdir/include" "$rootdir/machines.d/$file")
|
||||
file="$(basename "$name.conf")"
|
||||
conf="$(resolve_includes "$rootdir/conf" "$rootdir/conf/$file")"
|
||||
params="$(resolve_includes "$rootdir/include" "$rootdir/machines.d/$file")"
|
||||
|
||||
# Set configuration
|
||||
while read -r k v ; do
|
||||
|
@ -18,7 +18,7 @@ $conf
|
|||
EOF
|
||||
|
||||
# Expand parameters.
|
||||
params=$(expand "$params")
|
||||
params="$(expand "$params")"
|
||||
|
||||
# Build command line.
|
||||
set -- qemu-system-x86_64
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
resolve_includes() {
|
||||
local rootdir="$1"
|
||||
local conf=$(cat "$2")
|
||||
local conf="$(cat "$2")"
|
||||
local k
|
||||
local v
|
||||
test -z "$conf" && exit 1
|
||||
|
@ -29,5 +29,5 @@ expand() {
|
|||
local data="$1"
|
||||
local newline="$(printf '\n ')"
|
||||
newline=${newline% }
|
||||
eval "cat <<EOF${newline}${data}${newline}"
|
||||
eval "cat <<EOF${newline}${data}${newline}EOF"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue