X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fload-fragment.c;h=3440d9158f1c91df0b94c7eb4cec9305426fa06a;hp=cb8c2508919c0b972d154a3bd2495b6965f9277e;hb=e5a53dc74636ffa9de639733a0bef65f967c9ffa;hpb=41584525cf0a9d3a8bfb76008a3fc663b86bfdde diff --git a/src/load-fragment.c b/src/load-fragment.c index cb8c25089..3440d9158 100644 --- a/src/load-fragment.c +++ b/src/load-fragment.c @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include "unit.h" #include "strv.h" @@ -218,6 +220,15 @@ static int config_parse_listen( } path_kill_slashes(p->path); + } else if (streq(lvalue, "ListenNetlink")) { + p->type = SOCKET_SOCKET; + + if (socket_address_parse_netlink(&p->address, rvalue) < 0) { + log_error("[%s:%u] Failed to parse address value, ignoring: %s", filename, line, rvalue); + free(p); + return 0; + } + } else { p->type = SOCKET_SOCKET; @@ -965,7 +976,9 @@ static int config_parse_limit( assert(rvalue); assert(data); - if (safe_atollu(rvalue, &u) < 0) { + if (streq(rvalue, "infinity")) + u = (unsigned long long) RLIM_INFINITY; + else if (safe_atollu(rvalue, &u) < 0) { log_error("[%s:%u] Failed to parse resource value, ignoring: %s", filename, line, rvalue); return 0; } @@ -1847,12 +1860,14 @@ static int load_from_path(Unit *u, const char *path) { { "RefuseManualStop", config_parse_bool, 0, &u->meta.refuse_manual_stop, "Unit" }, { "AllowIsolate", config_parse_bool, 0, &u->meta.allow_isolate, "Unit" }, { "DefaultDependencies", config_parse_bool, 0, &u->meta.default_dependencies, "Unit" }, + { "OnFailureIsolate", config_parse_bool, 0, &u->meta.on_failure_isolate, "Unit" }, { "JobTimeoutSec", config_parse_usec, 0, &u->meta.job_timeout, "Unit" }, { "ConditionPathExists", config_parse_condition_path, CONDITION_PATH_EXISTS, u, "Unit" }, { "ConditionPathIsDirectory", config_parse_condition_path, CONDITION_PATH_IS_DIRECTORY, u, "Unit" }, { "ConditionDirectoryNotEmpty", config_parse_condition_path, CONDITION_DIRECTORY_NOT_EMPTY, u, "Unit" }, { "ConditionKernelCommandLine", config_parse_condition_string, CONDITION_KERNEL_COMMAND_LINE, u, "Unit" }, { "ConditionVirtualization", config_parse_condition_string, CONDITION_VIRTUALIZATION, u, "Unit" }, + { "ConditionSecurity", config_parse_condition_string, CONDITION_SECURITY, u, "Unit" }, { "ConditionNull", config_parse_condition_null, 0, u, "Unit" }, { "PIDFile", config_parse_path, 0, &u->service.pid_file, "Service" }, @@ -1886,6 +1901,7 @@ static int load_from_path(Unit *u, const char *path) { { "ListenDatagram", config_parse_listen, 0, &u->socket, "Socket" }, { "ListenSequentialPacket", config_parse_listen, 0, &u->socket, "Socket" }, { "ListenFIFO", config_parse_listen, 0, &u->socket, "Socket" }, + { "ListenNetlink", config_parse_listen, 0, &u->socket, "Socket" }, { "BindIPv6Only", config_parse_socket_bind, 0, &u->socket, "Socket" }, { "Backlog", config_parse_unsigned, 0, &u->socket.backlog, "Socket" }, { "BindToDevice", config_parse_bindtodevice, 0, &u->socket, "Socket" }, @@ -1938,6 +1954,8 @@ static int load_from_path(Unit *u, const char *path) { { "PathChanged", config_parse_path_spec, 0, &u->path, "Path" }, { "DirectoryNotEmpty", config_parse_path_spec, 0, &u->path, "Path" }, { "Unit", config_parse_path_unit, 0, &u->path, "Path" }, + { "MakeDirectory", config_parse_bool, 0, &u->path.make_directory, "Path" }, + { "DirectoryMode", config_parse_mode, 0, &u->path.directory_mode, "Path" }, /* The [Install] section is ignored here. */ { "Alias", NULL, 0, NULL, "Install" },