chiark / gitweb /
container: skip a few things when we are run in a container such as accessing /proc...
[elogind.git] / src / target.c
index e61255c12311f9adc443f385d0d135ed614f1efb..b8d4a01b6448e37aefd5ae6c44f673097ccc9807 100644 (file)
@@ -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;