Use SPECIAL_DEFAULT_TARGET consistently
This commit is contained in:
parent
c73838280c
commit
075dafd204
|
@ -22,12 +22,12 @@
|
|||
|
||||
#include "fs-util.h"
|
||||
#include "log.h"
|
||||
#include "special.h"
|
||||
#include "string-util.h"
|
||||
#include "util.h"
|
||||
|
||||
/*
|
||||
* Implements the logic described in
|
||||
* http://freedesktop.org/wiki/Software/systemd/SystemUpdates
|
||||
* Implements the logic described in systemd.offline-updates(7).
|
||||
*/
|
||||
|
||||
static const char *arg_dest = "/tmp";
|
||||
|
@ -43,7 +43,7 @@ static int generate_symlink(void) {
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
p = strjoina(arg_dest, "/default.target");
|
||||
p = strjoina(arg_dest, "/" SPECIAL_DEFAULT_TARGET);
|
||||
if (symlink(SYSTEM_DATA_UNIT_PATH "/system-update.target", p) < 0)
|
||||
return log_error_errno(errno, "Failed to create symlink %s: %m", p);
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "install.h"
|
||||
#include "mkdir.h"
|
||||
#include "rm-rf.h"
|
||||
#include "special.h"
|
||||
#include "string-util.h"
|
||||
|
||||
static void test_basic_mask_and_enable(const char *root) {
|
||||
|
@ -338,7 +339,7 @@ static void test_default(const char *root) {
|
|||
assert_se(n_changes == 1);
|
||||
assert_se(changes[0].type == UNIT_FILE_SYMLINK);
|
||||
assert_se(streq(changes[0].source, "/usr/lib/systemd/system/test-default-real.target"));
|
||||
p = strjoina(root, SYSTEM_CONFIG_UNIT_PATH"/default.target");
|
||||
p = strjoina(root, SYSTEM_CONFIG_UNIT_PATH "/" SPECIAL_DEFAULT_TARGET);
|
||||
assert_se(streq(changes[0].path, p));
|
||||
unit_file_changes_free(changes, n_changes);
|
||||
changes = NULL; n_changes = 0;
|
||||
|
|
Loading…
Reference in a new issue