Commit Graph

27 Commits

Author SHA1 Message Date
William Douglas 0d4e4f2673 Allow detection of Clear Linux OS in python3
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.
2018-02-07 21:42:01 +00:00
Hongjiang Zhang 9f01d3883e fix the issue of "dmidecode is not found" on FreeBSD 2017-06-15 10:59:51 +08:00
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
zegman ed8f449798 Add Check Point GAiA OS support 2017-05-17 16:28:59 +03:00
enihcam ab90f075d1 Add Arch distro support (#670)
* Add Arch distro support

* Added archDistro in waagent2.0

* Added missing dependency for archDistro

* Revert "Added missing dependency for archDistro"

This reverts commit 259cc020c42ec575dbe11c3057002d03e90353a4.

* Revert "Added archDistro in waagent2.0"

This reverts commit dc51cdfcb392b3958e0bcb60b3144226f07d3723.

* Enable waagent AutoUpdate for archlinux.
2017-04-18 12:02:01 -07:00
William Douglas d4a3226142 Add Clear Linux distro support 2016-10-26 21:12:05 +00:00
Scott Moser 54256269d4 walinuxagent.service: adjust Wants and After (#426)
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.
2016-09-14 16:57:04 -07:00
Ahmet Alp Balkan 99b89b3386 Add -u unbuffering to ubuntu systemd unit (#289) 2016-07-06 10:25:28 -07:00
Stephen A. Zarkos d2b7e69314 Fix RPM install (#243)
* 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
2016-06-17 14:56:44 -07:00
Ahmet Alp Balkan 5645bdda9e [2.1] Systemd unit file updates (#230)
* Rename systemd unit file, chmod -x

* Extend the systemd unit file

* Add notice for ubuntu systemd file
2016-06-15 15:13:28 -07:00
Dong Liu 95ea883433 Fix setup.py install for coreos. 2016-04-06 13:26:16 +08:00
Dong Liu e522afc307 Add service script for FreeBSD. 2016-02-23 09:58:56 +08:00
Yue Zhang 82fde85f17 Update systemd unit file and waagent.conf for Ubuntu15.10 2015-11-19 00:55:04 +08:00
Yue Zhang 27270823f2 Rename Windows Azure to Microsoft Azure 2015-10-23 14:55:05 +08:00
Yue Zhang 4fad64dd30 Fix setup.py
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
2015-10-20 10:21:36 +08:00
Yue Zhang 3cb46637c1 Use hard-code python path for Ubuntu 15.04 test 2015-08-05 11:48:42 +08:00
Yue Zhang 8c02b0c4c1 Support old extensions 2015-08-05 11:34:06 +08:00
Yue Zhang 46de362f28 Add service config for ubuntu pre-15.04 2015-08-02 15:29:58 +08:00
Yue Zhang fb40e89ea6 Add restart to upstart and systemd script 2015-08-02 14:23:50 +08:00
Yue Zhang 5d8caf770e Handle socket error for dhcp handler and add restart for systemd 2015-08-02 12:41:31 +08:00
Yue Zhang 9f299a419f Improve log and cleanup code 2015-06-30 16:24:24 +08:00
Yue Zhang 46c6115ee3 Change to systemd for ubuntu 1504 2015-06-30 16:24:24 +08:00
Yue Zhang 73525cd028 Update init script for sysV 2015-06-30 02:20:18 +08:00
Yue Zhang 4b69733951 Add register-service option to setup.py 2015-06-29 14:50:37 +08:00
Yue Zhang ae7697e8d3 Fix init script for centos 2015-06-27 17:49:14 +08:00
Yue Zhang 8ed9073057 Add distro loader 2015-06-24 15:49:09 +08:00
Yue Zhang f077df51ed Update setup.py 2015-06-16 15:00:24 +08:00