summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/systemd.swap.xml8
-rw-r--r--src/libsystemd/sd-event/sd-event.c1
-rw-r--r--src/systemctl/systemctl.c20
-rw-r--r--sysctl.d/50-default.conf3
4 files changed, 18 insertions, 14 deletions
diff --git a/man/systemd.swap.xml b/man/systemd.swap.xml
index cf4e1ba839..33349eb0b1 100644
--- a/man/systemd.swap.xml
+++ b/man/systemd.swap.xml
@@ -94,10 +94,10 @@
dependencies on the device units or the mount units of the files
they are activated from.</para>
- <para>Swap units with <varname>DefaultDependencies=</varname> in the <literal>[Unit]</literal> section enabled
- implicitly acquire a <varname>Conflicts=</varname> and an <varname>After=</varname> dependency on
- <filename>umount.target</filename> so that they are deactivated at shutdown, unless
- <varname>DefaultDependencies=no</varname> is specified.</para>
+ <para>Swap units with <varname>DefaultDependencies=</varname> set to its default <option>yes</option> value in the
+ <literal>[Unit]</literal> section enabled implicitly acquire a <varname>Conflicts=</varname> and a
+ <varname>Before=</varname> dependency on <filename>umount.target</filename> so that they are deactivated at
+ shutdown as well as a <varname>Before=swap.target</varname> dependency.</para>
<para>Additional implicit dependencies may be added as result of
execution and resource control parameters as documented in
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 4816bd1f67..b4686d0065 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -730,7 +730,6 @@ static void event_unmask_signal_data(sd_event *e, struct signal_data *d, int sig
/* If all the mask is all-zero we can get rid of the structure */
hashmap_remove(e->signal_data, &d->priority);
- assert(!d->current);
safe_close(d->fd);
free(d);
return;
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 5cb07739d4..2809dece50 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -6218,21 +6218,25 @@ static int enable_unit(int argc, char *argv[], void *userdata) {
"4) In case of template units, the unit is meant to be enabled with some\n"
" instance name specified.");
- if (arg_now && n_changes > 0 && STR_IN_SET(argv[0], "enable", "disable", "mask")) {
- char *new_args[n_changes + 2];
+ if (arg_now && STR_IN_SET(argv[0], "enable", "disable", "mask")) {
sd_bus *bus;
- unsigned i;
+ unsigned len, i;
r = acquire_bus(BUS_MANAGER, &bus);
if (r < 0)
goto finish;
- new_args[0] = (char*) (streq(argv[0], "enable") ? "start" : "stop");
- for (i = 0; i < n_changes; i++)
- new_args[i + 1] = basename(changes[i].path);
- new_args[i + 1] = NULL;
+ len = strv_length(names);
+ {
+ char *new_args[len + 2];
- r = start_unit(strv_length(new_args), new_args, userdata);
+ new_args[0] = (char*) (streq(argv[0], "enable") ? "start" : "stop");
+ for (i = 0; i < len; i++)
+ new_args[i + 1] = basename(names[i]);
+ new_args[i + 1] = NULL;
+
+ r = start_unit(len + 1, new_args, userdata);
+ }
}
finish:
diff --git a/sysctl.d/50-default.conf b/sysctl.d/50-default.conf
index f08f32e849..aff99300d9 100644
--- a/sysctl.d/50-default.conf
+++ b/sysctl.d/50-default.conf
@@ -14,7 +14,8 @@
# System Request functionality of the kernel (SYNC)
#
# Use kernel.sysrq = 1 to allow all keys.
-# See http://fedoraproject.org/wiki/QA/Sysrq for a list of values and keys.
+# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html for a list
+# of values and keys.
kernel.sysrq = 16
# Append the PID to the core filename