diff options
author | Franck Bui <fbui@suse.com> | 2016-06-24 16:08:43 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-06-24 16:08:43 +0200 |
commit | 6edefe0b064e57af108f56172b3dafa0be61e234 (patch) | |
tree | 74b9670ce814a3d039637074177f088d6811e73f /src | |
parent | 3efb871a3ca0786acdd8b5c040d83cac2a64d875 (diff) |
pid1: restore console color support for containers (#3595)
Commit 3a18b60489504056f9b0b1a139439cbfa60a87e1 introduced a regression that
disabled the color mode for container.
This patch fixes this.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/main.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/main.c b/src/core/main.c index 237c9c9ebe..3d74ef1adf 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1507,13 +1507,14 @@ int main(int argc, char *argv[]) { (void) write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", 0); } - /* We expect the environment to be set correctly if run inside a - * container. */ - if (arg_system && detect_container() <= 0) { - if (fixup_environment() < 0) { - error_message = "Failed to fix up PID1 environment"; - goto finish; - } + if (arg_system) { + /* We expect the environment to be set correctly + * if run inside a container. */ + if (detect_container() <= 0) + if (fixup_environment() < 0) { + error_message = "Failed to fix up PID1 environment"; + goto finish; + } /* Try to figure out if we can use colors with the console. No * need to do that for user instances since they never log |