diff options
author | Harm Weites <harm@weites.com> | 2014-01-23 16:35:33 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-23 16:35:33 -0500 |
commit | 8e035f857a06adb5493bbcd35bd427cf2a9e813b (patch) | |
tree | e2f5aa7d6df52b11c242f9e3e4ea2fbf3395de67 /cloudinit/config/cc_resizefs.py | |
parent | c833a84f08019ba4413937f2f1b1f12a4ffe5632 (diff) | |
parent | 75d6f035bcd94e6420ba6de5a9d12c1f554771cf (diff) | |
download | vyos-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.py | 7 |
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)) |