summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorUmut Tezduyar <umut@tezduyar.com>2013-06-09 07:08:46 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-06-20 16:27:45 -0400
commit97d0e5f83ba4dd713170f802b90149b7325bc992 (patch)
tree21bd3c2a72f7d2c352513f1ceaf6ca0505889a4c /src/core/main.c
parent8c1396b1c2dfecbb59af61064f6a0f624385004d (diff)
manager: add DefaultEnvironment option
This complements existing functionality of setting variables through 'systemctl set-environment', the kernel command line, and through normal environment variables for systemd in session mode.
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 26aa561218..470fecf15d 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -94,6 +94,7 @@ static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL;
static ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT;
static usec_t arg_runtime_watchdog = 0;
static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE;
+static char **arg_default_environment = NULL;
static struct rlimit *arg_default_rlimit[RLIMIT_NLIMITS] = {};
static uint64_t arg_capability_bounding_set_drop = 0;
static nsec_t arg_timer_slack_nsec = (nsec_t) -1;
@@ -646,6 +647,7 @@ static int parse_config_file(void) {
{ "Manager", "ShutdownWatchdogSec", config_parse_sec, 0, &arg_shutdown_watchdog },
{ "Manager", "CapabilityBoundingSet", config_parse_bounding_set, 0, &arg_capability_bounding_set_drop },
{ "Manager", "TimerSlackNSec", config_parse_nsec, 0, &arg_timer_slack_nsec },
+ { "Manager", "DefaultEnvironment", config_parse_environ, 0, &arg_default_environment },
{ "Manager", "DefaultLimitCPU", config_parse_limit, 0, &arg_default_rlimit[RLIMIT_CPU]},
{ "Manager", "DefaultLimitFSIZE", config_parse_limit, 0, &arg_default_rlimit[RLIMIT_FSIZE]},
{ "Manager", "DefaultLimitDATA", config_parse_limit, 0, &arg_default_rlimit[RLIMIT_DATA]},
@@ -1630,6 +1632,9 @@ int main(int argc, char *argv[]) {
if (arg_default_controllers)
manager_set_default_controllers(m, arg_default_controllers);
+ if (arg_default_environment)
+ manager_set_default_environment(m, arg_default_environment);
+
manager_set_show_status(m, arg_show_status);
/* Remember whether we should queue the default job */