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:
Daniel Barlow 2023-11-21 23:27:20 +00:00
parent 7c9297f91d
commit a202ae476a

View file

@ -94,10 +94,13 @@ let
};
".s6-svscan" =
let
quit = message: ''
openConsole = ''
#!${execline}/bin/execlineb -P
${execline}/bin/redirfd -w 2 /dev/console
${execline}/bin/fdmove -c 1 2
'';
quit = message: ''
${openConsole}
${execline}/bin/foreground { ${s6-linux-init}/bin/s6-linux-init-echo -- ${message} }
${s6-linux-init}/bin/s6-linux-init-hpr -fr
'';