chiark / gitweb /
fstab-generator: Create fsck-root symlink with correct path
authorColin Guthrie <colin@mageia.org>
Sun, 9 Feb 2014 12:07:11 +0000 (12:07 +0000)
committerTom Gundersen <teg@jklm.no>
Mon, 10 Feb 2014 10:59:07 +0000 (11:59 +0100)
This was noticed in Brussels at the hackfest. The fstab-generator currently
creates a broken symlink pointing to itself in
/run/systemd/generator/local-fs.target.wants/ for systemd-fsck-root.service

src/fstab-generator/fstab-generator.c

index 5480e54b4ea87073d7b13f853e20dbc4056c22a8..0336888b0207e63aaa4e61448f5c8aee9074e50d 100644 (file)
@@ -176,7 +176,7 @@ static int add_fsck(FILE *f, const char *what, const char *where, const char *ty
 
                 lnk = strappenda(arg_dest, "/" SPECIAL_LOCAL_FS_TARGET ".wants/systemd-fsck-root.service");
                 mkdir_parents_label(lnk, 0755);
-                if (symlink("systemd-fsck-root.service", lnk) < 0) {
+                if (symlink(SYSTEM_DATA_UNIT_PATH "/systemd-fsck-root.service", lnk) < 0) {
                         log_error("Failed to create symlink %s: %m", lnk);
                         return -errno;
                 }