[Mageia-dev] [soft-commits] [4379] fix shutting down

Thomas Backlund tmb at mageia.org
Thu May 3 11:45:38 CEST 2012


Colin Guthrie skrev 3.5.2012 12:33:
> 'Twas brillig, and Thierry Vignaud at 03/05/12 09:05 did gyre and gimble:
>> On 3 May 2012 09:53, Guillaume Rousse<guillomovitch at gmail.com>  wrote:
>>>> please use system("/usr/bin/chvt", "1"), or system(qw(/usr/bin/chvt 1))
>>>> instead in order to not fork useless shells.
>>>
>>> and kill is a perl builtin perl too:
>>> kill SIGRTMAX-10, 1
>>
>> needs 'use POSIX;' though for symbolic values
>
> Actually none of the above. Please do it in the systemd unit itself with
> ExecStartPre as this actually fixes the issues, whereas the internal
> approach does not (at least in my tests) :)
>

It seemed to work in vbox, but I'll retest the isos currently building

> I can help write this unit if you like?
>

Feel free to do so.

> In actual fact, this shut down script could be something that the
> mgalive dracut module drops into /run/systemd/systemd. This would
> prevent any poking at the installed file system and maybe allows for
> easier hacking - i.e. no need to actually edit the squashfs filesystem
> to tweak certain things.
>

What/how should this look like ?

--
Thomas



More information about the Mageia-dev mailing list