In python3 the platform.linux_distribution() function does not display
content for Clear Linux. In addition the linux_distribution function
is due to be deprecated in python 3.7 (the next minor release, see
https://bugs.python.org/issue1322). In anticipation of this, switch to
sourcing the os-release file in the waagent.service and reading the
distribution information from the environment instead.
* 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
There is no reason for walinuxagent.service to Want
cloud-final.service. That could cause problems if cloud-init was
disabled.
There is also no reason for it to need to run After cloud-final.
Instead replace that with After of cloud-init. That will ensure
that cloud-init in its datasource code has an opportunity affect
walinuxagent before it starts.
The need for this is because cloud-init was starting walinux.service
during cloud-init.service, which would cause unresolvable
cyclic dependencies.
* Update setup.py to add udev files
* Rename systemd service to waagent.service
- Keep waagent.service for consistency
- Use /usr/bin/python as default instead of /usr/bin/python3
1. Fix systemd init script location for SUSE and centos
2. Fix sysV script for SLES11
3. Use systemctl for sles12+
4. Mitigate systemd issue on centos 7.1