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

Radu Moisan radu.moisan at intel.com
Mon Jan 28 09:41:19 UTC 2013


On 01/25/2013 05:10 PM, Richard Purdie wrote:
> On Fri, 2013-01-25 at 15:04 +0000, Burton, Ross wrote:
>> On 25 January 2013 14:59, Radu Moisan <radu.moisan at intel.com> wrote:
>>> +# "multi-user" vs "graphical"
>>> +SYSTEMD_DEFAULT_TARGET ?= "multi-user"
>> Default to "graphical", so we're not regressing and just introducing a
>> warning if someone doesn't set this and doesn't have X.
>>
>>> @@ -95,6 +95,11 @@ do_install() {
>>>          install -m 0644 ${WORKDIR}/var-run.conf ${D}${sysconfdir}/tmpfiles.d/
>>>
>>>          install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
>>> +
>>> +
>>> +       if [ -n ${SYSTEMD_DEFAULT_TARGET} ]; then
>>> +               ln -s ${systemd_unitdir}/system/${SYSTEMD_DEFAULT_TARGET}.target ${D}${sysconfdir}/systemd/system/default.target
>>> +       fi
>> This will have to happen at image construction time and not package
>> generation time, as different images may have different targets but
>> share the same systemd package.
>>
>> A rootfs-time postinstall script would work, but isn't very nice.  I
>> wonder if there's a better solution, hooking into the image creation
>> should work.
>>
>> (thinks)
> The point here is that images shouldn't give errors at runtime. Nothing
> above does anything to address that.

I don't understand what you mean. The patch addresses exactly that, 
warning at runtime, to be more specific the warning about 
display-manager.service
However though, I understand the issues with this approach, so I'll dig 
a little more into Martin's approach with update-alternatives.

Radu




More information about the Openembedded-core mailing list