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

Ross Burton
2013-01-25T20:36:49Z

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?

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.

Ross