chiark / gitweb /
path-lookup: make SYSTEMD_UNIT_PATH more flexible
[elogind.git] / src / core / unit.c
index 0e4ebfde9bc37bdfd8a7bd6df1ebb30ce25ebcf3..b68796a9414a4acc6009e471e264d2e24e19ae1a 100644 (file)
@@ -2165,11 +2165,8 @@ int unit_add_two_dependencies_by_name_inverse(Unit *u, UnitDependency d, UnitDep
 }
 
 int set_unit_path(const char *p) {
-        _cleanup_free_ char *c = NULL;
-
         /* This is mostly for debug purposes */
-        c = path_make_absolute_cwd(p);
-        if (setenv("SYSTEMD_UNIT_PATH", c, 0) < 0)
+        if (setenv("SYSTEMD_UNIT_PATH", p, 0) < 0)
                 return -errno;
 
         return 0;