<listitem><para>Units whose standard output or error output is connected to <option>journal</option> or
<option>kmsg</option> (or their combinations with console output, see below) automatically acquire
- dependencies of type <varname>After=</varname> on <filename>systemd-journald.socket</filename>.
- </para></listitem>
-
- <listitem><para>Units using the terminal (standard input, output, or error are connected to a terminal
- or <varname>TTYPath=</varname> is used) automatically acquire an <varname>After=</varname> dependency
- on <filename>systemd-vconsole-setup.service</filename>.</para></listitem>
+ dependencies of type <varname>After=</varname> on
+ <filename>systemd-journald.socket</filename>.</para></listitem>
<listitem><para>Units using <varname>LogNamespace=</varname> will automatically gain ordering and
requirement dependencies on the two socket units associated with
#define SPECIAL_QUOTACHECK_SERVICE "systemd-quotacheck.service"
#define SPECIAL_QUOTAON_SERVICE "quotaon.service"
#define SPECIAL_REMOUNT_FS_SERVICE "systemd-remount-fs.service"
-#define SPECIAL_VCONSOLE_SETUP_SERVICE "systemd-vconsole-setup.service"
#define SPECIAL_VOLATILE_ROOT_SERVICE "systemd-volatile-root.service"
#define SPECIAL_UDEVD_SERVICE "systemd-udevd.service"
#define SPECIAL_GROWFS_SERVICE "systemd-growfs@.service"
return false;
}
-int exec_context_add_default_dependencies(Unit *u, const ExecContext *c) {
- assert(u);
- assert(u->default_dependencies);
-
- if (c && exec_context_needs_term(c))
- return unit_add_dependency_by_name(u, UNIT_AFTER, SPECIAL_VCONSOLE_SETUP_SERVICE,
- /* add_reference= */ true, UNIT_DEPENDENCY_DEFAULT);
- return 0;
-}
-
void exec_status_start(ExecStatus *s, pid_t pid) {
assert(s);
int exec_context_get_clean_directories(ExecContext *c, char **prefix, ExecCleanMask mask, char ***ret);
int exec_context_get_clean_mask(ExecContext *c, ExecCleanMask *ret);
-int exec_context_add_default_dependencies(Unit *u, const ExecContext *c);
void exec_status_start(ExecStatus *s, pid_t pid);
void exec_status_exit(ExecStatus *s, const ExecContext *context, pid_t pid, int code, int status);
if (r < 0)
return r;
- return exec_context_add_default_dependencies(UNIT(m), &m->exec_context);
+ return 0;
}
static int mount_verify(Mount *m) {
return r;
/* Third, add us in for normal shutdown. */
- r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, true, UNIT_DEPENDENCY_DEFAULT);
- if (r < 0)
- return r;
-
- /* Fourth, add generic dependencies */
- return exec_context_add_default_dependencies(UNIT(s), &s->exec_context);
+ return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, true, UNIT_DEPENDENCY_DEFAULT);
}
static void service_fix_stdio(Service *s) {
return r;
}
- r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, true, UNIT_DEPENDENCY_DEFAULT);
- if (r < 0)
- return r;
-
- return exec_context_add_default_dependencies(UNIT(s), &s->exec_context);
+ return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, true, UNIT_DEPENDENCY_DEFAULT);
}
_pure_ static bool socket_has_exec(Socket *s) {
if (r < 0)
return r;
- r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, true, UNIT_DEPENDENCY_DEFAULT);
- if (r < 0)
- return r;
-
- return exec_context_add_default_dependencies(UNIT(s), &s->exec_context);
+ return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, true, UNIT_DEPENDENCY_DEFAULT);
}
static int swap_verify(Swap *s) {