summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_growpart.py
diff options
context:
space:
mode:
authorGonéri Le Bouder <goneri@lebouder.net>2021-06-14 15:39:05 -0400
committerGitHub <noreply@github.com>2021-06-14 14:39:05 -0500
commit59a848c5929cbfca45d95860eb60dfebd0786c94 (patch)
treea962355634c51c6cc03b56c0dceca8c2b345a550 /cloudinit/config/cc_growpart.py
parent05b0e35026db3789c56ee9f8192d4a81067325e5 (diff)
downloadvyos-cloud-init-59a848c5929cbfca45d95860eb60dfebd0786c94.tar.gz
vyos-cloud-init-59a848c5929cbfca45d95860eb60dfebd0786c94.zip
add DragonFlyBSD support (#904)
- Mostly based on FreeBSD, the main exception is that `find_devs_with_on_freebsd` does not work. - Since we cannot get the CDROM or the partition labels, `find_devs_with_on_dragonflybsd()` has a more naive approach and returns all the block devices.
Diffstat (limited to 'cloudinit/config/cc_growpart.py')
-rw-r--r--cloudinit/config/cc_growpart.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/config/cc_growpart.py b/cloudinit/config/cc_growpart.py
index 9f338ad1..9f5525a1 100644
--- a/cloudinit/config/cc_growpart.py
+++ b/cloudinit/config/cc_growpart.py
@@ -224,6 +224,10 @@ def device_part_info(devpath):
freebsd_part = "/dev/" + util.find_freebsd_part(devpath)
m = re.search('^(/dev/.+)p([0-9])$', freebsd_part)
return (m.group(1), m.group(2))
+ elif util.is_DragonFlyBSD():
+ dragonflybsd_part = "/dev/" + util.find_dragonflybsd_part(devpath)
+ m = re.search('^(/dev/.+)s([0-9])$', dragonflybsd_part)
+ return (m.group(1), m.group(2))
if not os.path.exists(syspath):
raise ValueError("%s had no syspath (%s)" % (devpath, syspath))