Files
Reyk Floeter aad62676a7 Add initial support for the OpenBSD operating system (#712)
* Add initial support for the OpenBSD operating system

There are some differences between FreeBSD, OpenBSD, and Linux.

Notes:

- OpenBSD ships LibreSSL, but WALinuxAgent needs OpenSSL for CMS, so
use the openssl port and the "eopenssl" binary instead.

- Don't run the custom DHCP client but parse /var/db/dhclient.leases.hvn0.
OpenBSD's lease file uses a modified syntax.

- OpenBSD does not have /proc.  WALinuxAgent should never assume that
the /proc filesystem is available.

- OpenBSD does not have sudo, but its replacement doas.  The OpenBSD
class implements support for modifying the doas.conf file.

- Unlike FreeBSD, OpenBSD supports and mounts UDF DVDs just fine.

- Create a swap partition instead of a swap file on the resource disk.

- Many other minor changes for OpenBSD

TODO:

- The /proc checks needs to be replaced with pgrep/ps etc. checks for
OpenBSD.  For now it just checks if /proc is available or returns
without error.
Make sure to install waagent with --register-service as setuptools
will not set the permissions of /etc/rc.d/waagent correctly (the file
has to be executable to be used by OpenBSD's rc system).

* Remove debug statement that was use to fix mount_dvd on OpenBSD.

* I accidentally replaced the FreeBSD resource disk handler.

The OpenBSD disk handler is an addition, not a replacement.

Found by jonathangray

* pylint

pylint found one bug in setting the password; other changes are just
for the style.

* strip newline from generated password hash.

Issue reported by Lili Deng.

* Keep AutoUpdate enabled, it was disabled for initial porting.

Pointed out by @hglkrijger

* Use a wildcard and delete all DHCP lease files on *BSD.

Requested by @hglkrijger
2017-05-30 15:27:22 -07:00
..