1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

core: use SPECIAL_DEFAULT_TARGET more

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-11-28 09:13:45 +01:00
parent 6da498c28f
commit fe7a6da8c5
2 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,7 @@
#include "generator.h"
#include "mkdir.h"
#include "proc-cmdline.h"
#include "special.h"
#include "specifier.h"
#include "strv.h"
@ -116,7 +117,7 @@ static int generate(void) {
return log_error_errno(r, "Failed to create unit file %s: %m", p);
/* And now redirect default.target to our new target */
p = strjoina(arg_dest, "/default.target");
p = strjoina(arg_dest, "/" SPECIAL_DEFAULT_TARGET);
if (symlink("kernel-command-line.target", p) < 0)
return log_error_errno(errno, "Failed to link unit file kernel-command-line.target → %s: %m", p);

View File

@ -14,6 +14,7 @@
#include "process-util.h"
#include "sd-bus.h"
#include "signal-util.h"
#include "special.h"
static int reload_manager(sd_bus *bus) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
@ -57,7 +58,7 @@ static int start_default_target(sd_bus *bus) {
"StartUnit",
&error,
NULL,
"ss", "default.target", "isolate");
"ss", SPECIAL_DEFAULT_TARGET, "isolate");
if (r < 0)
return log_error_errno(r, "Failed to start default target: %s", bus_error_message(&error, r));