diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-04-04 15:02:00 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-04-04 15:02:00 -0400 |
commit | 3de63003f63801a046b2526b264caa92371d8e9f (patch) | |
tree | 14cba1de7e4f877a613ab72f37ddd6e57dbbf845 /cloudinit/config/cc_disk_setup.py | |
parent | e3138283fa5f4c3c2579ee54c8a160fda2c17473 (diff) | |
download | vyos-cloud-init-3de63003f63801a046b2526b264caa92371d8e9f.tar.gz vyos-cloud-init-3de63003f63801a046b2526b264caa92371d8e9f.zip |
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
Diffstat (limited to 'cloudinit/config/cc_disk_setup.py')
-rw-r--r-- | cloudinit/config/cc_disk_setup.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py index 0ecc2e4c..bbaf9646 100644 --- a/cloudinit/config/cc_disk_setup.py +++ b/cloudinit/config/cc_disk_setup.py @@ -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: |