Account for new location for systemd files on Gentoo.

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

View file

@ -8099,8 +8099,15 @@ install_gentoo_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"
fi
if __check_command_exists systemctl ; then
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/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