chiark / gitweb /
unit: set default working directory to the user's home directory when running in...
[elogind.git] / src / core / swap.c
index aeb8bdab36ef4723ec5cdc9a7da82b9c4644e873..ed61ba3c816493e466fca490966a38d4f5f3eaf7 100644 (file)
@@ -294,6 +294,10 @@ static int swap_load(Unit *u) {
                 if (UNIT(s)->default_dependencies)
                         if ((r = swap_add_default_dependencies(s)) < 0)
                                 return r;
+
+                r = unit_patch_working_directory(UNIT(s), &s->exec_context);
+                if (r < 0)
+                        return r;
         }
 
         return swap_verify(s);