cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #02654
Re: [Merge] ~redriver/cloud-init:fix-mount-issue-for-frbsd-on-Azure into cloud-init:master
Hi,
So I think the basic idea here is to attempt to mount the cdrom to verify that there is in fact a cdrom.
Thats not an entirely bad idea, but it seems like it might be sufficient to either:
a.) always add 'dev/cd0' on freebsd and let the code in get_data just attempt to mount, which means we would not be mounting the thing twice.
b.) attempt an 'open' and read of /dev/cd0.
this would be quicker than a mount, and at least on linux the 'open' would fail if the cdrom does not have any disk in it.
ie:
if util.is_FreeBSD():
cdrom_dev = "/dev/cd0"
try:
with open(cdrom_dev) as fp:
fp.read(1024)
devlist.append(cdrom_dev)
except IOError:
pass
--
https://code.launchpad.net/~redriver/cloud-init/+git/cloud-init/+merge/325207
Your team cloud-init commiters is requested to review the proposed merge of ~redriver/cloud-init:fix-mount-issue-for-frbsd-on-Azure into cloud-init:master.
References