core: use SPECIAL_DEFAULT_TARGET more
This commit is contained in:
parent
6da498c28f
commit
fe7a6da8c5
|
@ -9,6 +9,7 @@
|
||||||
#include "generator.h"
|
#include "generator.h"
|
||||||
#include "mkdir.h"
|
#include "mkdir.h"
|
||||||
#include "proc-cmdline.h"
|
#include "proc-cmdline.h"
|
||||||
|
#include "special.h"
|
||||||
#include "specifier.h"
|
#include "specifier.h"
|
||||||
#include "strv.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);
|
return log_error_errno(r, "Failed to create unit file %s: %m", p);
|
||||||
|
|
||||||
/* And now redirect default.target to our new target */
|
/* 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)
|
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);
|
return log_error_errno(errno, "Failed to link unit file kernel-command-line.target → %s: %m", p);
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "process-util.h"
|
#include "process-util.h"
|
||||||
#include "sd-bus.h"
|
#include "sd-bus.h"
|
||||||
#include "signal-util.h"
|
#include "signal-util.h"
|
||||||
|
#include "special.h"
|
||||||
|
|
||||||
static int reload_manager(sd_bus *bus) {
|
static int reload_manager(sd_bus *bus) {
|
||||||
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
|
_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",
|
"StartUnit",
|
||||||
&error,
|
&error,
|
||||||
NULL,
|
NULL,
|
||||||
"ss", "default.target", "isolate");
|
"ss", SPECIAL_DEFAULT_TARGET, "isolate");
|
||||||
|
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to start default target: %s", bus_error_message(&error, r));
|
return log_error_errno(r, "Failed to start default target: %s", bus_error_message(&error, r));
|
||||||
|
|
Loading…
Reference in a new issue