Use systemctl instead of service to manager services in new RHEL versions (#3403)

Jira: https://issues.redhat.com/browse/RHEL-109465

In the RHEL bootc base image there's no initscripts-service package installed, so that there's no "service" command by default. This causes many service control commands cannot be executed inside WALA.
From RHEL-7 on, the systemctl command replaces service and chkconfig. So we'd like to drop all the 'service' command and use systemctl instead.

Upstream PR: https://github.com/Azure/WALinuxAgent/pull/3403

Signed-off-by: Yuxin Sun yuxisun@redhat.com

Merge request reports

Loading