mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 08:56:15 +09:00
shared/generator: apply similar config reordering of generated units
This commit is contained in:
@@ -224,6 +224,7 @@ static int write_fsck_sysroot_service(
|
||||
"[Unit]\n"
|
||||
"Description=File System Check on %2$s\n"
|
||||
"Documentation=man:%3$s(8)\n"
|
||||
"\n"
|
||||
"DefaultDependencies=no\n"
|
||||
"BindsTo=%4$s\n"
|
||||
"Conflicts=shutdown.target\n"
|
||||
@@ -517,11 +518,13 @@ int generator_hook_up_mkswap(
|
||||
"[Unit]\n"
|
||||
"Description=Make Swap on %%f\n"
|
||||
"Documentation=man:systemd-mkswap@.service(8)\n"
|
||||
"\n"
|
||||
"DefaultDependencies=no\n"
|
||||
"BindsTo=%%i.device\n"
|
||||
"Conflicts=shutdown.target\n"
|
||||
"After=%%i.device\n"
|
||||
"Before=shutdown.target %s\n"
|
||||
"Before=%s\n"
|
||||
"Conflicts=shutdown.target\n"
|
||||
"Before=shutdown.target\n"
|
||||
"\n"
|
||||
"[Service]\n"
|
||||
"Type=oneshot\n"
|
||||
@@ -602,13 +605,15 @@ int generator_hook_up_mkfs(
|
||||
"[Unit]\n"
|
||||
"Description=Make File System on %%f\n"
|
||||
"Documentation=man:systemd-makefs@.service(8)\n"
|
||||
"\n"
|
||||
"DefaultDependencies=no\n"
|
||||
"BindsTo=%%i.device\n"
|
||||
"Conflicts=shutdown.target\n"
|
||||
"After=%%i.device\n"
|
||||
/* fsck might or might not be used, so let's be safe and order
|
||||
* ourselves before both systemd-fsck@.service and the mount unit. */
|
||||
"Before=shutdown.target %s %s\n"
|
||||
"Before=%s %s\n"
|
||||
"Conflicts=shutdown.target\n"
|
||||
"Before=shutdown.target\n"
|
||||
"\n"
|
||||
"[Service]\n"
|
||||
"Type=oneshot\n"
|
||||
@@ -748,11 +753,12 @@ int generator_write_cryptsetup_unit_section(
|
||||
fprintf(f, "SourcePath=%s\n", source);
|
||||
|
||||
fprintf(f,
|
||||
"\n"
|
||||
"DefaultDependencies=no\n"
|
||||
"IgnoreOnIsolate=true\n"
|
||||
"After=cryptsetup-pre.target systemd-udevd-kernel.socket\n"
|
||||
"Before=blockdev@dev-mapper-%%i.target\n"
|
||||
"Wants=blockdev@dev-mapper-%%i.target\n");
|
||||
"Wants=blockdev@dev-mapper-%%i.target\n"
|
||||
"IgnoreOnIsolate=true\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user