nspawn: tint the terminal bg blue if we are in a container
Let's give people a hint that they are not operating on the host.
This commit is contained in:
+9
-1
@@ -5355,7 +5355,15 @@ static int run_container(
|
||||
arg_console_width,
|
||||
arg_console_height);
|
||||
|
||||
if (!isempty(arg_background))
|
||||
if (!arg_background) {
|
||||
_cleanup_free_ char *bg = NULL;
|
||||
|
||||
r = terminal_tint_color(220 /* blue */, &bg);
|
||||
if (r < 0)
|
||||
log_debug_errno(r, "Failed to determine terminal background color, not tinting.");
|
||||
else
|
||||
(void) pty_forward_set_background_color(forward, bg);
|
||||
} else if (!isempty(arg_background))
|
||||
(void) pty_forward_set_background_color(forward, arg_background);
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user