summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_resizefs.py
diff options
context:
space:
mode:
authorHarm Weites <harm@weites.com>2013-12-06 21:25:04 +0000
committerHarm Weites <harm@weites.com>2013-12-06 21:25:04 +0000
commit53f1938a1c33b4d9e333101d1d614803373a6bc5 (patch)
tree2b5821cd905fb9034e6cb1edac6e70c7285b175b /cloudinit/config/cc_resizefs.py
parentee9fbafae1abfd7ba3f4bece11f722519116ca81 (diff)
downloadvyos-cloud-init-53f1938a1c33b4d9e333101d1d614803373a6bc5.tar.gz
vyos-cloud-init-53f1938a1c33b4d9e333101d1d614803373a6bc5.zip
new: FreeBSD module to support cloud-init on the FBSD10 platform. In its
current form its still missing some modules though. Supported: -SSH-keys -growpart -growfs -adduser -powerstate
Diffstat (limited to 'cloudinit/config/cc_resizefs.py')
-rw-r--r--cloudinit/config/cc_resizefs.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/cloudinit/config/cc_resizefs.py b/cloudinit/config/cc_resizefs.py
index 56040fdd..95bc7a4e 100644
--- a/cloudinit/config/cc_resizefs.py
+++ b/cloudinit/config/cc_resizefs.py
@@ -39,6 +39,10 @@ def _resize_ext(mount_point, devpth): # pylint: disable=W0613
def _resize_xfs(mount_point, devpth): # pylint: disable=W0613
return ('xfs_growfs', devpth)
+
+def _resize_ufs(mount_point, devpth): # pylint: disable=W0613
+ return ('growfs', devpth)
+
# Do not use a dictionary as these commands should be able to be used
# for multiple filesystem types if possible, e.g. one command for
# ext2, ext3 and ext4.
@@ -46,6 +50,7 @@ RESIZE_FS_PREFIXES_CMDS = [
('btrfs', _resize_btrfs),
('ext', _resize_ext),
('xfs', _resize_xfs),
+ ('ufs', _resize_ufs),
]
NOBLOCK = "noblock"
@@ -91,7 +96,7 @@ def handle(name, cfg, _cloud, log, args):
raise exc
return
- if not stat.S_ISBLK(statret.st_mode):
+ if not stat.S_ISBLK(statret.st_mode) and not stat.S_ISCHR(statret.st_mode):
if util.is_container():
log.debug("device '%s' not a block device in container."
" cannot resize: %s" % (devpth, info))