Account for new location for systemd files on Arch.

This commit is contained in:
Gareth J. Greenaway 2023-02-02 10:24:12 -08:00
parent 59da03a73c
commit 465ec9a8e9
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -6556,8 +6556,15 @@ install_arch_linux_git_post() {
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
# Account for new path for services files in later releases
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service" ]; then
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/common"
else
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm"
fi
if [ -f /usr/bin/systemctl ]; then
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
__copyfile "${_SERVICE_DIR}/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
# Skip salt-api since the service should be opt-in and not necessarily started on boot
[ $fname = "api" ] && continue