HALF ECHO LEARN / REFERENCE COLLECTION
v262.2test/test-execute/exec-unsetenvironment.service
Git blob: 16a5559bfb07dfd3e2c251a7e188eb80816a6915
Lines 1–12 of 12
# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
Description=Test for UnsetEnvironment
[Service]
# Variable expansion in the command line is done by the service manager before UnsetEnvironment= is
# applied, so $VAR6 is expanded, but the variable is not part of the environment of the executed bash.
ExecStart=bash -x -c 'test "$$FOO" = "bar" && test "$${QUUX-X}" = "X" && test "$$VAR3" = "value3" && test "$${VAR4-X}" = "X" && test "$$VAR5" = "value5" && test "$${X%b-X}" = "X" && test "$$1" = "value6" && test "$${VAR6-X}" = "X"' x $VAR6
Type=oneshot
Environment=FOO=bar QUUX=waldo VAR3=value3 VAR4=value4 VAR5=value5 X%b=%U VAR6=value6
UnsetEnvironment=QUUX=waldo VAR3=somethingelse VAR4 X%b=%U VAR6