Skip to content

Commit 956eaf2

Browse files
committed
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.
1 parent 69af450 commit 956eaf2

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/core/mount-setup.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,8 @@ static int nftw_cb(
350350
};
351351

352352
int mount_setup(bool loaded_policy) {
353-
354-
static const char relabel[] =
355-
"/run/initramfs/root-fsck\0"
356-
"/run/initramfs/shutdown\0";
357-
358353
int r;
359354
unsigned i;
360-
const char *j;
361355

362356
for (i = 0; i < ELEMENTSOF(mount_table); i ++) {
363357
r = mount_one(mount_table + i, true);
@@ -379,10 +373,6 @@ int mount_setup(bool loaded_policy) {
379373
nftw("/dev", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
380374
nftw("/run", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
381375

382-
/* Explicitly relabel these */
383-
NULSTR_FOREACH(j, relabel)
384-
label_fix(j, true, false);
385-
386376
after_relabel = now(CLOCK_MONOTONIC);
387377

388378
log_info("Relabelled /dev and /run in %s.",

units/systemd-fsck-root.service.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ DefaultDependencies=no
1212
After=systemd-readahead-collect.service systemd-readahead-replay.service
1313
Before=local-fs.target shutdown.target
1414

15-
# Dracut informs us with this flag file if the root fsck was already run
16-
ConditionPathExists=!/run/initramfs/root-fsck
1715
ConditionPathIsReadWrite=!/
1816

1917
[Service]

0 commit comments

Comments
 (0)