summaryrefslogtreecommitdiffstats
path: root/src/cmd/installer-pc.sh
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-26 00:32:12 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-26 00:32:12 (EDT)
commit8bd88f7d4da4ac4ad673262fa855c96a8670de0a (patch)
treef9c48a90953652a8a4f72d4e104593b05cc62883 /src/cmd/installer-pc.sh
parent456aa9142b32b226bd27b8384291a64e90e51ffb (diff)
src/cmd/installer-pc.sh: Delimit command operands
Diffstat (limited to 'src/cmd/installer-pc.sh')
-rw-r--r--src/cmd/installer-pc.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cmd/installer-pc.sh b/src/cmd/installer-pc.sh
index 36baef7..bb0410d 100644
--- a/src/cmd/installer-pc.sh
+++ b/src/cmd/installer-pc.sh
@@ -47,14 +47,15 @@ _cmd_installer_pc_make_partition_and_fs()
info "$(get_msg 'cmd_installer_pc_fdisk')"
if ${HAVE_SFDISK}; then
- if ! log="$(printf ',,83,*\n' | ${SFDISK} "${dev}" 2>&1)"; then
+ if ! log="$(printf ',,83,*\n' | ${SFDISK} -- "${dev}" 2>&1)"
+ then
error "$(get_msg 'cmd_installer_pc_fdisk_fail')"
_cmd_installer_pc_log_print 'sfdisk' "${log}"
return 1
fi
elif ${HAVE_FDISK}; then
if ! log="$(printf 'n\np\n1\n\n\nt\n83\na\n1\nw\n' |
- ${FDISK} "${dev}" 2>&1)"; then
+ ${FDISK} -- "${dev}" 2>&1)"; then
error "$(get_msg 'cmd_installer_pc_fdisk_fail')"
_cmd_installer_pc_log_print 'fdisk' "${log}"
return 1
@@ -62,7 +63,7 @@ _cmd_installer_pc_make_partition_and_fs()
fi
info "$(get_msg 'cmd_installer_pc_mkfs')"
- if ! log="$(${MKE2FS} -t ext4 "${dev}1" 2>&1)"; then
+ if ! log="$(${MKE2FS} -t ext4 -- "${dev}1" 2>&1)"; then
error "$(get_msg 'cmd_installer_pc_mkfs_fail')"
_cmd_installer_pc_log_print 'mke2fs' "${log}"
return 1