chiark / gitweb /
container: skip a few things when we are run in a container such as accessing /proc...
[elogind.git] / src / quotacheck.c
index da2da3b..057d861 100644 (file)
@@ -35,6 +35,9 @@ static int parse_proc_cmdline(void) {
         int r;
         size_t l;
 
         int r;
         size_t l;
 
+        if (detect_virtualization(NULL) > 0)
+                return 0;
+
         if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
                 log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
                 return 0;
         if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
                 log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
                 return 0;