diff options
author | Topi Miettinen <toiwoton@gmail.com> | 2020-03-09 14:01:06 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-26 14:32:02 +0100 |
commit | 9cc3267bd1245bde0ee8d0955b575af6a5ac68a3 (patch) | |
tree | 99919dee40f2a361ca5cfca92021fd02fb36050e | |
parent | 1a4d6e5c6bffaf2206d5caf6899a0f57efe83c74 (diff) | |
download | systemd-9cc3267bd1245bde0ee8d0955b575af6a5ac68a3.tar.gz |
dissect-image: avoid scanning partitions
In case the dissected image has a filesystem, don't scan for partitions. This
avoids problems with services using a `RootImage=` in early boot when udevd is
not yet started.
(cherry picked from commit 0108c42f59dd5848f6b561f260dc6ff3e19d651b)
(cherry picked from commit 98f8a718c161d45b0001ee68f2ec7d111da79397)
(cherry picked from commit 9de06cd65af80173140989b0b8338fe7411bf488)
-rw-r--r-- | src/shared/dissect-image.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index a54714169e..abbe47e9ea 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -392,10 +392,11 @@ int dissect_image( m->encrypted = streq_ptr(fstype, "crypto_LUKS"); - r = loop_wait_for_partitions_to_appear(fd, d, 0, flags, &e); - if (r < 0) - return r; - + if (!streq(usage, "filesystem")) { + r = loop_wait_for_partitions_to_appear(fd, d, 0, flags, &e); + if (r < 0) + return r; + } *ret = TAKE_PTR(m); return 0; |