chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit: use weaker dependencies between mount and device units in --user mode
[elogind.git]
/
src
/
core
/
unit.c
diff --git
a/src/core/unit.c
b/src/core/unit.c
index 67425ba913e0e2ce317ad5b6e852c0983ca7ec36..875befa0a200e5ce83771316be36c8561009e8be 100644
(file)
--- a/
src/core/unit.c
+++ b/
src/core/unit.c
@@
-19,12
+19,8
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <assert.h>
#include <errno.h>
#include <string.h>
#include <errno.h>
#include <string.h>
-#include <sys/epoll.h>
-#include <sys/timerfd.h>
-#include <sys/poll.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
@@
-45,12
+41,10
@@
#include "cgroup-util.h"
#include "missing.h"
#include "mkdir.h"
#include "cgroup-util.h"
#include "missing.h"
#include "mkdir.h"
-#include "label.h"
#include "fileio-label.h"
#include "bus-common-errors.h"
#include "dbus.h"
#include "execute.h"
#include "fileio-label.h"
#include "bus-common-errors.h"
#include "dbus.h"
#include "execute.h"
-#include "virt.h"
#include "dropin.h"
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
#include "dropin.h"
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
@@
-2845,7
+2839,7
@@
int unit_add_node_link(Unit *u, const char *what, bool wants) {
if (r < 0)
return r;
if (r < 0)
return r;
- r = unit_add_two_dependencies(u, UNIT_AFTER,
UNIT_BINDS_TO
, device, true);
+ r = unit_add_two_dependencies(u, UNIT_AFTER,
u->manager->running_as == SYSTEMD_SYSTEM ? UNIT_BINDS_TO : UNIT_WANTS
, device, true);
if (r < 0)
return r;
if (r < 0)
return r;
@@
-3178,6
+3172,10
@@
int unit_patch_contexts(Unit *u) {
r = get_home_dir(&ec->working_directory);
if (r < 0)
return r;
r = get_home_dir(&ec->working_directory);
if (r < 0)
return r;
+
+ /* Allow user services to run, even if the
+ * home directory is missing */
+ ec->working_directory_missing_ok = true;
}
if (u->manager->running_as == SYSTEMD_USER &&
}
if (u->manager->running_as == SYSTEMD_USER &&