|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
From 9a36f797debf5f7dd240036a15c6942236c3e649 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
From: Colin Guthrie <colin@mageia.org>
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
Date: Sun, 9 Feb 2014 12:07:11 +0000
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
Subject: [PATCH] fstab-generator: Create fsck-root symlink with correct path
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
This was noticed in Brussels at the hackfest. The fstab-generator currently
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
creates a broken symlink pointing to itself in
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
/run/systemd/generator/local-fs.target.wants/ for systemd-fsck-root.service
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
src/fstab-generator/fstab-generator.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
index 8c4c61c..0d954a2 100644
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
--- a/src/fstab-generator/fstab-generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
+++ b/src/fstab-generator/fstab-generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
@@ -177,7 +177,7 @@ static int add_fsck(FILE *f, const char *what, const char *where, const char *ty
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
lnk = strappenda(arg_dest, "/" SPECIAL_LOCAL_FS_TARGET ".wants/systemd-fsck-root.service");
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
mkdir_parents_label(lnk, 0755);
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
- if (symlink("systemd-fsck-root.service", lnk) < 0) {
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
+ if (symlink(SYSTEM_DATA_UNIT_PATH "/systemd-fsck-root.service", lnk) < 0) {
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
log_error("Failed to create symlink %s: %m", lnk);
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
return -errno;
|
|
Zbigniew Jędrzejewski-Szmek |
ca73a2 |
}
|