summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_resizefs.py
diff options
context:
space:
mode:
authorHarm Weites <harm@weites.com>2014-01-23 16:35:33 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-23 16:35:33 -0500
commit8e035f857a06adb5493bbcd35bd427cf2a9e813b (patch)
treee2f5aa7d6df52b11c242f9e3e4ea2fbf3395de67 /cloudinit/config/cc_resizefs.py
parentc833a84f08019ba4413937f2f1b1f12a4ffe5632 (diff)
parent75d6f035bcd94e6420ba6de5a9d12c1f554771cf (diff)
downloadvyos-cloud-init-8e035f857a06adb5493bbcd35bd427cf2a9e813b.tar.gz
vyos-cloud-init-8e035f857a06adb5493bbcd35bd427cf2a9e813b.zip
Initial Freebsd support
This gets initial support for freebsd.
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 388ca66f..be406034 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"
@@ -120,7 +125,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 container:
log.debug("device '%s' not a block device in container."
" cannot resize: %s" % (devpth, info))