]> git.pld-linux.org Git - packages/systemd.git/blob - initrd-fstab-generator.patch
initrd-fstab-generator.patchfix fstab-generator for dracut
[packages/systemd.git] / initrd-fstab-generator.patch
1 From c7b2630c9154722e2295f3dbfbb19f3305676ecf Mon Sep 17 00:00:00 2001
2 From: Harald Hoyer <harald@redhat.com>
3 Date: Thu, 20 Jul 2017 13:38:46 +0200
4 Subject: [PATCH] call chase_symlinks without the /sysroot prefix
5
6 In case fstab-generator is called in the initrd, chase_symlinks()
7 returns with a canonical path "/sysroot/sysroot/<mountpoint>", if the
8 "/sysroot" prefix is present in the path.
9
10 This patch skips the "/sysroot" prefix for the chase_symlinks() call,
11 because "/sysroot" is already the root directory and chase_symlinks()
12 prepends the root directory in the canonical path returned.
13 ---
14  src/fstab-generator/fstab-generator.c | 2 +-
15  1 file changed, 1 insertion(+), 1 deletion(-)
16
17 diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
18 index ea5ceb39ca..8fc4c8d179 100644
19 --- a/src/fstab-generator/fstab-generator.c
20 +++ b/src/fstab-generator/fstab-generator.c
21 @@ -526,7 +526,7 @@ static int parse_fstab(bool initrd) {
22                          continue;
23                  }
24  
25 -                where = initrd ? strappend("/sysroot/", me->mnt_dir) : strdup(me->mnt_dir);
26 +                where = strdup(me->mnt_dir);
27                  if (!where)
28                          return log_oom();
29  
This page took 0.02914 seconds and 3 git commands to generate.