diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-03-14 23:41:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-14 23:41:47 +0100 |
commit | 2fc9784656900c4dc3715db506096ddc23fdd87c (patch) | |
tree | 206971c3cd2ab712d6be0a2f98fdebe99748f9dc /src/target.c | |
parent | 1f16b4a6c496288aa62dc2ac973f88ca6c801b5d (diff) | |
download | systemd-2fc9784656900c4dc3715db506096ddc23fdd87c.tar.gz systemd-2fc9784656900c4dc3715db506096ddc23fdd87c.tar.bz2 systemd-2fc9784656900c4dc3715db506096ddc23fdd87c.zip |
container: skip a few things when we are run in a container such as accessing /proc/cmdline
Diffstat (limited to 'src/target.c')
-rw-r--r-- | src/target.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/target.c b/src/target.c index e61255c123..b8d4a01b64 100644 --- a/src/target.c +++ b/src/target.c @@ -92,6 +92,9 @@ static int target_add_getty_dependencies(Target *t) { if (!unit_has_name(UNIT(t), SPECIAL_GETTY_TARGET)) return 0; + if (detect_container(NULL) > 0) + return 1; + if (read_one_line_file("/sys/class/tty/console/active", &active) >= 0) { const char *tty; |