diff --git a/man/systemctl.xml b/man/systemctl.xml index 61f8d9c9fe..e67469ee46 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1060,6 +1060,14 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err Environment Commands + systemd supports an environment block that is passed to processes the manager + spawns. The names of the variables can contain ASCII letters, digits, and the underscore + character. Variable names cannot be empty or start with a digit. In variable values, most characters + are allowed, but non-printable characters are currently rejected. The total length of the environment + block is limited to _SC_ARG_MAX value defined by + sysconf3. + + show-environment @@ -1091,8 +1099,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err set-environment VARIABLE=VALUE - Set one or more systemd manager environment variables, - as specified on the command line. + Set one or more systemd manager environment variables, as specified on the command + line. This command will fail if variable names and values do not conform to the rules listed + above. @@ -1113,13 +1122,11 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - Import all, one or more environment variables set on - the client into the systemd manager environment block. If - no arguments are passed, the entire environment block is - imported. Otherwise, a list of one or more environment - variable names should be passed, whose client-side values - are then imported into the manager's environment - block. + Import all, one or more environment variables set on the client into the systemd manager + environment block. If no arguments are passed, the entire environment block is imported. + Otherwise, a list of one or more environment variable names should be passed, whose client-side + values are then imported into the manager's environment block. This command will silently ignore + any assignments which do not conform to the rules listed above. diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 9da919c379..454dd66199 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -2186,13 +2186,18 @@ SystemCallErrorNumber=EPERM Environment= - Sets environment variables for executed processes. Takes a space-separated list of variable - assignments. This option may be specified more than once, in which case all listed variables will be set. If - the same variable is set twice, the later setting will override the earlier setting. If the empty string is - assigned to this option, the list of environment variables is reset, all prior assignments have no - effect. Variable expansion is not performed inside the strings, however, specifier expansion is possible. The $ - character has no special meaning. If you need to assign a value containing spaces or the equals sign to a - variable, use double quotes (") for the assignment. + Sets environment variables for executed processes. Takes a space-separated list of + variable assignments. This option may be specified more than once, in which case all listed variables + will be set. If the same variable is set twice, the later setting will override the earlier + setting. If the empty string is assigned to this option, the list of environment variables is reset, + all prior assignments have no effect. Variable expansion is not performed inside the strings, + however, specifier expansion is possible. The $ character has no special + meaning. If you need to assign a value containing spaces or the equals sign to a variable, use double + quotes (") for the assignment. + + The names of the variables can contain ASCII letters, digits, and the underscore + character. Variable names cannot be empty or start with a digit. In variable values, most characters + are allowed, but non-printable characters are currently rejected. Example: Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"