[systemd-devel] [PATCH] preset-transient

Dimitri John Ledkov dimitri.j.ledkov at intel.com
Thu Feb 12 03:05:18 PST 2015


On 11 February 2015 at 20:51, Lennart Poettering <lennart at poettering.net> wrote:
> On Fri, 06.02.15 20:28, Dimitri John Ledkov (dimitri.j.ledkov at intel.com) wrote:
>
>> > Hum, we told at the sprint that we wanted to be that available for everyone,
>> > and not having any conditions. Distros which still desires only the existing
>> > behavior would not ship files in *-preset-transient directories.
>>
>> Running any presets commands unconditionally, without any preset
>> configuration is harmful.
>> Prime example, if one doesn't ship any .preset (even the one that
>> comes with systemd) shutdown.target gets activated and all that system
>> does on boot is going to shutdown straight away.
>
> Hmm, not following? Can you elaborate?
>

With this patch, (as is, without taking all of the above mentioned feedback)
AND
transient-presets enabled via config option
AND
no .preset files shipped at all for neither of preset types
AND
no machine-id

.... one will not be able to boot =) i guess, this only points
stronger to "distro should be configured sanely" and this is not a
toggle to play with.

(It seems like, after "enable *" a few things are enabled - e.g.
debug-shell.service console-shell.service, the boot reaches multiuser
target and one sees maintainance prompt, after which the system goes
to poweroff. I'm not quite sure how to debug this better, but my
suspicion is that console-shell is stopped, which has
ExecStopPost=-/usr/bin/systemctl poweroff. Maybe this is simply a bug
in some of the default units. Is "enable *" alone default policy
actually supported?)

>> > Right now, I think that we shouldn't have a configuration flag for it, this
>> > should apply (as stated above) to any setup, and distros can opt in or out
>> > just by shipping those transient preset files.
>> >
>>
>> Well, I understood, that we should allow both distros and user to
>> opt-into either or both. Plus to successfully use transient-presets,
>> one needs regular presets configured in concert as otherwise things go
>> haywire as you have noted.
>
> Why would this be a user choice at all? This appears to be strictly a
> distro choice to me...

Yeah, I don't have a compeling argument here. User may want to extend
or tweak the distro-integration via e.g. /etc/systemd/system-presets |
transient-system-presets, but indeed I do not see why they would want
to use these functionalities if the distro didn't provide any sane
integration for any type of presets.


-- 
Regards,

Dimitri.

Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ.


More information about the systemd-devel mailing list