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

Colin Guthrie mageia at colin.guthr.ie
Thu May 3 11:33:54 CEST 2012


'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) :)

I can help write this unit if you like?

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.

Col

-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the Mageia-dev mailing list