summaryrefslogtreecommitdiff
path: root/src/vconsole-setup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-14 23:41:47 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-14 23:41:47 +0100
commit2fc9784656900c4dc3715db506096ddc23fdd87c (patch)
tree206971c3cd2ab712d6be0a2f98fdebe99748f9dc /src/vconsole-setup.c
parent1f16b4a6c496288aa62dc2ac973f88ca6c801b5d (diff)
container: skip a few things when we are run in a container such as accessing /proc/cmdline
Diffstat (limited to 'src/vconsole-setup.c')
-rw-r--r--src/vconsole-setup.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/vconsole-setup.c b/src/vconsole-setup.c
index 5b977126fa..29ce7be77e 100644
--- a/src/vconsole-setup.c
+++ b/src/vconsole-setup.c
@@ -176,21 +176,22 @@ int main(int argc, char **argv) {
utf8 = is_locale_utf8();
- if ((r = parse_env_file("/proc/cmdline", WHITESPACE,
+ if (detect_virtualization(NULL) <= 0)
+ if ((r = parse_env_file("/proc/cmdline", WHITESPACE,
#ifdef TARGET_FEDORA
- "SYSFONT", &vc_font,
- "KEYTABLE", &vc_keymap,
+ "SYSFONT", &vc_font,
+ "KEYTABLE", &vc_keymap,
#endif
- "vconsole.keymap", &vc_keymap,
- "vconsole.keymap.toggle", &vc_keymap_toggle,
- "vconsole.font", &vc_font,
- "vconsole.font.map", &vc_font_map,
- "vconsole.font.unimap", &vc_font_unimap,
- NULL)) < 0) {
+ "vconsole.keymap", &vc_keymap,
+ "vconsole.keymap.toggle", &vc_keymap_toggle,
+ "vconsole.font", &vc_font,
+ "vconsole.font.map", &vc_font_map,
+ "vconsole.font.unimap", &vc_font_unimap,
+ NULL)) < 0) {
- if (r != -ENOENT)
- log_warning("Failed to read /proc/cmdline: %s", strerror(-r));
- }
+ if (r != -ENOENT)
+ log_warning("Failed to read /proc/cmdline: %s", strerror(-r));
+ }
/* Hmm, nothing set on the kernel cmd line? Then let's
* try /etc/vconsole.conf */