[OE-core] [PATCH v4] systemd: set default.target to multi-user.target

Burton, Ross ross.burton at intel.com
Wed Apr 3 14:15:48 UTC 2013


Hi,

On 2 April 2013 15:15, Samuel Stirtzel <s.stirtzel at googlemail.com> wrote:
>>>> For xserver-nodm-init we would then have something like:
>>>> 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}/system/default.target"
>>>> ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"
>>>>
>>>> Signed-off-by: Radu Moisan <radu.moisan at intel.com>

This really needs to be a series of two patches, with this change
implemented too.

> To comment on this change:
> A developer would expect that a system (hardware or software) behaves
> in a specific matter (the default behavior).
> By changing the default, the system behavior is undefined (as the
> default behavior was changed).

The behaviour is not undefined, it's perfectly clear - the default
target is multi-user unless changed, and by patching the X startup
recipes in oe-core and meta-oe we handle the majority of cases.

> As alternative of changing the default I would propose that a
> specialization overrides this symlink where needed, and the
> generalization stays unchanged (like OOP inheritance).
> Therefore a specialization would be image configurations or
> postinstall appends for images that have no need for the graphical
> user target.

How would you implement this?  Register the alternative in systemd.bb
defaulting to graphical, and then switch it in every image recipe in
oe-core/meta-oe/etc that doesn't use an X or Wayland (patches coming
shortly) session?

The bigger question to me is how to handle the alternative in a way
that doesn't create the symlink if we're not using systemd.

Ross




More information about the Openembedded-core mailing list