summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreaf74 <53090017+andreaf74@users.noreply.github.com>2020-01-07 21:56:46 +0100
committerDaniel Watkins <oddbloke@ubuntu.com>2020-01-07 15:56:46 -0500
commitb59870ca3d8993612452a7b90687e2ed4ad0572a (patch)
treee2046673427fa7a91366cf096b4c622baa9d98ee
parent7801bd092d38ab18c3bcd5e83714f64de524383c (diff)
downloadvyos-cloud-init-b59870ca3d8993612452a7b90687e2ed4ad0572a.tar.gz
vyos-cloud-init-b59870ca3d8993612452a7b90687e2ed4ad0572a.zip
fixed minor bug with mkswap in cc_disk_setup.py (#143)
-rw-r--r--cloudinit/config/cc_disk_setup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py
index 29e192e8..d8d0fcf1 100644
--- a/cloudinit/config/cc_disk_setup.py
+++ b/cloudinit/config/cc_disk_setup.py
@@ -982,7 +982,9 @@ def mkfs(fs_cfg):
# File systems that support the -F flag
if overwrite or device_type(device) == "disk":
- fs_cmd.append(lookup_force_flag(fs_type))
+ force_flag = lookup_force_flag(fs_type)
+ if force_flag:
+ fs_cmd.append(force_flag)
# Add the extends FS options
if fs_opts: