Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onboard redhat82 #2290

Merged
merged 2 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions init/redhat/waagent.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Azure Linux Agent
Wants=network-online.target sshd.service sshd-keygen.service
After=network-online.target

ConditionFileIsExecutable=/usr/sbin/waagent
ConditionPathExists=/etc/waagent.conf

[Service]
Type=simple
ExecStart=/usr/bin/python3 -u /usr/sbin/waagent -daemon
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
13 changes: 11 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,20 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912
agent_bin_path = osutil.get_agent_bin_path()

if name == 'redhat' or name == 'centos': # pylint: disable=R1714
set_bin_files(data_files, dest=agent_bin_path)
if version.startswith("8.2"):
# redhat8+ default to py3
set_bin_files(data_files, dest=agent_bin_path,
src=["bin/py3/waagent", "bin/waagent2.0"])
else:
set_bin_files(data_files, dest=agent_bin_path)
set_conf_files(data_files)
set_logrotate_files(data_files)
set_udev_files(data_files)
if version.startswith("6"):
if version.startswith("8.2"):
# redhat 8+ uses systemd and python3
set_systemd_files(data_files, dest=systemd_dir_path,
src=["init/redhat/waagent.service"])
elif version.startswith("6"):
set_sysv_files(data_files)
else:
# redhat7.0+ use systemd
Expand Down