1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-26 17:25:34 +03:00

generator: order growfs for the root fs after systemd-remount-fs

Fixes: #14603
(cherry picked from commit 18e6e8635f)
This commit is contained in:
Lennart Poettering 2020-01-21 10:40:18 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent e990499821
commit d7ede1ade5

View File

@ -493,15 +493,21 @@ int generator_hook_up_growfs(
"BindsTo=%%i.mount\n"
"Conflicts=shutdown.target\n"
"After=%%i.mount\n"
"Before=shutdown.target %s\n"
"Before=shutdown.target %s\n",
program_invocation_short_name,
target);
if (empty_or_root(where)) /* Make sure the root fs is actually writable before we resize it */
fprintf(f,
"After=systemd-remount-fs.service\n");
fprintf(f,
"\n"
"[Service]\n"
"Type=oneshot\n"
"RemainAfterExit=yes\n"
"ExecStart="SYSTEMD_GROWFS_PATH " %s\n"
"TimeoutSec=0\n",
program_invocation_short_name,
target,
escaped);
return generator_add_symlink(dir, where_unit, "wants", unit);