Skip to content

Commit b93d9e0

Browse files
committed
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.
1 parent 8f88e57 commit b93d9e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fstab-generator/fstab-generator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,9 +919,9 @@ static int parse_fstab_one(
919919
bool is_sysroot_usr = in_initrd() && path_equal(where, "/sysroot/usr");
920920

921921
const char *target_unit =
922-
prefix_sysroot ? SPECIAL_INITRD_FS_TARGET :
923922
is_sysroot ? SPECIAL_INITRD_ROOT_FS_TARGET :
924923
is_sysroot_usr ? SPECIAL_INITRD_USR_FS_TARGET :
924+
prefix_sysroot ? SPECIAL_INITRD_FS_TARGET :
925925
mount_is_network(fstype, options) ? SPECIAL_REMOTE_FS_TARGET :
926926
SPECIAL_LOCAL_FS_TARGET;
927927

0 commit comments

Comments
 (0)