Commit 457ac6bf authored by Jon Severinsson's avatar Jon Severinsson
Browse files

Import upstream v214-stable patch series and rebase remaining Debian patches.

parent aea43412
systemd (214-1) UNRELEASED; urgency=medium
* New upstream release v214.
[ Jon Severinsson ]
* Import upstream v214-stable patch series.
- Rebase remaining Debian patches on top of v214-stable.
- Drop modifications to the now-removed built-in sysvinit support.
-- Jon Severinsson <jon@severinsson.net> Sun, 16 Jul 2014 20:00:00 +0200
systemd (208-6) unstable; urgency=medium
[ Jon Severinsson ]
......
......@@ -8,36 +8,37 @@ This reverts the Debian specific bits from
46a2911bf2780f616396df5671dd901cc7cb54fd
99f861310d3f05f4e86cb9582a94b891dbb3382b
---
src/core/locale-setup.c | 21 +++++++++++++++++++++
src/timedate/timedated.c | 18 ++++++++++++++++++
2 files changed, 39 insertions(+)
src/core/locale-setup.c | 22 ++++++++++++++++++++++
src/timedate/timedated.c | 16 ++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c
index 276deb9..b823638 100644
index 7a41035..3817ab0 100644
--- a/src/core/locale-setup.c
+++ b/src/core/locale-setup.c
@@ -120,6 +120,27 @@ int locale_setup(char ***environment) {
@@ -120,6 +120,28 @@ int locale_setup(char ***environment) {
log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
}
+ if (r <= 0 &&
+ (r = parse_env_file("/etc/default/locale", NEWLINE,
+ "LANG", &variables[VARIABLE_LANG],
+ "LC_CTYPE", &variables[VARIABLE_LC_CTYPE],
+ "LC_NUMERIC", &variables[VARIABLE_LC_NUMERIC],
+ "LC_TIME", &variables[VARIABLE_LC_TIME],
+ "LC_COLLATE", &variables[VARIABLE_LC_COLLATE],
+ "LC_MONETARY", &variables[VARIABLE_LC_MONETARY],
+ "LC_MESSAGES", &variables[VARIABLE_LC_MESSAGES],
+ "LC_PAPER", &variables[VARIABLE_LC_PAPER],
+ "LC_NAME", &variables[VARIABLE_LC_NAME],
+ "LC_ADDRESS", &variables[VARIABLE_LC_ADDRESS],
+ "LC_TELEPHONE", &variables[VARIABLE_LC_TELEPHONE],
+ "LC_MEASUREMENT", &variables[VARIABLE_LC_MEASUREMENT],
+ "LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION],
+ NULL)) < 0) {
+ if (r <= 0) {
+ r = parse_env_file("/etc/default/locale", NEWLINE,
+ "LANG", &variables[VARIABLE_LANG],
+ "LANGUAGE", &variables[VARIABLE_LANGUAGE],
+ "LC_CTYPE", &variables[VARIABLE_LC_CTYPE],
+ "LC_NUMERIC", &variables[VARIABLE_LC_NUMERIC],
+ "LC_TIME", &variables[VARIABLE_LC_TIME],
+ "LC_COLLATE", &variables[VARIABLE_LC_COLLATE],
+ "LC_MONETARY", &variables[VARIABLE_LC_MONETARY],
+ "LC_MESSAGES", &variables[VARIABLE_LC_MESSAGES],
+ "LC_PAPER", &variables[VARIABLE_LC_PAPER],
+ "LC_NAME", &variables[VARIABLE_LC_NAME],
+ "LC_ADDRESS", &variables[VARIABLE_LC_ADDRESS],
+ "LC_TELEPHONE", &variables[VARIABLE_LC_TELEPHONE],
+ "LC_MEASUREMENT", &variables[VARIABLE_LC_MEASUREMENT],
+ "LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION],
+ NULL);
+
+ if (r != -ENOENT)
+ if (r < 0 && r != -ENOENT)
+ log_warning("Failed to read /etc/default/locale: %s", strerror(-r));
+ }
+
......@@ -45,29 +46,31 @@ index 276deb9..b823638 100644
for (i = 0; i < _VARIABLE_MAX; i++) {
char *s;
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 525c72e..863adba 100644
index 204031f..58745cf 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -183,6 +183,12 @@ static int read_data(void) {
@@ -136,6 +136,12 @@ static int context_read_data(Context *c) {
}
}
+ r = read_one_line_file("/etc/timezone", &tz.zone);
+ r = read_one_line_file("/etc/timezone", &c->zone);
+ if (r < 0) {
+ if (r != -ENOENT)
+ log_warning("Failed to read /etc/timezone: %s", strerror(-r));
+ }
+
have_timezone:
if (isempty(tz.zone)) {
free(tz.zone);
@@ -198,10 +204,15 @@ static int write_data_timezone(void) {
int r = 0;
if (isempty(c->zone)) {
free(c->zone);
@@ -150,6 +156,7 @@ have_timezone:
static int context_write_data_timezone(Context *c) {
_cleanup_free_ char *p = NULL;
int r = 0;
+ struct stat st;
+
if (!tz.zone) {
assert(c);
@@ -157,6 +164,9 @@ static int context_write_data_timezone(Context *c) {
if (unlink("/etc/localtime") < 0 && errno != ENOENT)
r = -errno;
......@@ -77,16 +80,15 @@ index 525c72e..863adba 100644
return r;
}
@@ -213,6 +224,13 @@ static int write_data_timezone(void) {
@@ -168,6 +178,12 @@ static int context_write_data_timezone(Context *c) {
if (r < 0)
return r;
+ if (stat("/etc/timezone", &st) == 0 && S_ISREG(st.st_mode)) {
+ r = write_string_file_atomic("/etc/timezone", tz.zone);
+ r = write_string_file_atomic("/etc/timezone", c->zone);
+ if (r < 0)
+ return r;
+ }
+
+
return 0;
}
......
From: Scott Thrasher <scott.thrasher@gmail.com>
Date: Wed, 26 Mar 2014 18:48:13 -0700
Subject: Add hwdb entry for Samsung Series 7 Ultra
(cherry picked from commit 15f392394e75ffb7f318920008fd1bbe4e82b488)
(cherry picked from commit cc76be2f760478eb32b9645ba6cb84cc1b791a52)
---
hwdb/60-keyboard.hwdb | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index f9084e4..fdab827 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -921,6 +921,14 @@ keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr*
KEYBOARD_KEY_96=!kbdillumup # Fn+F8 keyboard backlight up
KEYBOARD_KEY_d5=!wlan # Fn+F12 Wi-Fi toggle
+# Series 7 Ultra
+keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*7[34]0U3E*:pvr*
+ KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings
+ KEYBOARD_KEY_97=!kbdillumdown # Fn+F9 keyboard backlight down
+ KEYBOARD_KEY_96=!kbdillumup # Fn+F10 keyboard backlight up
+ KEYBOARD_KEY_b3=!prog3 # Fn+F11 fan/cooling mode changer
+ KEYBOARD_KEY_d5=!wlan # Fn+F12 wlan/airplane switch
+
# SQ1US
keyboard:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pnSQ1US:pvr*
KEYBOARD_KEY_d4=menu
......@@ -11,11 +11,11 @@ as PID 1.
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 78bdeb2..a78881b 100644
index 89917aa..c189776 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5732,19 +5732,24 @@ static int talk_initctl(void) {
request.cmd = INIT_CMD_RUNLVL;
@@ -6438,19 +6438,24 @@ static int talk_initctl(void) {
request.runlevel = rl;
- fd = open(INIT_FIFO, O_WRONLY|O_NDELAY|O_CLOEXEC|O_NOCTTY);
......
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 6 Mar 2014 16:35:02 +0100
Subject: Add strappenda3
(cherry picked from commit f39d4a08e746e703d562076a0f622eb91dbdcd3e)
For strappenda3, and it seems a good fix in general.
(cherry picked from commit 4f0b9b433473d4f2b24675253064fd098d21e5a6)
Conflicts:
src/systemctl/systemctl.c
---
src/shared/util.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/shared/util.h b/src/shared/util.h
index 20d81e5..3f97663 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -728,6 +728,19 @@ int unlink_noerrno(const char *path);
_c_; \
})
+#define strappenda3(a, b, c) \
+ ({ \
+ const char *_a_ = (a), *_b_ = (b), *_c_ = (c); \
+ char *_d_; \
+ size_t _x_, _y_, _z_; \
+ _x_ = strlen(_a_); \
+ _y_ = strlen(_b_); \
+ _z_ = strlen(_c_); \
+ _d_ = alloca(_x_ + _y_ + _z_ + 1); \
+ strcpy(stpcpy(stpcpy(_d_, _a_), _b_), _c_); \
+ _d_; \
+ })
+
#define procfs_file_alloca(pid, field) \
({ \
pid_t _pid_ = (pid); \
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 11 Oct 2013 09:45:32 +0200
Subject: Add support for saving/restoring keyboard backlights
Piggy-backing on the display backlight code, this saves and restores
keyboard backlights on supported devices.
The detection code matches that of UPower:
http://cgit.freedesktop.org/upower/tree/src/up-kbd-backlight.c#n173
https://bugs.freedesktop.org/show_bug.cgi?id=70367
[tomegun: also work for devices named "{smc,samsung,asus}::kbd_backlight"]
Conflicts:
rules/99-systemd.rules.in
---
rules/99-systemd.rules.in | 4 +++-
src/backlight/backlight.c | 7 +++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in
index 307f18f..a00ffed 100644
--- a/rules/99-systemd.rules.in
+++ b/rules/99-systemd.rules.in
@@ -51,9 +51,11 @@ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:
ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="@rootlibexecdir@/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
-# Pull in backlight save/restore for all firmware backlight devices
+# Pull in backlight save/restore for all firmware backlight devices,
+# and keyboard backlights
SUBSYSTEM=="backlight", ATTR{type}=="firmware", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-backlight@$name.service"
+SUBSYSTEM=="leds", KERNEL=="*kbd_backlight", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-backlight@$name.service"
# Asynchronously mount file systems implemented by these modules as
# soon as they are loaded.
diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
index 9b2eada..f22deed 100644
--- a/src/backlight/backlight.c
+++ b/src/backlight/backlight.c
@@ -56,9 +56,11 @@ int main(int argc, char *argv[]) {
errno = 0;
device = udev_device_new_from_subsystem_sysname(udev, "backlight", argv[2]);
+ if (!device)
+ device = udev_device_new_from_subsystem_sysname(udev, "leds", argv[2]);
if (!device) {
if (errno != 0) {
- log_error("Failed to get backlight device: %m");
+ log_error("Failed to get backlight device '%s': %m", argv[2]);
r = -errno;
} else
r = log_oom();
@@ -66,7 +68,8 @@ int main(int argc, char *argv[]) {
goto finish;
}
- if (!streq_ptr(udev_device_get_subsystem(device), "backlight")) {
+ if (!streq_ptr(udev_device_get_subsystem(device), "backlight") &&
+ !streq_ptr(udev_device_get_subsystem(device), "leds")) {
log_error("Not a backlight device: %s", argv[2]);
r = -ENODEV;
goto finish;
......@@ -11,10 +11,10 @@ Subject: Add targets for compatibility with Debian insserv system facilities
create mode 100644 units/x-display-manager.target
diff --git a/Makefile.am b/Makefile.am
index 1bd4e99..78ae428 100644
index 9c86bcf..1e33415 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -457,6 +457,12 @@ nodist_systemunit_DATA = \
@@ -497,6 +497,12 @@ nodist_systemunit_DATA = \
units/initrd-switch-root.service \
units/systemd-nspawn@.service
......@@ -25,8 +25,8 @@ index 1bd4e99..78ae428 100644
+endif
+
dist_userunit_DATA = \
units/user/basic.target \
units/user/default.target \
units/user/exit.target
diff --git a/units/mail-transport-agent.target b/units/mail-transport-agent.target
new file mode 100644
index 0000000..4d74ec7
......
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 2 Mar 2014 00:05:16 -0500
Subject: Allow fractional parts in disk sizes
It seems natural to be able to say SystemMaxUsage=1.5G.
https://bugzilla.redhat.com/show_bug.cgi?id=1047568
(cherry picked from commit 9480794b277b5ce33e467578ed669996df576bb9)
Conflicts:
src/test/test-util.c
---
src/shared/util.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/shared/util.c b/src/shared/util.c
index 7500779..e754747 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -2285,6 +2285,8 @@ int parse_bytes(const char *t, off_t *bytes) {
p = t;
do {
long long l;
+ unsigned long long l2;
+ double frac = 0;
char *e;
unsigned i;
@@ -2300,14 +2302,32 @@ int parse_bytes(const char *t, off_t *bytes) {
if (e == p)
return -EINVAL;
+ if (*e == '.') {
+ e++;
+ if (*e >= '0' && *e <= '9') {
+ char *e2;
+
+ /* strotoull itself would accept space/+/- */
+ l2 = strtoull(e, &e2, 10);
+
+ if (errno == ERANGE)
+ return -errno;
+
+ /* Ignore failure. E.g. 10.M is valid */
+ frac = l2;
+ for (; e < e2; e++)
+ frac /= 10;
+ }
+ }
+
e += strspn(e, WHITESPACE);
for (i = 0; i < ELEMENTSOF(table); i++)
if (startswith(e, table[i].suffix)) {
unsigned long long tmp;
- if ((unsigned long long) l > ULLONG_MAX / table[i].factor)
+ if ((unsigned long long) l + (frac > 0) > ULLONG_MAX / table[i].factor)
return -ERANGE;
- tmp = l * table[i].factor;
+ tmp = l * table[i].factor + (unsigned long long) (frac * table[i].factor);
if (tmp > ULLONG_MAX - r)
return -ERANGE;
......@@ -9,10 +9,10 @@ enable rsyslog.service)
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index f3be0f1..ea36b48 100644
index 1bde1b9..5999ea9 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4255,9 +4255,6 @@ static int enable_sysv_units(char **args) {
@@ -5023,9 +5023,6 @@ static int enable_sysv_units(const char *verb, char **args) {
name = args[f];
......@@ -22,13 +22,13 @@ index f3be0f1..ea36b48 100644
if (path_is_absolute(name))
continue;
@@ -4289,7 +4286,8 @@ static int enable_sysv_units(char **args) {
@@ -5059,7 +5056,8 @@ static int enable_sysv_units(const char *verb, char **args) {
goto finish;
}
- p[strlen(p) - sizeof(".service") + 1] = 0;
- p[strlen(p) - strlen(".service")] = 0;
+ if (endswith(name, ".service"))
+ p[strlen(p) - sizeof(".service") + 1] = 0;
+ p[strlen(p) - strlen(".service")] = 0;
found_sysv = access(p, F_OK) >= 0;
if (!found_sysv)
continue;
......@@ -9,11 +9,11 @@ Closes: #624599
1 file changed, 15 insertions(+)
diff --git a/src/core/manager.c b/src/core/manager.c
index c573a72..c56027f 100644
index a00ca74..d81bf1a 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -976,6 +976,21 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
dbus_set_error(e, BUS_ERROR_INVALID_JOB_MODE, "final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
@@ -1073,6 +1073,21 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
sd_bus_error_setf(e, BUS_ERROR_SHUTTING_DOWN, "final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
return -EINVAL;
}
+ /* Trying to reload services from multi-user.target
......@@ -28,7 +28,7 @@ index c573a72..c56027f 100644
+ * See http://bugs.debian.org/624599 */
+ if (strcmp(j->unit->id, "sysinit.target") == 0 && unit->default_dependencies) {
+ log_debug("sysinit.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+ dbus_set_error(e, BUS_ERROR_INVALID_JOB_MODE, "sysinit.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+ sd_bus_error_setf(e, SD_BUS_ERROR_INVALID_ARGS, "sysinit.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+ return -EINVAL;
+ }
}
......
......@@ -9,11 +9,11 @@ for the patch. Closes: #624599.
1 file changed, 25 insertions(+)
diff --git a/src/core/manager.c b/src/core/manager.c
index 58dacdc..c573a72 100644
index 0cb2044..a00ca74 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -943,6 +943,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool override, DBusError *e, Job **_ret) {
@@ -1040,6 +1040,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool override, sd_bus_error *e, Job **_ret) {
int r;
Transaction *tr;
+ Job *j;
......@@ -21,33 +21,33 @@ index 58dacdc..c573a72 100644
assert(m);
assert(type < _JOB_TYPE_MAX);
@@ -954,6 +956,29 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
@@ -1051,6 +1053,29 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
return -EINVAL;
}
+ if (type == JOB_RELOAD || type == JOB_RELOAD_OR_START || type == JOB_RESTART || type == JOB_TRY_RESTART) {
+ /* If final.target is queued (happens on poweroff, reboot and
+ * halt), we will not accept new reload jobs. They would not be
+ * executed ever anyways (since the shutdown comes first), but
+ * they block the shutdown process: when systemd tries to stop
+ * a unit such as ifup@eth0.service, that unit might invoke a
+ * systemctl reload command, which blockingly waits (but only
+ * gets executed after all other queued units for the shutdown
+ * have been executed).
+ *
+ * See http://bugs.debian.org/624599 and
+ * http://bugs.debian.org/635777 */
+ HASHMAP_FOREACH(j, m->jobs, i) {
+ assert(j->installed);
+
+ /* If final.target is queued (happens on poweroff, reboot and
+ * halt), we will not accept new reload jobs. They would not be
+ * executed ever anyways (since the shutdown comes first), but
+ * they block the shutdown process: when systemd tries to stop
+ * a unit such as ifup@eth0.service, that unit might invoke a
+ * systemctl reload command, which blockingly waits (but only
+ * gets executed after all other queued units for the shutdown
+ * have been executed).
+ *
+ * See http://bugs.debian.org/624599 and
+ * http://bugs.debian.org/635777 */
+ if (strcmp(j->unit->id, "final.target") == 0) {
+ log_debug("final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+ dbus_set_error(e, BUS_ERROR_INVALID_JOB_MODE, "final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+ sd_bus_error_setf(e, BUS_ERROR_SHUTTING_DOWN, "final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
+ return -EINVAL;
+ }
+ }
+ }
+
if (mode == JOB_ISOLATE && !unit->allow_isolate) {
dbus_set_error(e, BUS_ERROR_NO_ISOLATION, "Operation refused, unit may not be isolated.");
sd_bus_error_setf(e, BUS_ERROR_NO_ISOLATION, "Operation refused, unit may not be isolated.");
return -EPERM;
......@@ -8,7 +8,7 @@ Closes: #675422
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
index f0312ef..445ba5c 100644
index b80dab4..a6f2f12 100644
--- a/tmpfiles.d/tmp.conf
+++ b/tmpfiles.d/tmp.conf
@@ -8,8 +8,8 @@
......@@ -21,4 +21,4 @@ index f0312ef..445ba5c 100644
+#d /var/tmp 1777 root root 30d
# Exclude namespace mountpoints created with PrivateTmp=yes
x /tmp/systemd-*.service-*
x /tmp/systemd-private-%b-*
From: Michael Biebl <biebl@debian.org>
Date: Sun, 27 Apr 2014 15:41:26 +0200
Subject: Check for kmod binary
Creating the list of dead device nodes requires kmod. Inside containers
this is not strictly required so we don't want a hard dependency on the
kmod package. If the binary does not exist kmod-static-nodes.service
will fail, so add a condition to check if the binary is available.
---
units/kmod-static-nodes.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/units/kmod-static-nodes.service.in b/units/kmod-static-nodes.service.in
index ff4017b..718d77b 100644
--- a/units/kmod-static-nodes.service.in
+++ b/units/kmod-static-nodes.service.in
@@ -11,6 +11,7 @@ DefaultDependencies=no
Before=sysinit.target systemd-tmpfiles-setup-dev.service
ConditionCapability=CAP_MKNOD
ConditionPathExists=/lib/modules/%v/modules.devname
+ConditionFileIsExecutable=@KMOD@
[Service]
Type=oneshot
From: Oleksii Shevchuk <alxchk@gmail.com>
Date: Mon, 4 Nov 2013 18:47:43 +0200
Subject: Configurable Timeouts/Restarts default values
https://bugs.freedesktop.org/show_bug.cgi?id=71132
Patch adds DefaultTimeoutStartSec, DefaultTimeoutStopSec, DefaultRestartSec
configuration options to manager configuration file.
---
man/systemd-system.conf.xml | 24 +++++++++++++++++++++++-
man/systemd.mount.xml | 4 ++--
man/systemd.service.xml | 6 ++++--
man/systemd.socket.xml | 4 ++--
man/systemd.swap.xml | 4 ++--
src/core/device.c | 2 +-
src/core/main.c | 9 +++++++++
src/core/manager.h | 3 +++
src/core/mount.c | 2 +-
src/core/scope.c | 2 +-
src/core/service.c | 6 +++---
src/core/socket.c | 2 +-
src/core/swap.c | 2 +-
src/core/system.conf | 3 +++
src/core/user.conf | 3 +++
15 files changed, 59 insertions(+), 17 deletions(-)
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
index e8cf8a9..c1f2648 100644
--- a/man/systemd-system.conf.xml
+++ b/man/systemd-system.conf.xml
@@ -61,7 +61,6 @@
otherwise <filename>user.conf</filename>. These
configuration files contain a few settings controlling
basic manager operations.</para>
-
</refsect1>
<refsect1>
@@ -95,6 +94,29 @@
</varlistentry>
<varlistentry>
+ <term><varname>DefaultTimeoutStartSec=</varname></term>
+ <term><varname>DefaultTimeoutStopSec=</varname></term>
+ <term><varname>DefaultRestartSec=</varname></term>
+
+ <listitem><para>Configures the default
+ time-outs for starting and stopping of
+ units, as well as the default time to
+ sleep between automatic restarts of a
+ units, as configured per-unit in
+ <varname>TimeoutStartSec=</varname>,
+ <varname>TimeoutStopSec=</varname> and
+ <varname>RestartSec=</varname> (for
+ service units see
+ <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ for details on the per-unit
+ settings). For non-service units
+ <varname>DefaultTimeoutStartSec=</varname>
+ sets the default
+ <varname>TimeoutSec=</varname> value.
+ </para></listitem>
+ </varlistentry>