systemd: always use /lib/systemd

Debian and Ubuntu use /lib/systemd whereas Fedora usr /usr/lib/systemd as the
default system unit directory. This already leads to conflict when the
debian-systemd is used.

Fedora provides a symbolic link between /lib/systemd and /usr/lib/systemd
to also support /lib/systemd directory. With this patch, we use /lib/systemd
everywhere.

This patch supersedes I413a92284e6a79e7fcdde99c5138bc3ce8e85e80.

Change-Id: I459f7514ab35082d31607968252a9005fa25de2a
See: https://bugs.debian.org/719634
This commit is contained in:
Gonéri Le Bouder 2014-10-17 10:19:32 +02:00
parent de84948374
commit a59e7ea360
2 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ function install_systemd {
Environment=}
fi
$OUTPUT /usr/lib/systemd/system/$name.service <<EOF
$OUTPUT /lib/systemd/system/$name.service <<EOF
[Unit]
Description=$name Service
After=os-refresh-config.service
@ -179,7 +179,7 @@ function install_create_dir_systemd {
local user=$2
local dirname=${3:-$user}
$OUTPUT /usr/lib/systemd/system/$name-create-dir.service <<EOF
$OUTPUT /lib/systemd/system/$name-create-dir.service <<EOF
[Unit]
Description=Create /var/run/$dirname

View File

@ -46,10 +46,10 @@ fi
if [ "$DIB_INIT_SYSTEM" = "systemd" ]; then
# Delay the rc-local.service start-up until rabbitmq-server.service is started up
sed -i 's/\[Unit\]/\[Unit\]\nBefore=rc-local.service/g' /usr/lib/systemd/system/rabbitmq-server.service
sed -i 's/\[Unit\]/\[Unit\]\nBefore=rc-local.service/g' /lib/systemd/system/rabbitmq-server.service
# Respawn rabbitmq-server in case the process exits with an nonzero exit code
sed -i 's/\[Service\]/\[Service\]\nRestart=on-failure/g' /usr/lib/systemd/system/rabbitmq-server.service
sed -i 's/\[Service\]/\[Service\]\nRestart=on-failure/g' /lib/systemd/system/rabbitmq-server.service
fi