Bug 3816 - systemd: investigate mechanism to change default.target
Summary: systemd: investigate mechanism to change default.target
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.4
Hardware: All Multiple
: Medium normal
Target Milestone: 1.6
Assignee: Chen Qi
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 5441
  Show dependency tree
 
Reported: 2013-01-31 09:37 UTC by Radu Moisan
Modified: 2014-03-10 13:06 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Radu Moisan 2013-01-31 09:37:35 UTC
we need to find a way to set default.target to multi-user or graphical so that it is appropriately set for particular image type (eg. minimal vs sato)
Comment 1 Radu Moisan 2013-04-02 13:50:31 UTC
Proposed solution from Martin:

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"

Sent patch, waiting for review.
Comment 2 Radu Moisan 2013-04-02 13:51:46 UTC
correction, extra systemd in path

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}/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}/system/default.target"
ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"
Comment 3 Radu Moisan 2013-04-09 15:17:50 UTC
we'll have this on hold until we move along with systemd enablement in xserver-nodm-init. We must update xserver-nodm-init as well so we remain consistent among various image targets.
Comment 4 Chen Qi 2014-01-14 06:52:14 UTC
Module: openembedded-core.git
Branch: master
Commit: 049f89155b1e80875aad6e53b21808b827c06915
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=049f89155b1e80875aad6e53b21808b827c06915

//Chen Qi
Comment 5 Stefan Stanacar 2014-03-10 13:06:28 UTC
Verified in 003d3170edaa9472ee46111caa901ac7ddf9321c