Commit 3de63003 authored by Scott Moser's avatar Scott Moser

disk_setup: correctly send --force to mkfs on block devices

Send the --force flag to mkfs or other filesystems when target
is a block device.  This fixes a general code flow issue where
we were setting the --force flag.

LP: #1548772
parent e3138283
......@@ -99,6 +99,7 @@
- FreeBSD: add support for installing packages, setting password and
timezone. Change default user to 'freebsd'. [Ben Arblaster]
- locale: list unsupported environment settings in warning (LP: #1558069)
- disk_setup: correctly send --force to mkfs on block devices (LP: #1548772)
0.7.6:
- open 0.7.6
......
......@@ -847,9 +847,9 @@ def mkfs(fs_cfg):
if label:
fs_cmd.extend(["-L", label])
# File systems that support the -F flag
if not fs_cmd and (overwrite or device_type(device) == "disk"):
fs_cmd.append(lookup_force_flag(fs_type))
# File systems that support the -F flag
if overwrite or device_type(device) == "disk":
fs_cmd.append(lookup_force_flag(fs_type))
# Add the extends FS options
if fs_opts:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment