summaryrefslogtreecommitdiff
path: root/dasd-functions.sh.in
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2022-11-06 20:07:59 +0100
committerJakub Jirutka <jakub@jirutka.cz>2022-11-06 20:07:59 +0100
commit462826ff1fc387dc642f1670a68cddc6f0b6cc29 (patch)
treebddb1c5902819732819364f46fd788f8a6bc52fd /dasd-functions.sh.in
parent3da4ed314aeebd403410deaf189d5921cc654c6c (diff)
downloadalpine-conf-462826ff1fc387dc642f1670a68cddc6f0b6cc29.zip
always quote vars in 'local' assignment
Some shells may apply word splitting after expanding variable in `local a=$1`. I know just about yash, but since `local` is supposed to be a builtin *command*, the "correct" behaviour of common shells is actually a special case for `local` - it doesn't apply for other commands. See https://osdn.net/projects/yash/ticket/46041.
Diffstat (limited to 'dasd-functions.sh.in')
-rw-r--r--dasd-functions.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/dasd-functions.sh.in b/dasd-functions.sh.in
index e71f098..24d7d90 100644
--- a/dasd-functions.sh.in
+++ b/dasd-functions.sh.in
@@ -87,7 +87,7 @@ is_dasd() {
setup_zipl() {
local mnt="$1" root="$2" modules="$3" kernel_opts="$4"
local parameters="root=$root modules=$modules $kernel_opts"
- local dasd=$(echo $eckd_dasd $fba_dasd | tr ' ' ',')
+ local dasd="$(echo $eckd_dasd $fba_dasd | tr ' ' ',')"
local s390x_net="$(get_bootopt s390x_net)"
[ -n "$dasd" ] && parameters="$parameters dasd=$dasd"
[ -n "$s390x_net" ] && parameters="$parameters s390x_net=$s390x_net"
@@ -108,7 +108,7 @@ setup_zipl() {
setup_partitions_eckd() {
local blocks_per_track=12 tracks_per_cylinder=15 boot_track= swap_track=
- local diskdev=$1 boot_size=$2 swap_size=$3 sys_type=$4
+ local diskdev="$1" boot_size="$2" swap_size="$3" sys_type="$4"
boot_track=$(($boot_size * 1024 / 4 / blocks_per_track))
[ "$swap_size" != 0 ] && swap_track=$(($swap_size * 1024 / 4 / blocks_per_track + boot_track + 1))
local conf="$(mktemp)"