mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
nspawn: hide ^] hint unless we are interactive mode
The hotkey only works in interactive mode hence don't mislead users about it.
This commit is contained in:
@@ -5991,10 +5991,12 @@ static int run(int argc, char *argv[]) {
|
||||
_cleanup_free_ char *u = NULL;
|
||||
(void) terminal_urlify_path(t, t, &u);
|
||||
|
||||
log_info("%s %sSpawning container %s on %s.%s\n"
|
||||
"%s %sPress %sCtrl-]%s three times within 1s to kill container.%s",
|
||||
special_glyph(SPECIAL_GLYPH_LIGHT_SHADE), ansi_grey(), arg_machine, u ?: t, ansi_normal(),
|
||||
special_glyph(SPECIAL_GLYPH_LIGHT_SHADE), ansi_grey(), ansi_highlight(), ansi_grey(), ansi_normal());
|
||||
log_info("%s %sSpawning container %s on %s.%s",
|
||||
special_glyph(SPECIAL_GLYPH_LIGHT_SHADE), ansi_grey(), arg_machine, u ?: t, ansi_normal());
|
||||
|
||||
if (arg_console_mode == CONSOLE_INTERACTIVE)
|
||||
log_info("%s %sPress %sCtrl-]%s three times within 1s to kill container.%s",
|
||||
special_glyph(SPECIAL_GLYPH_LIGHT_SHADE), ansi_grey(), ansi_highlight(), ansi_grey(), ansi_normal());
|
||||
}
|
||||
|
||||
assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGCHLD, SIGWINCH, SIGTERM, SIGINT, SIGRTMIN+18) >= 0);
|
||||
|
||||
Reference in New Issue
Block a user