mirror of
https://github.com/clearlinux/WALinuxAgent.git
synced 2026-09-02 20:01:33 +00:00
* Make sure the initial device is a valid disc, and fallback if not
This is the same check the fallback code uses, and is necessary as on
later FreeBSD 11 versions the disc are retruned in reverse order. Thus
the original function returns 'pass1' instead of 'da1' which fails. This
fixes the issue and allows the resource disc to be mounted again, though
relying on the fallback is not the cleanest solution.
* Skip 'pass' devices when looking for the resource disk
This fixes the error introduced in FreeBSD 11 where the order of
outout from camcontrol changed from da1,pass1 to pass1,da1 and thus
waagent misidentified the disc as 'pass1'. Instead of taking the
first device, we now split the string at ',' and return the first
device which does not begin 'pass'.