[systemd-commits] 2 commits - src/core units/systemd-fsck-root.service.in

Harald Hoyer harald at kemper.freedesktop.org
Wed Jul 17 02:35:41 PDT 2013


 src/core/main.c                    |   25 -------------------------
 src/core/mount-setup.c             |   10 ----------
 units/systemd-fsck-root.service.in |    2 --
 3 files changed, 37 deletions(-)

New commits:
commit c72aadd1851096ea979f68b4e32cca71746ccdc4
Author: Harald Hoyer <harald at redhat.com>
Date:   Wed Jul 17 11:27:32 2013 +0200

    remove RD_TIMESTAMP import
    
    If you want timing information from the initramfs, use systemd in the
    initramfs.

diff --git a/src/core/main.c b/src/core/main.c
index 7493975..77cdcfe 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1145,25 +1145,6 @@ static int bump_rlimit_nofile(struct rlimit *saved_rlimit) {
         return 0;
 }
 
-static struct dual_timestamp* parse_initrd_timestamp(struct dual_timestamp *t) {
-        const char *e;
-        unsigned long long a, b;
-
-        assert(t);
-
-        e = getenv("RD_TIMESTAMP");
-        if (!e)
-                return NULL;
-
-        if (sscanf(e, "%llu %llu", &a, &b) != 2)
-                return NULL;
-
-        t->realtime = (usec_t) a;
-        t->monotonic = (usec_t) b;
-
-        return t;
-}
-
 static void test_mtab(void) {
         char *p;
 
@@ -1484,12 +1465,6 @@ int main(int argc, char *argv[]) {
                arg_running_as == SYSTEMD_SYSTEM);
 
         if (arg_running_as == SYSTEMD_SYSTEM) {
-                /* Parse the data passed to us. We leave this
-                 * variables set, but the manager later on will not
-                 * pass them on to our children. */
-                if (!in_initrd())
-                        parse_initrd_timestamp(&initrd_timestamp);
-
                 /* Unset some environment variables passed in from the
                  * kernel that don't really make sense for us. */
                 unsetenv("HOME");

commit 956eaf2b8d6c9999024705ddadc7393bc707de02
Author: Harald Hoyer <harald at redhat.com>
Date:   Wed Jul 17 11:19:39 2013 +0200

    remove /run/initramfs/root-fsck logic
    
    dracut uses systemd in the initramfs and does not write these files
    anymore.
    
    The state of the root fsck is serialized.

diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 4629808..4359f59 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -350,14 +350,8 @@ static int nftw_cb(
 };
 
 int mount_setup(bool loaded_policy) {
-
-        static const char relabel[] =
-                "/run/initramfs/root-fsck\0"
-                "/run/initramfs/shutdown\0";
-
         int r;
         unsigned i;
-        const char *j;
 
         for (i = 0; i < ELEMENTSOF(mount_table); i ++) {
                 r = mount_one(mount_table + i, true);
@@ -379,10 +373,6 @@ int mount_setup(bool loaded_policy) {
                 nftw("/dev", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
                 nftw("/run", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
 
-                /* Explicitly relabel these */
-                NULSTR_FOREACH(j, relabel)
-                        label_fix(j, true, false);
-
                 after_relabel = now(CLOCK_MONOTONIC);
 
                 log_info("Relabelled /dev and /run in %s.",
diff --git a/units/systemd-fsck-root.service.in b/units/systemd-fsck-root.service.in
index ef5123f..563129b 100644
--- a/units/systemd-fsck-root.service.in
+++ b/units/systemd-fsck-root.service.in
@@ -12,8 +12,6 @@ DefaultDependencies=no
 After=systemd-readahead-collect.service systemd-readahead-replay.service
 Before=local-fs.target shutdown.target
 
-# Dracut informs us with this flag file if the root fsck was already run
-ConditionPathExists=!/run/initramfs/root-fsck
 ConditionPathIsReadWrite=!/
 
 [Service]



More information about the systemd-commits mailing list