Discussion:
Cannot override "Conflicts" variable without editing installed service file
Add Reply
Nikos Chantziaras
2017-06-06 03:32:09 UTC
Reply
Permalink
Raw Message
Hello.

I recently switched a Gentoo system from OpenRC to systemd. I'd like to
keep tty1 (VT1) for login, and move the display manager (SDDM) to tty7.
SDDM is configured for that, but the installed service file
(/usr/lib/systemd/system/sddm.service) has this:

[Unit]
Conflicts=***@tty1.service

If I edit that file directly and change it to:

Conflicts=***@tty7.service

it works. systemd is prevented from stopping getty on tty1. I can login
normally on VT1.

However, this change gets lost on SDDM updates. So I'd like to override
that. So I did:

systemctl edit sddm.service

with this in it:

[Unit]
Conflicts=
Conflicts=***@tty7.service

This successfully creates
/etc/systemd/system/sddm.service.d/override.conf with the above contents.

AFAIK, this should override "Conflicts" and prevent ***@tty1.service
from stopping. But it doesn't. When SDDM starts, tty1 is stopped. The
only way to keep that from happening is to edit the installed
sddm.service file directly.

Does someone know why the override doesn't work?
Mantas Mikulėnas
2017-06-06 04:17:53 UTC
Reply
Permalink
Raw Message
Currently drop-ins cannot remove dependencies. Use a full override.
Post by Nikos Chantziaras
Hello.
I recently switched a Gentoo system from OpenRC to systemd. I'd like to
keep tty1 (VT1) for login, and move the display manager (SDDM) to tty7.
SDDM is configured for that, but the installed service file
[Unit]
it works. systemd is prevented from stopping getty on tty1. I can login
normally on VT1.
However, this change gets lost on SDDM updates. So I'd like to override
systemctl edit sddm.service
[Unit]
Conflicts=
This successfully creates
/etc/systemd/system/sddm.service.d/override.conf with the above contents.
from stopping. But it doesn't. When SDDM starts, tty1 is stopped. The
only way to keep that from happening is to edit the installed
sddm.service file directly.
Does someone know why the override doesn't work?
_______________________________________________
systemd-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
Mantas Mikulėnas <***@gmail.com>
Sent from my phone
Loading...