main.c revision 35b8ca3aaf8cb044ad76675dfcad89e000dd4a5c
afe3ab588a6b2992efe5a9b22ed038545ba3cdbfLennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
b3ae710c251d0ce5cf2cef63208e325497b5e323Zbigniew Jędrzejewski-Szmek This file is part of systemd.
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers Copyright 2010 Lennart Poettering
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers systemd is free software; you can redistribute it and/or modify it
afe3ab588a6b2992efe5a9b22ed038545ba3cdbfLennart Poettering under the terms of the GNU General Public License as published by
d19e85f0d474ed1882561b458d528cbae49f640eZbigniew Jędrzejewski-Szmek the Free Software Foundation; either version 2 of the License, or
d19e85f0d474ed1882561b458d528cbae49f640eZbigniew Jędrzejewski-Szmek (at your option) any later version.
d19e85f0d474ed1882561b458d528cbae49f640eZbigniew Jędrzejewski-Szmek systemd is distributed in the hope that it will be useful, but
d19e85f0d474ed1882561b458d528cbae49f640eZbigniew Jędrzejewski-Szmek WITHOUT ANY WARRANTY; without even the implied warranty of
3f85ef0f05ffc51e19f86fb83a1c51e8e3cd6817Harald Hoyer MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
afe3ab588a6b2992efe5a9b22ed038545ba3cdbfLennart Poettering General Public License for more details.
afea8d3853d0f76b3845729ff00e75d281f43a1bZbigniew Jędrzejewski-Szmek You should have received a copy of the GNU General Public License
f38afcd0c7f558ca5bf0854b42f8c6954f8ad7f3Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
17fe56148c44dfa5583a8643c1918fd6eccf2aeeLennart Poetteringstatic ManagerRunningAs arg_running_as = _MANAGER_RUNNING_AS_INVALID;
17fe56148c44dfa5583a8643c1918fd6eccf2aeeLennart Poetteringstatic bool arg_dump_core = true;
17fe56148c44dfa5583a8643c1918fd6eccf2aeeLennart Poetteringstatic bool arg_crash_shell = false;
7687f85ea6bab434324bb985e2898bf6373891bfLennart Poetteringstatic bool arg_confirm_spawn = false;
7687f85ea6bab434324bb985e2898bf6373891bfLennart Poetteringstatic bool arg_show_status = true;
02c74033ed65e7825d1b87ee051820c9fbfa0f50Lennart Poetteringstatic bool arg_sysv_console = true;
c14db9b32ab90738973071d31f259d1a457d7b4aLennart Poetteringstatic bool arg_mount_auto = true;
c14db9b32ab90738973071d31f259d1a457d7b4aLennart Poetteringstatic bool arg_swap_auto = true;
fa607802f332e06f4044c3eb38dbea41076c803dLennart Poetteringstatic char **arg_default_controllers = NULL;
fa607802f332e06f4044c3eb38dbea41076c803dLennart Poetteringstatic ExecOutput arg_default_std_output = EXEC_OUTPUT_INHERIT;
cc98b3025eeb89addb76a27390cb2baca4eab8b9Torstein Husebøstatic ExecOutput arg_default_std_error = EXEC_OUTPUT_INHERIT;
c3a0d00d6dd6f5997d673e133ef6f9f856550b0aLennart Poettering log_error("Caught <%s>, not dumping core.", signal_to_string(sig));
de146bb2aac13361ade3050d37696499ac4ca9aeLennart Poettering /* We want to wait for the core process, hence let's enable SIGCHLD */
358ba19e5e18304258f053e30e6120a3b6adf322Lennart Poettering assert_se(sigaction(SIGCHLD, &sa, NULL) == 0);
5b728e6ba17c39e0787ad81b96a5582f4390f091Lennart Poettering log_error("Caught <%s>, cannot fork for core dump: %s", signal_to_string(sig), strerror(errno));
c3a0d00d6dd6f5997d673e133ef6f9f856550b0aLennart Poettering else if (pid == 0) {
82e6c50c473f4be8df77c7a510577f1975eedddbLennart Poettering /* Enable default signal handler for core dump */
98cd2651988619bf606f0b27825440c4638a7e0bLennart Poettering assert_se(sigaction(sig, &sa, NULL) == 0);
b7307642391c8ebb9724c99e6b33239e2c0ff944Lennart Poettering /* Don't limit the core dump size */
40ff4a4abd76d71408e598ed02d7860b8465fa9aLennart Poettering /* Just to be sure... */
40ff4a4abd76d71408e598ed02d7860b8465fa9aLennart Poettering /* Raise the signal again */
0a86c1a9d8066267b878dfeddc5e0087dda6a37bLennart Poettering /* Order things nicely. */
0a86c1a9d8066267b878dfeddc5e0087dda6a37bLennart Poettering if ((r = wait_for_terminate(pid, &status)) < 0)
41114e81b562bcee52be1ef94c684ace2362ca54Lennart Poettering log_error("Caught <%s>, waitpid() failed: %s", signal_to_string(sig), strerror(-r));
e3286870fdf20c3c93e944b24fd9af53620f7dbaLennart Poettering log_error("Caught <%s>, core dump failed.", signal_to_string(sig));
e3286870fdf20c3c93e944b24fd9af53620f7dbaLennart Poettering log_error("Caught <%s>, dumped core as pid %lu.", signal_to_string(sig), (unsigned long) pid);
7b0fce617c48eda32b2d4e04b5f0e4376e8c0106Lennart Poettering log_info("Executing crash shell in 10s...");
7b0fce617c48eda32b2d4e04b5f0e4376e8c0106Lennart Poettering /* Let the kernel reap children for us */
c2d5b3c94d0c082ef29597fb230f8b88b124bab8Lennart Poettering sa.sa_flags = SA_NOCLDSTOP|SA_NOCLDWAIT|SA_RESTART;
264b8070715d2d19344c4991ace21147d998f56dLennart Poettering assert_se(sigaction(SIGCHLD, &sa, NULL) == 0);
4ecd22142543aac55ddac1da3b7d6882c009d637Lennart Poettering log_error("Failed to fork off crash shell: %s", strerror(errno));
7e27f3121e5a10629302b5221eb21345f832724aLennart Poettering else if (pid == 0) {
f81e67f79fa856aa2ecffad4d014772ce981745cLennart Poettering if ((fd = acquire_terminal("/dev/console", false, true, true)) < 0)
d48b7bd271b1e70924c8485d2f95c2f5a1ae77cbLennart Poettering log_error("Failed to acquire terminal: %s", strerror(-fd));
25e14499c4c5b02229d05a5bc26c3693ade5f987Lennart Poettering log_error("Failed to duplicate terminal fd: %s", strerror(-r));
821cc13ddae40fb7608458b44aaa7a3fd33d56d9Lennart Poettering log_error("execl() failed: %s", strerror(errno));
8483d73ff158ee0d51ccbba09a470cc6ae9b071aLennart Poettering log_info("Successfully spawned crash shall as pid %lu.", (unsigned long) pid);
6dab5bb18151c80fc39bd51f03dcff40b920de3eLennart Poetteringstatic void install_crash_handler(void) {
533bb267f13e2f7b4d7b78de30e821dc81c82335Lennart Poettering sigaction_many(&sa, SIGNALS_CRASH_HANDLER, -1);
b42de08aa4c97636e42c28c7bce08f0d7c2a719aZbigniew Jędrzejewski-Szmek /* If we are init, we connect stdin/stdout/stderr to /dev/null
b42de08aa4c97636e42c28c7bce08f0d7c2a719aZbigniew Jędrzejewski-Szmek * and make sure we don't have a controlling tty. */
14a32924c9b46817c92ae11c1147a59dcb62012bLennart Poettering if ((tty_fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC)) < 0) {
14a32924c9b46817c92ae11c1147a59dcb62012bLennart Poettering log_error("Failed to open /dev/console: %s", strerror(-tty_fd));
563b1bdc09efe0cf94dd3f514f30376ca854c1ceLennart Poettering log_error("Failed to reset /dev/console: %s", strerror(-r));
ed220efd6657822332b9563ec53c5ab9f3c33220Lennart Poetteringstatic int set_default_unit(const char *u) {
41488fe9024a8955d19811620fd55dcc56a5b2baLennart Poettering if (!(c = strdup(u)))
1dbe0a6efda7b1d35957eab7e1d56a2c69d806d9Lennart Poetteringstatic int parse_proc_cmdline_word(const char *word) {
157a180e4fc827606833a6724834ba7b0246d650Tom Gundersen static const char * const rlmap[] = {
279f036675536d55c901562b49f9df146af1a0e3Lennart Poettering else if (startswith(word, "systemd.log_target=")) {
e2a69298819b58f008be61d314f8ab95ccaec427Lennart Poettering log_warning("Failed to parse log target %s. Ignoring.", word + 19);
2834ffe78d7fd8be118429aa1449ac72641638c2Lennart Poettering } else if (startswith(word, "systemd.log_level=")) {
a940778fb1dd16479f455bab3ac6cbdbc5b06165Lennart Poettering if (log_set_max_level_from_string(word + 18) < 0)
a940778fb1dd16479f455bab3ac6cbdbc5b06165Lennart Poettering log_warning("Failed to parse log level %s. Ignoring.", word + 18);
3c779fa59d1825d7db2a9516669d34ded7916913Lennart Poettering } else if (startswith(word, "systemd.log_color=")) {
a01647e53727107d82382bc5c9d98c894e8f386cLennart Poettering if (log_show_color_from_string(word + 18) < 0)
3de03738fc970496d2d3da668c72767a48ccc41bLennart Poettering log_warning("Failed to parse log color setting %s. Ignoring.", word + 18);
2b1c3767515672dfd0f5e0a9c9d7ac3a16a6a361Lennart Poettering } else if (startswith(word, "systemd.log_location=")) {
37efac5ddb21fd91ed420c070ed07f375e78b3b9Lennart Poettering if (log_show_location_from_string(word + 21) < 0)
37efac5ddb21fd91ed420c070ed07f375e78b3b9Lennart Poettering log_warning("Failed to parse log location setting %s. Ignoring.", word + 21);
7348b3adb324614132cf376f478e883bd7de28f1Lennart Poettering } else if (startswith(word, "systemd.dump_core=")) {
81429136905a6204875174b60a179333b7f3c9e4Kay Sievers log_warning("Failed to parse dump core switch %s, Ignoring.", word + 18);
01083ad094664e5c685060f4fb35a05ea2f212edLennart Poettering } else if (startswith(word, "systemd.crash_shell=")) {
769918ecd30c0f7ee6e87b9aa6226d956bd2f530Lennart Poettering log_warning("Failed to parse crash shell switch %s, Ignoring.", word + 20);
6a3f892a23db71544d0439355f96c44350dafa8fLennart Poettering } else if (startswith(word, "systemd.confirm_spawn=")) {
6a3f892a23db71544d0439355f96c44350dafa8fLennart Poettering log_warning("Failed to parse confirm spawn switch %s, Ignoring.", word + 22);
f8901862b2b030921b3d5aba4157044ceab16451Lennart Poettering } else if (startswith(word, "systemd.crash_chvt=")) {
d4fdc205a4610965cee46408dbd046c922e7620cLennart Poettering log_warning("Failed to parse crash chvt switch %s, Ignoring.", word + 19);
af1082b04a3d45a9b1d796b4271f44e87e307026Lennart Poettering } else if (startswith(word, "systemd.show_status=")) {
488ad3b32a7e2b5b1380abf4a15e5f65fa65f3feLennart Poettering log_warning("Failed to parse show status switch %s, Ignoring.", word + 20);
488ad3b32a7e2b5b1380abf4a15e5f65fa65f3feLennart Poettering } else if (startswith(word, "systemd.default_standard_output=")) {
09ecd746c9d6581664873674c2188f8c93ed7780Lennart Poettering if ((r = exec_output_from_string(word + 32)) < 0)
09ecd746c9d6581664873674c2188f8c93ed7780Lennart Poettering log_warning("Failed to parse default standard output switch %s, Ignoring.", word + 32);
09ecd746c9d6581664873674c2188f8c93ed7780Lennart Poettering } else if (startswith(word, "systemd.default_standard_error=")) {
f38afcd0c7f558ca5bf0854b42f8c6954f8ad7f3Lennart Poettering if ((r = exec_output_from_string(word + 31)) < 0)
f38afcd0c7f558ca5bf0854b42f8c6954f8ad7f3Lennart Poettering log_warning("Failed to parse default standard error switch %s, Ignoring.", word + 31);
f38afcd0c7f558ca5bf0854b42f8c6954f8ad7f3Lennart Poettering } else if (startswith(word, "systemd.sysv_console=")) {
f38afcd0c7f558ca5bf0854b42f8c6954f8ad7f3Lennart Poettering log_warning("Failed to parse SysV console switch %s, Ignoring.", word + 20);
47c94a96df29080f8b3a97e7362df4e9c6ba3265Lennart Poettering } else if (startswith(word, "systemd.")) {
718db96199eb307751264e4163555662c9a389faLennart Poettering log_warning("Unknown kernel switch %s. Ignoring.", word);
718db96199eb307751264e4163555662c9a389faLennart Poettering "systemd.unit=UNIT Default unit to start\n"
718db96199eb307751264e4163555662c9a389faLennart Poettering "systemd.dump_core=0|1 Dump core on crash\n"
718db96199eb307751264e4163555662c9a389faLennart Poettering "systemd.crash_shell=0|1 Run shell on crash\n"
966204e010ed432a1d7a0481d41a326d8ec7b0c8Lennart Poettering "systemd.crash_chvt=N Change to VT #N on crash\n"
966204e010ed432a1d7a0481d41a326d8ec7b0c8Lennart Poettering "systemd.confirm_spawn=0|1 Confirm every process spawn\n"
94676f3e9352cbf1f72e0a512ee0d2ed83ff676dLennart Poettering "systemd.show_status=0|1 Show status updates on the console during bootup\n"
416446221d905b6815175dc4d525d27f8ae43d1bLennart Poettering "systemd.sysv_console=0|1 Connect output of SysV scripts to console\n"
7f79cd7109a60810140a045cc725291fc5515264Lennart Poettering "systemd.log_target=console|kmsg|syslog|syslog-or-kmsg|null\n"
0aafd43d235982510d1c40564079f7bcec0c7c19Lennart Poettering " Log target\n"
19aadacf92ad86967ffb678e37b2ff9e83cb9480Jan Engelhardt "systemd.log_level=LEVEL Log level\n"
19aadacf92ad86967ffb678e37b2ff9e83cb9480Jan Engelhardt "systemd.log_color=0|1 Highlight important log messages\n"
df5f6971e6e15b4632884916c71daa076c8bae96Lennart Poettering "systemd.log_location=0|1 Include code location in log messages\n"
df5f6971e6e15b4632884916c71daa076c8bae96Lennart Poettering "systemd.default_standard_output=null|tty|syslog|syslog+console|kmsg|kmsg+console\n"
fcba531ed4c6e6f8f21d8ca4e3a56e3162b1c578Lennart Poettering " Set default log output for services\n"
fcba531ed4c6e6f8f21d8ca4e3a56e3162b1c578Lennart Poettering "systemd.default_standard_error=null|tty|syslog|syslog+console|kmsg|kmsg+console\n"
6aaa8c2f783cd1b3ac27c5ce40625d032e7e3d71Zbigniew Jędrzejewski-Szmek " Set default log error output for services\n");
4e09014daf8f98584b3f15e64e93bed232e70a6bLennart Poettering /* SysV compatibility */
e9fd44b728ff1fc0d1f24fccb87a767f6865df27Lennart Poettering FOREACH_WORD_QUOTED(w, l, rvalue, state) {
8ed206517c2be381324ac5832bf34cc14024270eLennart Poettering if (!(t = strndup(w, l)))
f38afcd0c7f558ca5bf0854b42f8c6954f8ad7f3Lennart Poettering log_error("[%s:%u] Failed to parse CPU affinity: %s", filename, line, rvalue);
279f036675536d55c901562b49f9df146af1a0e3Lennart Poettering CPU_SET_S(cpu, CPU_ALLOC_SIZE(ncpus), c);
279f036675536d55c901562b49f9df146af1a0e3Lennart Poettering if (sched_setaffinity(0, CPU_ALLOC_SIZE(ncpus), c) < 0)
279f036675536d55c901562b49f9df146af1a0e3Lennart Poettering log_warning("Failed to set CPU affinity: %m");
e673ad0415d89c322e5b1a121e411f1b1d8075c0Lennart Poetteringstatic DEFINE_CONFIG_PARSE_ENUM(config_parse_output, exec_output, ExecOutput, "Failed to parse output specifier");
e673ad0415d89c322e5b1a121e411f1b1d8075c0Lennart Poetteringstatic int parse_config_file(void) {
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "LogLevel", config_parse_level, NULL, "Manager" },
57f2a947270faf65e1876797b930e3f6d60ebd06Lennart Poettering { "LogTarget", config_parse_target, NULL, "Manager" },
c06bf414042cd1bf94e0af63e9e2a0c291bfc546Kay Sievers { "LogColor", config_parse_color, NULL, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "LogLocation", config_parse_location, NULL, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "DumpCore", config_parse_bool, &arg_dump_core, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "CrashShell", config_parse_bool, &arg_crash_shell, "Manager" },
d28315e4aff91560ed4c2fc9f876ec8bfc559f2dJan Engelhardt { "ShowStatus", config_parse_bool, &arg_show_status, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "SysVConsole", config_parse_bool, &arg_sysv_console, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "CrashChVT", config_parse_int, &arg_crash_chvt, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "CPUAffinity", config_parse_cpu_affinity, NULL, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "MountAuto", config_parse_bool, &arg_mount_auto, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "SwapAuto", config_parse_bool, &arg_swap_auto, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "DefaultControllers", config_parse_strv, &arg_default_controllers, "Manager" },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "DefaultStandardOutput", config_parse_output, &arg_default_std_output, "Manager" },
f47ec8ebb3858553dec870e1c596e39525f46360Lennart Poettering { "DefaultStandardError", config_parse_output, &arg_default_std_error, "Manager" },
038cf33420afa5f913fe5cbf3e7138574c33d97bZbigniew Jędrzejewski-Szmek static const char * const sections[] = {
601d9d6fb394a780765e80581daab850623e9698Josh Triplett fn = arg_running_as == MANAGER_SYSTEM ? SYSTEM_CONFIG_FILE : USER_CONFIG_FILE;
f38afcd0c7f558ca5bf0854b42f8c6954f8ad7f3Lennart Poettering log_warning("Failed to open configuration file '%s': %m", fn);
d28315e4aff91560ed4c2fc9f876ec8bfc559f2dJan Engelhardt if ((r = config_parse(fn, f, sections, items, false, NULL)) < 0)
f38afcd0c7f558ca5bf0854b42f8c6954f8ad7f3Lennart Poettering log_warning("Failed to parse configuration file: %s", strerror(-r));
279f036675536d55c901562b49f9df146af1a0e3Lennart Poetteringstatic int parse_proc_cmdline(void) {
8b8f259170e35b93e6c6d1757cb8b835bbdaa40cZbigniew Jędrzejewski-Szmek if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
f38afcd0c7f558ca5bf0854b42f8c6954f8ad7f3Lennart Poetteringstatic int parse_argv(int argc, char *argv[]) {
603cd8fe07cb03e8b11722d1a732e569e5a46347Lennart Poettering { "log-level", required_argument, NULL, ARG_LOG_LEVEL },
a7a3f28be404875eff20443a0fa8088bcc4c18dfLennart Poettering { "log-target", required_argument, NULL, ARG_LOG_TARGET },
a7a3f28be404875eff20443a0fa8088bcc4c18dfLennart Poettering { "log-color", optional_argument, NULL, ARG_LOG_COLOR },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "log-location", optional_argument, NULL, ARG_LOG_LOCATION },
08f9588885c5d65694b324846b0ed19211d2c178Lennart Poettering { "unit", required_argument, NULL, ARG_UNIT },
71ef24d09573874c0f7bc323c07c3aec2a458707Lennart Poettering { "dump-configuration-items", no_argument, NULL, ARG_DUMP_CONFIGURATION_ITEMS },
d28315e4aff91560ed4c2fc9f876ec8bfc559f2dJan Engelhardt { "dump-core", no_argument, NULL, ARG_DUMP_CORE },
1b89884ba31cbe98f159ce2c7d6fac5f6a57698fLennart Poettering { "crash-shell", no_argument, NULL, ARG_CRASH_SHELL },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "confirm-spawn", no_argument, NULL, ARG_CONFIRM_SPAWN },
9cb74bcb23dde8488459ca233bf9caee642b8402Zbigniew Jędrzejewski-Szmek { "show-status", optional_argument, NULL, ARG_SHOW_STATUS },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "sysv-console", optional_argument, NULL, ARG_SYSV_CONSOLE },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "deserialize", required_argument, NULL, ARG_DESERIALIZE },
b44be3ecf6326c27aa2c6c6d1fe34e22e22592a0Lennart Poettering { "introspect", optional_argument, NULL, ARG_INTROSPECT },
5f1dac6bf605871615b35891a3966fa474db5b20Lennart Poettering { "default-standard-output", required_argument, NULL, ARG_DEFAULT_STD_OUTPUT, },
f801968466fed39d50d410b30ac828c26722cc95Lennart Poettering { "default-standard-error", required_argument, NULL, ARG_DEFAULT_STD_ERROR, },
4a30847b9d71e0381948d68279c8f775b9de7850Lennart Poettering while ((c = getopt_long(argc, argv, "hD", options, NULL)) >= 0)
68f160039eb78fe122cfe0d4c49695ae91f6f0d1Lennart Poettering if ((r = log_set_max_level_from_string(optarg)) < 0) {
0790b9fed42eefc4e22dbbe2337cba9713b7848cLennart Poettering log_error("Failed to parse log level %s.", optarg);
fd4d89b2c0b31da01d134301e30916931ae3c7d9Lennart Poettering if ((r = log_set_target_from_string(optarg)) < 0) {
fd4d89b2c0b31da01d134301e30916931ae3c7d9Lennart Poettering log_error("Failed to parse log target %s.", optarg);
3471bedc005fab03f40b99bf6599645330adcd9eLennart Poettering if ((r = log_show_color_from_string(optarg)) < 0) {
59cea26a349cfa8db906b520dac72563dd773ff2Lennart Poettering log_error("Failed to parse log color setting %s.", optarg);
d3a3f22267a7dac426b07a7ed0baa1632f5daf04Kay Sievers if ((r = log_show_location_from_string(optarg)) < 0) {
d3a3f22267a7dac426b07a7ed0baa1632f5daf04Kay Sievers log_error("Failed to parse log location setting %s.", optarg);
b8217b7bd5fd171916a095b150fad4c3a37f5a41Kay Sievers if ((r = exec_output_from_string(optarg)) < 0) {
169c4f65131fbc7bcb51e7d5487a715cdcd0e0ebLennart Poettering log_error("Failed to parse default standard output setting %s.", optarg);
d0e5a33374cee92962af33dfc03873e470b014f6Lennart Poettering if ((r = exec_output_from_string(optarg)) < 0) {
d0e5a33374cee92962af33dfc03873e470b014f6Lennart Poettering log_error("Failed to parse default standard error output setting %s.", optarg);
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers log_error("Failed to set default unit %s: %s", optarg, strerror(-r));
1258097cd3cdbc5dd3d264850119e553a29c5068Lennart Poettering arg_action = ACTION_DUMP_CONFIGURATION_ITEMS;
796b06c21b62d13c9021e2fbd9c58a5c6edb2764Kay Sievers log_error("Failed to show status boolean %s.", optarg);
3040728b6691ea2e9df3a2060e2d49a792bbaedaLennart Poettering log_error("Failed to SysV console boolean %s.", optarg);