chiark / gitweb /
log: read log settings from the environment
[elogind.git] / mount-setup.c
index 5a2e89af7c8fa25f456094b090399b5a008f2eeb..c6a471237be8783a46bcb46965e807545bd511e9 100644 (file)
@@ -39,12 +39,12 @@ enum {
 };
 
 static const char *table[] = {
-        "/proc",  "/proc",         "proc",     "rw",
-        "/sys",   "/sys",          "sysfs",    "rw",
-        "udev",   "/dev",          "devtmpfs", "rw",
-        "tmpfs",  "/dev/shm",      "tmpfs",    "rw",
-        "devpts", "/dev/pts",      "devpts",   "rw",
-        "cgroup", "/cgroup/debug", "cgroup",   "debug",
+        "proc",    "/proc",         "proc",     "rw",
+        "sysfs",   "/sys",          "sysfs",    "rw",
+        "devtmps", "/dev",          "devtmpfs", "mode=755",
+        "tmpfs",   "/dev/shm",      "tmpfs",    "mode=1777",
+        "devpts",  "/dev/pts",      "devpts",   "rw",
+        "cgroup",  "/cgroup/debug", "cgroup",   "debug",
         NULL
 };
 
@@ -85,6 +85,10 @@ static int mount_one(const char *t[]) {
         if (r > 0)
                 return 0;
 
+        /* The access mode here doesn't really matter too much, since
+         * the mounted file system will take precedence anyway. */
+        mkdir(t[MOUNT_WHERE], 0755);
+
         log_debug("Mounting %s to %s of type %s with options %s.",
                   t[MOUNT_WHAT],
                   t[MOUNT_WHERE],