- if (asprintf(&path, "%s/%s.wants/%s", config_path, *s, i->name) < 0)
+ if (asprintf(&path, "%s/%s.wants/%s", config_path, dst, i->name) < 0)
+ return -ENOMEM;
+
+ q = create_symlink(i->path, path, force, changes, n_changes);
+
+ if (r == 0)
+ r = q;
+ }
+
+ return r;
+}
+
+static int install_info_symlink_requires(
+ InstallInfo *i,
+ const char *config_path,
+ bool force,
+ UnitFileChange **changes,
+ unsigned *n_changes) {
+
+ char **s;
+ int r = 0, q;
+
+ assert(i);
+ assert(config_path);
+
+ STRV_FOREACH(s, i->required_by) {
+ char _cleanup_free_ *path = NULL, *dst = NULL;
+
+ dst = install_full_printf(i, *s);
+ if (!dst)
+ return -ENOMEM;
+
+ if (!unit_name_is_valid(dst, true)) {
+ r = -EINVAL;
+ continue;
+ }
+
+ if (asprintf(&path, "%s/%s.requires/%s", config_path, dst, i->name) < 0)