On 12/22/2011 01:52 PM, Reindl Harald wrote: > > On 22.12.2011 13:21, Zbigniew Jędrzejewski-Szmek wrote: >>> systemctl show -p Type myproxy-server.service >>> >> Yes, the type defaults to simple, if is defined erroneously. >> A warning is printed to logs: >> >> systemd[1]: [/etc/systemd/system/testforking2.service:4] Failed to parse >> service type, ignoring: fork >> >> $ systemctl show -p Type testforking2.service >> Type=simple >> >> The manpage says: "If systemd encounters an unknown option it will write >> a warning log message but continue loading the unit." >> I guess that this also means "an invalid value of an option", but this >> is not obvious. And sometimes could be dangerous: e.g. if systemd ignores >> options >> like User= or RootDirectory=, if set to something invalid. > > generally it is a better behavior to stop with invalid configurations > instead guess how can be prcedded anywhere, you have UNDEFINED > behavior in such cases and process 1 should NOT do so > > fact is that messages most time are ignored / not seen by many > maintainers which is my only explanation for messages like > this "[/etc/rc.d/init.d/asterisk:9] PID file not absolute. Ignoring." > > if systemd would refuse to start in such cases and write a clear Well, maybe not refuse to start, but refuse to load this unit.
diff --git src/conf-parser.h src/conf-parser.h index cbb4235..6a61213 100644 --- src/conf-parser.h +++ src/conf-parser.h @@ -122,7 +122,7 @@ int config_parse_mode(const char *filename, unsigned line, const char *section, \ if ((x = name##_from_string(rvalue)) < 0) { \ log_error("[%s:%u] " msg ", ignoring: %s", filename, line, rvalue); \ - return 0; \ + return -1; \ } \ \ *i = x; \ > message on stdout some maintainers would do their jobs better > or would be replaced be someone who does Yeah, it would be even better is 'systemctl load broken.service' could error out with a message. Zbyszek _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel