~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to src/core/mount-setup.c

Tags: upstream-202
ImportĀ upstreamĀ versionĀ 202

Show diffs side-by-side

added added

removed removed

Lines of Context:
315
315
                p.type = "cgroup";
316
316
                p.options = options;
317
317
                p.flags = MS_NOSUID|MS_NOEXEC|MS_NODEV;
 
318
                p.mode = MNT_IN_CONTAINER;
318
319
 
319
320
                r = mount_one(&p, true);
320
321
                free(controller);
422
423
                after_relabel = now(CLOCK_MONOTONIC);
423
424
 
424
425
                log_info("Relabelled /dev and /run in %s.",
425
 
                         format_timespan(timespan, sizeof(timespan), after_relabel - before_relabel));
 
426
                         format_timespan(timespan, sizeof(timespan), after_relabel - before_relabel, 0));
426
427
        }
427
428
 
428
429
        /* Create a few default symlinks, which are normally created
440
441
                if (mount(NULL, "/", NULL, MS_REC|MS_SHARED, NULL) < 0)
441
442
                        log_warning("Failed to set up the root directory for shared mount propagation: %m");
442
443
 
443
 
        /* Create a few directories we always want around */
 
444
        /* Create a few directories we always want around, Note that
 
445
         * sd_booted() checks for /run/systemd/system, so this mkdir
 
446
         * really needs to stay for good, otherwise software that
 
447
         * copied sd-daemon.c into their sources will misdetect
 
448
         * systemd. */
444
449
        mkdir_label("/run/systemd", 0755);
445
450
        mkdir_label("/run/systemd/system", 0755);
 
451
        mkdir_label("/run/systemd/inaccessible", 0000);
446
452
 
447
453
        return 0;
448
454
}