extract console redirection stuff from "quit" function
so we can use it for scripts that don't reboot at their end
This commit is contained in:
parent
7c9297f91d
commit
a202ae476a
1 changed files with 12 additions and 9 deletions
|
@ -94,17 +94,20 @@ let
|
|||
};
|
||||
".s6-svscan" =
|
||||
let
|
||||
openConsole = ''
|
||||
#!${execline}/bin/execlineb -P
|
||||
${execline}/bin/redirfd -w 2 /dev/console
|
||||
${execline}/bin/fdmove -c 1 2
|
||||
'';
|
||||
quit = message: ''
|
||||
#!${execline}/bin/execlineb -P
|
||||
${execline}/bin/redirfd -w 2 /dev/console
|
||||
${execline}/bin/fdmove -c 1 2
|
||||
${execline}/bin/foreground { ${s6-linux-init}/bin/s6-linux-init-echo -- ${message} }
|
||||
${s6-linux-init}/bin/s6-linux-init-hpr -fr
|
||||
'';
|
||||
${openConsole}
|
||||
${execline}/bin/foreground { ${s6-linux-init}/bin/s6-linux-init-echo -- ${message} }
|
||||
${s6-linux-init}/bin/s6-linux-init-hpr -fr
|
||||
'';
|
||||
shutdown = action: ''
|
||||
#!${execline}/bin/execlineb -P
|
||||
${s6-linux-init}/bin/s6-linux-init-shutdown -a #{action} -- now
|
||||
'';
|
||||
#!${execline}/bin/execlineb -P
|
||||
${s6-linux-init}/bin/s6-linux-init-shutdown -a #{action} -- now
|
||||
'';
|
||||
empty = "#!${execline}/bin/execlineb -P\n";
|
||||
in dir {
|
||||
crash = {
|
||||
|
|
Loading…
Reference in a new issue