[systemd-commits] 2 commits - TODO src/core src/fstab-generator
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Aug 9 09:14:49 PDT 2013
TODO | 2 --
src/core/service.c | 6 ++++++
src/fstab-generator/fstab-generator.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
New commits:
commit ef53700c20b0fc51dbdedfb4a611fe6ca8411df9
Author: WANG Chao <chaowang at redhat.com>
Date: Fri Aug 9 17:01:50 2013 +0800
fstab-generator: read rd.fstab=on/off switch correctly
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 87b17cd..5a2074e 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -600,9 +600,9 @@ static int parse_proc_cmdline(void) {
} else if (startswith(word, "rd.fstab=")) {
if (in_initrd()) {
- r = parse_boolean(word + 6);
+ r = parse_boolean(word + 9);
if (r < 0)
- log_warning("Failed to parse fstab switch %s. Ignoring.", word + 6);
+ log_warning("Failed to parse fstab switch %s. Ignoring.", word + 9);
else
arg_enabled = r;
}
commit b0693d30863a36da63d2a2732aa298fff6d34d0d
Author: Maciej Wereski <m.wereski at partner.samsung.com>
Date: Fri Aug 9 12:54:10 2013 +0200
service: prohibit Restart= set when Type=oneshot
diff --git a/TODO b/TODO
index ead699c..60622f7 100644
--- a/TODO
+++ b/TODO
@@ -88,8 +88,6 @@ Features:
full, make sure to write how many messages are lost as first thing
to syslog when it works again.
-* prohibit Restart= set with Type=oneshot
-
* man: the documentation of Restart= currently is very misleading and suggests the tools from ExecStartPre= might get restarted.
* load .d/*.conf dropins for device units
diff --git a/src/core/service.c b/src/core/service.c
index df49ce1..4070fd7 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1113,6 +1113,12 @@ static int service_verify(Service *s) {
return -EINVAL;
}
+ if (s->type == SERVICE_ONESHOT && s->restart != SERVICE_RESTART_NO) {
+ log_error_unit(UNIT(s)->id,
+ "%s has Restart setting other than no, which isn't allowed for Type=oneshot services. Refusing.", UNIT(s)->id);
+ return -EINVAL;
+ }
+
if (s->type == SERVICE_DBUS && !s->bus_name) {
log_error_unit(UNIT(s)->id,
"%s is of type D-Bus but no D-Bus service name has been specified. Refusing.", UNIT(s)->id);
More information about the systemd-commits
mailing list