Re: [PATCH v2] systemd: set default.target to multi-user.target

Andreas Müller
2013-01-25T21:25:17Z

On Fri, Jan 25, 2013 at 9:26 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Fri, Jan 25, 2013 at 08:21:05PM +0000, Ross Burton wrote:
>> On Friday, 25 January 2013 at 19:34, Martin Jansa wrote:
>> > Something like:
>> >
>> > systemd:
>> > inherit update-alternatives
>> > ALTERNATIVE_${PN} = "systemd-def-target"
>> > ALTERNATIVE_TARGET[systemd-def-target] = "${systemd_unitdir}/system/multi-user.target"
>> > ALTERNATIVE_LINK_NAME[systemd-def-target] = "${systemd_unitdir}/systemd/system/default.target"
>> > ALTERNATIVE_PRIORITY[systemd-def-target] ?= "1"
>> >
>> > xserver-nodm-init and DMs:
>> > inherit update-alternatives
>> > ALTERNATIVE_${PN} = "systemd-def-target"
>> > ALTERNATIVE_TARGET[systemd-def-target] = "${systemd_unitdir}/system/graphical.target"
>> > ALTERNATIVE_LINK_NAME[systemd-def-target] = "${systemd_unitdir}/systemd/system/default.target"
>> > ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"
>>
>> Can you make those conditional on the systemd feature so that we don't get complaints from people using something else?
>
> xserver-nodm-init:
> ALTERNATIVE_${PN}-systemd = "systemd-def-target"
>
> And only people which install xserver-nodm-init-system in image will see
> that.
>
>> You could use different names and map them to ALTERNATIVE_* inside systemd.bbclass, assuming/enforcing that everyone who wants to set the default target inherits that class I guess.
>
> I don't understand what you mean.
>
Please let's remember how it started: avoiding a single warning for
missing display-manager.service on console images...

Andreas