1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00

cryptsetup-generator: avoid ordering cycle on swap

Devices with random keys (swap), should not be ordered before local-fs.target,
as this creates a cycle with systemd-load-random-seed.service (and also it
does not make sense, a swap device is not a local-fs).
This commit is contained in:
Tom Gundersen 2011-10-17 13:01:08 +02:00 committed by Lennart Poettering
parent fc8f0b5c9c
commit 87e75fddbb

View File

@ -112,8 +112,7 @@ static int create_disk(
"DefaultDependencies=no\n"
"BindTo=%s dev-mapper-%%i.device\n"
"After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n"
"Before=umount.target\n"
"Before=local-fs.target\n",
"Before=umount.target\n",
d, d);
if (!nofail)
@ -125,6 +124,9 @@ static int create_disk(
streq(password, "/dev/hw_random")))
fprintf(f,
"After=systemd-random-seed-load.service\n");
else
fprintf(f,
"Before=local-fs.target\n");
fprintf(f,
"\n[Service]\n"