From: Yu Watanabe Date: Wed, 26 Jul 2023 00:31:54 +0000 (+0900) Subject: fstab-generator: fix target of /sysroot/usr X-Git-Tag: v254~8^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b93d9e06fc6abbd496ec3fb150a4e01c3b7ec72b;p=thirdparty%2Fsystemd.git fstab-generator: fix target of /sysroot/usr If /usr mount is picked from the main system's fstab file (prefix_sysroot is true, and the path is prefixed as /sysroot/usr), then previously it was installed in the wrong target unit. --- diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index f54fb17065b..218c13ad0c9 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -919,9 +919,9 @@ static int parse_fstab_one( bool is_sysroot_usr = in_initrd() && path_equal(where, "/sysroot/usr"); const char *target_unit = - prefix_sysroot ? SPECIAL_INITRD_FS_TARGET : is_sysroot ? SPECIAL_INITRD_ROOT_FS_TARGET : is_sysroot_usr ? SPECIAL_INITRD_USR_FS_TARGET : + prefix_sysroot ? SPECIAL_INITRD_FS_TARGET : mount_is_network(fstype, options) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;