chiark / gitweb /
os-release: define /usr/lib/os-release as fallback for /etc/os-release
[elogind.git] / src / journal / journal-gatewayd.c
index 9a88676242a927f66e9414d9734c841835acf04f..c682666a22c72a7542fe4a37e9230576c816d62a 100644 (file)
@@ -767,7 +767,8 @@ static int request_handler_machine(
         if (r < 0)
                 return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to determine disk usage: %s\n", strerror(-r));
 
-        parse_env_file("/etc/os-release", NEWLINE, "PRETTY_NAME", &os_name, NULL);
+        if (parse_env_file("/etc/os-release", NEWLINE, "PRETTY_NAME", &os_name, NULL) == -ENOENT)
+                parse_env_file("/usr/lib/os-release", NEWLINE, "PRETTY_NAME", &os_name, NULL);
 
         get_virtualization(&v);