Skip to content

Commit

Permalink
core: use SPECIAL_DEFAULT_TARGET more
Browse files Browse the repository at this point in the history
  • Loading branch information
keszybz committed Nov 28, 2019
1 parent 6da498c commit fe7a6da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/run-generator/run-generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "generator.h"
#include "mkdir.h"
#include "proc-cmdline.h"
#include "special.h"
#include "specifier.h"
#include "strv.h"

Expand Down Expand Up @@ -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);

Expand Down
3 changes: 2 additions & 1 deletion src/sulogin-shell/sulogin-shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit fe7a6da

Please sign in to comment.