]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: always use bash
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 24 Nov 2025 04:37:04 +0000 (13:37 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 7 Dec 2025 00:09:03 +0000 (09:09 +0900)
If sh is not bash, some builtin command behave slightly differently.
E.g. if sh is provided by busybox, its builtin test command does not check if
the path is a mount point or not, and 'test -w' only checks the access mode of
the inode. So, even if a readonly filesystem is mounted on a directory,
the test command may succeed.

To avoid such confusion, let's unconditionally use bash.

193 files changed:
test/integration-tests/TEST-04-JOURNAL/TEST-04-JOURNAL.units/forever-print-hola.service
test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/defer-reactivation.service
test/integration-tests/TEST-07-PID1/TEST-07-PID1.units/issue27953.service
test/integration-tests/TEST-07-PID1/meson.build
test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-namespaced.service
test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-non-namespaced.service
test/integration-tests/TEST-23-UNIT-FILE/TEST-23-UNIT-FILE.units/TEST-23-UNIT-FILE-retry-fail.service
test/integration-tests/TEST-52-HONORFIRSTSHUTDOWN/TEST-52-HONORFIRSTSHUTDOWN.units/test-honor-first-shutdown.service
test/integration-tests/TEST-62-RESTRICT-IFACES/TEST-62-RESTRICT-IFACES.units/TEST-62-RESTRICT-IFACES-1.service
test/integration-tests/TEST-62-RESTRICT-IFACES/TEST-62-RESTRICT-IFACES.units/TEST-62-RESTRICT-IFACES-2.service
test/integration-tests/TEST-62-RESTRICT-IFACES/TEST-62-RESTRICT-IFACES.units/TEST-62-RESTRICT-IFACES-3.service
test/integration-tests/TEST-62-RESTRICT-IFACES/TEST-62-RESTRICT-IFACES.units/TEST-62-RESTRICT-IFACES-4.service
test/integration-tests/TEST-62-RESTRICT-IFACES/TEST-62-RESTRICT-IFACES.units/TEST-62-RESTRICT-IFACES-5.service
test/integration-tests/TEST-62-RESTRICT-IFACES/TEST-62-RESTRICT-IFACES.units/TEST-62-RESTRICT-IFACES-6.service
test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63-glob.service
test/integration-tests/TEST-63-PATH/TEST-63-PATH.units/test63.service
test/test-execute/exec-ambientcapabilities-dynuser.service
test/test-execute/exec-ambientcapabilities-merge-nfsnobody.service
test/test-execute/exec-ambientcapabilities-merge-nobody.service
test/test-execute/exec-ambientcapabilities-merge.service
test/test-execute/exec-ambientcapabilities-nfsnobody.service
test/test-execute/exec-ambientcapabilities-nobody.service
test/test-execute/exec-ambientcapabilities.service
test/test-execute/exec-basic.service
test/test-execute/exec-bindpaths.service
test/test-execute/exec-capabilityboundingset-invert.service
test/test-execute/exec-capabilityboundingset-merge.service
test/test-execute/exec-capabilityboundingset-reset.service
test/test-execute/exec-capabilityboundingset-simple.service
test/test-execute/exec-condition-failed.service
test/test-execute/exec-condition-skip.service
test/test-execute/exec-cpuaffinity1.service
test/test-execute/exec-cpuaffinity2.service
test/test-execute/exec-cpuaffinity3.service
test/test-execute/exec-credentials-dir-specifier.service
test/test-execute/exec-dynamicuser-fixeduser-adm.service
test/test-execute/exec-dynamicuser-fixeduser-games.service
test/test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service
test/test-execute/exec-dynamicuser-fixeduser.service
test/test-execute/exec-dynamicuser-runtimedirectory1.service
test/test-execute/exec-dynamicuser-runtimedirectory2.service
test/test-execute/exec-dynamicuser-runtimedirectory3.service
test/test-execute/exec-dynamicuser-statedir-migrate-step1.service
test/test-execute/exec-dynamicuser-statedir-migrate-step2.service
test/test-execute/exec-dynamicuser-statedir.service
test/test-execute/exec-dynamicuser-supplementarygroups.service
test/test-execute/exec-environment-empty.service
test/test-execute/exec-environment-multiple.service
test/test-execute/exec-environment-no-substitute.service
test/test-execute/exec-environment.service
test/test-execute/exec-environmentfile.service
test/test-execute/exec-execsearchpath-environment-path-set.service
test/test-execute/exec-execsearchpath-environment.service
test/test-execute/exec-execsearchpath-environmentfile-set.service
test/test-execute/exec-execsearchpath-environmentfile.service
test/test-execute/exec-execsearchpath-passenvironment-set.service
test/test-execute/exec-execsearchpath-passenvironment.service
test/test-execute/exec-execsearchpath-unit-specifier.service
test/test-execute/exec-group-nfsnobody.service
test/test-execute/exec-group-nobody.service
test/test-execute/exec-group-nogroup.service
test/test-execute/exec-group.service
test/test-execute/exec-ignoresigpipe-no.service
test/test-execute/exec-ignoresigpipe-yes.service
test/test-execute/exec-inaccessiblepaths-mount-propagation.service
test/test-execute/exec-inaccessiblepaths-sys.service
test/test-execute/exec-ioschedulingclass-best-effort.service
test/test-execute/exec-ioschedulingclass-idle.service
test/test-execute/exec-ioschedulingclass-none.service
test/test-execute/exec-ioschedulingclass-realtime.service
test/test-execute/exec-load-credential.service
test/test-execute/exec-networknamespacepath-privatemounts-no.service
test/test-execute/exec-networknamespacepath-privatemounts-yes.service
test/test-execute/exec-noexecpaths-simple.service
test/test-execute/exec-oomscoreadjust-negative.service
test/test-execute/exec-oomscoreadjust-positive.service
test/test-execute/exec-passenvironment-absent.service
test/test-execute/exec-passenvironment-empty.service
test/test-execute/exec-passenvironment-repeated.service
test/test-execute/exec-passenvironment.service
test/test-execute/exec-personality-aarch64.service
test/test-execute/exec-personality-loongarch64.service
test/test-execute/exec-personality-ppc64.service
test/test-execute/exec-personality-ppc64le.service
test/test-execute/exec-personality-s390.service
test/test-execute/exec-personality-s390x.service
test/test-execute/exec-personality-x86-64.service
test/test-execute/exec-personality-x86.service
test/test-execute/exec-privatedevices-bind.service
test/test-execute/exec-privatedevices-disabled-by-prefix.service
test/test-execute/exec-privatedevices-no-capability-mknod.service
test/test-execute/exec-privatedevices-no-capability-sys-rawio.service
test/test-execute/exec-privatedevices-no.service
test/test-execute/exec-privatedevices-yes-capability-mknod.service
test/test-execute/exec-privatedevices-yes-capability-sys-rawio.service
test/test-execute/exec-privatedevices-yes-with-group.service
test/test-execute/exec-privatedevices-yes.service
test/test-execute/exec-privatenetwork-yes-privatemounts-no.service
test/test-execute/exec-privatenetwork-yes-privatemounts-yes.service
test/test-execute/exec-privatetmp-disabled-by-prefix.service
test/test-execute/exec-privatetmp-disconnected-after-and-requires-for-var.service
test/test-execute/exec-privatetmp-disconnected-after-and-wants-for-var.service
test/test-execute/exec-privatetmp-disconnected-defaultdependencies-no.service
test/test-execute/exec-privatetmp-disconnected-nodefaultdeps-nor-sandboxing.service
test/test-execute/exec-privatetmp-disconnected-requires-mounts-for-var.service
test/test-execute/exec-privatetmp-disconnected-wants-mounts-for-var.service
test/test-execute/exec-privatetmp-disconnected.service
test/test-execute/exec-privatetmp-no.service
test/test-execute/exec-privatetmp-yes.service
test/test-execute/exec-protecthome-tmpfs-vs-protectsystem-strict.service
test/test-execute/exec-protectkernellogs-no-capabilities.service
test/test-execute/exec-protectkernellogs-yes-capabilities.service
test/test-execute/exec-protectkernelmodules-no-capabilities.service
test/test-execute/exec-protectkernelmodules-yes-capabilities.service
test/test-execute/exec-protectkernelmodules-yes-mount-propagation.service
test/test-execute/exec-readonlypaths-mount-propagation.service
test/test-execute/exec-readonlypaths-simple.service
test/test-execute/exec-readonlypaths-with-bindpaths.service
test/test-execute/exec-readonlypaths.service
test/test-execute/exec-readwritepaths-mount-propagation.service
test/test-execute/exec-restrictnamespaces-merge-and.service
test/test-execute/exec-restrictnamespaces-merge-or.service
test/test-execute/exec-runtimedirectory-mode.service
test/test-execute/exec-runtimedirectory-owner-nfsnobody.service
test/test-execute/exec-runtimedirectory-owner-nobody.service
test/test-execute/exec-runtimedirectory-owner-nogroup.service
test/test-execute/exec-runtimedirectory-owner.service
test/test-execute/exec-runtimedirectory.service
test/test-execute/exec-set-credential.service
test/test-execute/exec-specifier-user.service
test/test-execute/exec-specifier.service
test/test-execute/exec-specifier@.service
test/test-execute/exec-standardinput-data.service
test/test-execute/exec-standardoutput-append.service
test/test-execute/exec-standardoutput-file.service
test/test-execute/exec-standardoutput-truncate.service
test/test-execute/exec-supplementarygroups-multiple-groups-default-group-user.service
test/test-execute/exec-supplementarygroups-multiple-groups-withgid.service
test/test-execute/exec-supplementarygroups-multiple-groups-withuid.service
test/test-execute/exec-supplementarygroups-single-group-user.service
test/test-execute/exec-supplementarygroups-single-group.service
test/test-execute/exec-supplementarygroups.service
test/test-execute/exec-systemcallfilter-failing.service
test/test-execute/exec-systemcallfilter-failing2.service
test/test-execute/exec-systemcallfilter-failing3.service
test/test-execute/exec-systemcallfilter-nonewprivileges-bounding1.service
test/test-execute/exec-systemcallfilter-nonewprivileges-bounding2.service
test/test-execute/exec-systemcallfilter-nonewprivileges-protectclock.service
test/test-execute/exec-systemcallfilter-nonewprivileges.service
test/test-execute/exec-systemcallfilter-not-failing.service
test/test-execute/exec-systemcallfilter-not-failing2.service
test/test-execute/exec-systemcallfilter-not-failing3.service
test/test-execute/exec-systemcallfilter-system-user-nfsnobody.service
test/test-execute/exec-systemcallfilter-system-user-nobody.service
test/test-execute/exec-systemcallfilter-system-user.service
test/test-execute/exec-temporaryfilesystem-options.service
test/test-execute/exec-temporaryfilesystem-ro.service
test/test-execute/exec-temporaryfilesystem-rw.service
test/test-execute/exec-temporaryfilesystem-usr.service
test/test-execute/exec-umask-0177.service
test/test-execute/exec-umask-default.service
test/test-execute/exec-unsetenvironment.service
test/test-execute/exec-user-nfsnobody.service
test/test-execute/exec-user-nobody.service
test/test-execute/exec-user.service
test/test-execute/exec-workingdirectory-trailing-dot.service
test/test-execute/exec-workingdirectory.service
test/test-udev.py
test/units/TEST-03-JOBS.sh
test/units/TEST-04-JOURNAL.journal.sh
test/units/TEST-07-PID1.delegate-namespaces.sh
test/units/TEST-07-PID1.exec-context.sh
test/units/TEST-07-PID1.exec-timestamps.sh
test/units/TEST-07-PID1.issue-1981.sh
test/units/TEST-07-PID1.issue-27953.sh
test/units/TEST-07-PID1.issue-30412.sh
test/units/TEST-07-PID1.issue-3171.sh
test/units/TEST-07-PID1.protect-control-groups.sh
test/units/TEST-07-PID1.transient-unit-container.sh
test/units/TEST-13-NSPAWN.machined.sh
test/units/TEST-13-NSPAWN.nspawn-oci.sh
test/units/TEST-13-NSPAWN.nss-mymachines.sh
test/units/TEST-16-EXTEND-TIMEOUT.sh
test/units/TEST-23-UNIT-FILE.ExecStopPost.sh
test/units/TEST-23-UNIT-FILE.StandardOutput.sh
test/units/TEST-23-UNIT-FILE.statedir.sh
test/units/TEST-34-DYNAMICUSERMIGRATE.sh
test/units/TEST-43-PRIVATEUSER-UNPRIV.sh
test/units/TEST-46-HOMED.sh
test/units/TEST-50-DISSECT.dissect.sh
test/units/TEST-50-DISSECT.mountfsd.sh
test/units/TEST-65-ANALYZE.sh
test/units/autorelabel.service

index 9273d6d3fb87fcb472a8c9972e83334d15eacc6f..6858ceb29bee3cd6db22586381cecfdc003b259c 100644 (file)
@@ -4,4 +4,4 @@ Description=ForeverPrintHola service
 
 [Service]
 Type=exec
-ExecStart=sh -x -c 'while :; do printf "Hola\n" || touch /tmp/i-lose-my-logs; sleep 1; done'
+ExecStart=bash -x -c 'while :; do printf "Hola\n" || touch /tmp/i-lose-my-logs; sleep 1; done'
index 9c7332d6c994ad001376a79c133548e1a00aa343..de30aff6033bc64fc7e678d5bbde3a50a39f7a91 100644 (file)
@@ -3,4 +3,4 @@ Description=Test for DeferReactivation=yes (service)
 
 [Service]
 Type=simple
-ExecStart=sh -c 'date +%%s >>/tmp/defer-reactivation.log; sleep 5'
+ExecStart=bash -c 'date +%%s >>/tmp/defer-reactivation.log; sleep 5'
index f44106782287db9e8aa395966efc136ca2472134..ca75d37addbecf36f8092c9bed2eaa380d02e136 100644 (file)
@@ -4,4 +4,4 @@ Description=This unit should not remain active once the shell process exits
 
 [Service]
 Type=oneshot
-ExecStart=sh -c 'sleep infinity & exit 0'
+ExecStart=bash -c 'sleep infinity & exit 0'
index 678fc5f0ec5339998ab5aaefdd704856a332248d..39077437a005b1cbd05038b772e0ab0f05a7b989 100644 (file)
@@ -7,7 +7,7 @@ integration_tests += [
                         'service' : integration_test_template['configuration']['service'] + {
                                 'NotifyAccess' : 'all',
                                 # Issue: https://github.com/systemd/systemd/issues/2691
-                                'ExecStop' : 'sh -c \'kill -SEGV $$$$\'',
+                                'ExecStop' : 'bash -c \'kill -SEGV $$$$\'',
                                 'RemainAfterExit' : 'yes',
                                 'TimeoutStopSec' : '270s',
                         },
index 82eb74c0bd8e5d3525a3447217f4427edbbbafa3..382361450487012a49b9fef550f255956e312d9e 100644 (file)
@@ -10,4 +10,4 @@ PrivateTmp=yes
 BindPaths=/run/TEST-23-UNIT-FILE-marker-fixed:/tmp/testfile-marker-fixed
 InaccessiblePaths=/run/inaccessible
 ExecStartPre=grep -q -F MARKER_FIXED /tmp/testfile-marker-fixed
-ExecStart=sh -c 'systemd-notify --ready; until grep -q -F MARKER_RUNTIME /tmp/testfile-marker-runtime; do sleep 0.1; done; test ! -f /run/inaccessible/testfile-marker-fixed'
+ExecStart=bash -c 'systemd-notify --ready; until grep -q -F MARKER_RUNTIME /tmp/testfile-marker-runtime; do sleep 0.1; done; test ! -f /run/inaccessible/testfile-marker-fixed'
index 699b6080d337700f839b75e81c269f5476a00146..bb94a4629eb034dcdeaa48a18d1566cd9f7c0a5e 100644 (file)
@@ -3,4 +3,4 @@
 RuntimeMaxSec=5
 Type=notify
 RemainAfterExit=yes
-ExecStart=sh -c 'systemd-notify --ready; until grep -q -F MARKER_RUNTIME /tmp/testfile-marker-runtime; do sleep 0.1; done; exit 0'
+ExecStart=bash -c 'systemd-notify --ready; until grep -q -F MARKER_RUNTIME /tmp/testfile-marker-runtime; do sleep 0.1; done; exit 0'
index 319757a44d168310d5986178c2ae1eab126846dc..bf68ca2dda096250b04541bd765999351171d6b9 100644 (file)
@@ -5,5 +5,5 @@ Description=Failed Dependency Unit
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=sh -c "if [ -f /tmp/TEST-23-UNIT-FILE-retry-fail ]; then exit 0; else exit 1; fi"
+ExecStart=bash -c "if [ -f /tmp/TEST-23-UNIT-FILE-retry-fail ]; then exit 0; else exit 1; fi"
 Restart=no
index bbeac3a74e63344d2d19cdbf5e63f025773ae840..687d7491564b4b2538b2e8fdf1892782fbb1e48f 100644 (file)
@@ -5,7 +5,7 @@ After=multi-user.target
 
 [Service]
 ExecStart=/usr/lib/systemd/tests/testdata/TEST-52-HONORFIRSTSHUTDOWN.units/%N.sh
-ExecStop=sh -c 'kill -KILL $MAINPID'
+ExecStop=bash -c 'kill -KILL $MAINPID'
 FailureAction=reboot
 
 [Install]
index 16695c18a2b9bbc18505b08310db245495e8d8ce..dc0bea2c50bb0cdc77cf660abeee176b92338ffe 100644 (file)
@@ -2,8 +2,8 @@
 [Unit]
 Description=TEST-62-RESTRICT-IFACES-all-pings-work
 [Service]
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.1'
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.5'
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.9'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.1'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.5'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.9'
 RestrictNetworkInterfaces=
 Type=oneshot
index bce7e8e6cbaca0986ce4175185b09fcdbfbdbffa..7bbb2149fdf540e33d24740ef8fdce4b57484e66 100644 (file)
@@ -2,9 +2,9 @@
 [Unit]
 Description=TEST-62-RESTRICT-IFACES-allow-list
 [Service]
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.1'
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.5'
-ExecStart=sh -c '! ping -c 1 -W 0.2 192.168.113.9'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.1'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.5'
+ExecStart=bash -c '! ping -c 1 -W 0.2 192.168.113.9'
 RestrictNetworkInterfaces=veth0
 RestrictNetworkInterfaces=veth1
 Type=oneshot
index 116530bad3507f074bd5abd918da4d8e9ae842f4..bf70ab24a778d8966c0fbcf3a06d080ba77d984e 100644 (file)
@@ -2,9 +2,9 @@
 [Unit]
 Description=TEST-62-RESTRICT-IFACES-deny-list
 [Service]
-ExecStart=sh -c '! ping -c 1 -W 0.2 192.168.113.1'
-ExecStart=sh -c '! ping -c 1 -W 0.2 192.168.113.5'
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.9'
+ExecStart=bash -c '! ping -c 1 -W 0.2 192.168.113.1'
+ExecStart=bash -c '! ping -c 1 -W 0.2 192.168.113.5'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.9'
 RestrictNetworkInterfaces=~veth0
 RestrictNetworkInterfaces=~veth1
 Type=oneshot
index 200a38355a300d31d9b845744166137cf52dd59d..7e22a32b0c318b774c4c3172b14759a89f306556 100644 (file)
@@ -2,9 +2,9 @@
 [Unit]
 Description=TEST-62-RESTRICT-IFACES-empty-assignment
 [Service]
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.1'
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.5'
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.9'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.1'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.5'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.9'
 RestrictNetworkInterfaces=veth0
 RestrictNetworkInterfaces=
 Type=oneshot
index 51761ba27eba88b08c4f266be850854693ddaca1..20fe46291894fcb8167f3ea1440beca9681dd1e2 100644 (file)
@@ -2,9 +2,9 @@
 [Unit]
 Description=TEST-62-RESTRICT-IFACES-invert-assignment
 [Service]
-ExecStart=sh -c '! ping -c 1 -W 0.2 192.168.113.1'
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.5'
-ExecStart=sh -c '! ping -c 1 -W 0.2 192.168.113.9'
+ExecStart=bash -c '! ping -c 1 -W 0.2 192.168.113.1'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.5'
+ExecStart=bash -c '! ping -c 1 -W 0.2 192.168.113.9'
 RestrictNetworkInterfaces=veth0
 RestrictNetworkInterfaces=veth0 veth1
 RestrictNetworkInterfaces=~veth0
index b7e91f7e68211860bf1f6a0e66a1dd0ed78b29e8..e0c13ca5d14b04146c873d1ef46c27d32449513f 100644 (file)
@@ -2,9 +2,9 @@
 [Unit]
 Description=TEST-62-RESTRICT-IFACES-altname
 [Service]
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.1'
-ExecStart=sh -c 'ping -c 1 -W 0.2 192.168.113.5'
-ExecStart=sh -c '! ping -c 1 -W 0.2 192.168.113.9'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.1'
+ExecStart=bash -c 'ping -c 1 -W 0.2 192.168.113.5'
+ExecStart=bash -c '! ping -c 1 -W 0.2 192.168.113.9'
 RestrictNetworkInterfaces=veth0-altname-with-more-than-15-chars
 RestrictNetworkInterfaces=veth1-altname-with-more-than-15-chars
 Type=oneshot
index 3f49dd4620c082ef402eff5727feef49d3120bb1..50818a8d10568f032b0a716d9b45e42911e13834 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 [Service]
-ExecStartPre=sh -c 'test "$TRIGGER_PATH" = /tmp/test63-glob-foo'
-ExecStartPre=sh -c 'test "$TRIGGER_UNIT" = test63-glob.path'
+ExecStartPre=bash -c 'test "$TRIGGER_PATH" = /tmp/test63-glob-foo'
+ExecStartPre=bash -c 'test "$TRIGGER_UNIT" = test63-glob.path'
 ExecStart=systemd-notify --ready
 RemainAfterExit=yes
 Type=notify
index 01a928b8d6dea2e0a5cd71d58d44acc6fdc143a8..b6360f779498dca705152bca2da0e8e4569b2e43 100644 (file)
@@ -3,6 +3,6 @@
 ConditionPathExists=/tmp/nonexistent
 
 [Service]
-ExecStartPre=sh -c 'test "$TRIGGER_PATH" = /tmp/test63'
-ExecStartPre=sh -c 'test "$TRIGGER_UNIT" = test63.path'
+ExecStartPre=bash -c 'test "$TRIGGER_PATH" = /tmp/test63'
+ExecStartPre=bash -c 'test "$TRIGGER_UNIT" = test63.path'
 ExecStart=true
index b927c7dbca4e3ff29a2ac672231ff520e50e3714..7e3faffcc76e4861cd16990367d00987f80a23ca 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for AmbientCapabilities (dynamic user)
 
 [Service]
-ExecStart=sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:      0000000000002081"'
+ExecStart=bash -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:    0000000000002081"'
 Type=oneshot
 AmbientCapabilities=CAP_CHOWN CAP_SETUID CAP_NET_RAW
 DynamicUser=yes
index a170b3d7b687306754044b801b0a92e8921bbc9d..d2a30ef8516f4d9541abcfa460e311abb06f3798 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for AmbientCapabilities
 
 [Service]
-ExecStart=sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:      0000000000002001"'
+ExecStart=bash -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:    0000000000002001"'
 Type=oneshot
 User=nfsnobody
 AmbientCapabilities=CAP_CHOWN
index 2e21bbc58a9f97427373af99f5e248c9aa311b9f..af6cf01771e50a9b58aaf1b91c0922aef6d342a7 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for AmbientCapabilities
 
 [Service]
-ExecStart=sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:      0000000000002001"'
+ExecStart=bash -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:    0000000000002001"'
 Type=oneshot
 User=nobody
 AmbientCapabilities=CAP_CHOWN
index c4bb21b2ace879a50051a9c23173fc91b416e24e..fc5e9b1ffe68fcacf88050c28529f1a447c2d373 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for AmbientCapabilities (daemon)
 
 [Service]
-ExecStart=sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:      0000000000002001"'
+ExecStart=bash -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:    0000000000002001"'
 Type=oneshot
 User=daemon
 AmbientCapabilities=CAP_CHOWN
index 0bf91cc98f6dda1852f6cef90e8ef713288feb1d..6670018baaa6127a031b3df114359a92d9c6e18f 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for AmbientCapabilities
 
 [Service]
-ExecStart=sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:      0000000000002001"'
+ExecStart=bash -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:    0000000000002001"'
 Type=oneshot
 User=nfsnobody
 AmbientCapabilities=CAP_CHOWN CAP_NET_RAW
index 8bd7ac4f90f8f8275d5472f4a92c90926e5c65d2..c8438f2ee176e446df62658dd7f03259075ee73e 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for AmbientCapabilities
 
 [Service]
-ExecStart=sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:      0000000000002001"'
+ExecStart=bash -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:    0000000000002001"'
 Type=oneshot
 User=nobody
 AmbientCapabilities=CAP_CHOWN CAP_NET_RAW
index 1bbc7270310dd494e93d4b0b6a37f461cd4a90d7..1481ce0716caea20d883286f31d78c6877e0f02d 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for AmbientCapabilities (daemon)
 
 [Service]
-ExecStart=sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:      0000000000002001"'
+ExecStart=bash -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb:    0000000000002001"'
 Type=oneshot
 User=daemon
 AmbientCapabilities=CAP_CHOWN CAP_NET_RAW
index c29d46c2dfbbf58a7e64a54adb5c103e0e4943f4..b6cdb10391945c8351f43e51d2dc9cabb197052e 100644 (file)
@@ -27,7 +27,7 @@ ConditionVersion=glibc " >= 2" " <= 9000 " "!= 1"
 ConditionVersion=glibc " >= 2" " * "
 
 [Service]
-ExecStart=touch /tmp/a ; /bin/sh -c 'touch /tmp/b' ; touch /tmp/c
+ExecStart=touch /tmp/a ; bash -c 'touch /tmp/b' ; touch /tmp/c
 ExecStart=test -f /tmp/a
 ExecStart=!test -f /tmp/b
 ExecStart=!!test -f /tmp/c
index 12e92e2ac56cb966e79ccf16810588875cfc8933..bc680588683c2fe66341f919e2b73ee5eb0f686f 100644 (file)
@@ -11,7 +11,7 @@ ExecStart=test -f /tmp/thisisasimpletest
 # Also, through /tmp/test-exec-bindreadonlypaths
 ExecStart=test -f /tmp/test-exec-bindreadonlypaths/thisisasimpletest
 # The file cannot modify through /tmp/test-exec-bindreadonlypaths
-ExecStart=sh -x -c '! touch /tmp/test-exec-bindreadonlypaths/thisisasimpletest'
+ExecStart=bash -x -c '! touch /tmp/test-exec-bindreadonlypaths/thisisasimpletest'
 # Cleanup
 ExecStart=rm /tmp/thisisasimpletest
 BindPaths=/tmp:/tmp/test-exec-bindpaths
index 14f16c6b565f7ff5feaea9b5b97f371d8d422712..92aabc5875fe9b623a7bff7b6cac7fe6fbad5b56 100644 (file)
@@ -4,6 +4,6 @@ Description=Test for CapabilityBoundingSet
 
 [Service]
 # sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
-ExecStart=sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep "^Bounding set .*cap_chown"'
+ExecStart=bash -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep "^Bounding set .*cap_chown"'
 Type=oneshot
 CapabilityBoundingSet=~CAP_CHOWN
index d3a23706ee93021b0c6eb061b0bc375513544ec8..30746a93af7ecb80cd0dbcf0b548bda20676ce6b 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for CapabilityBoundingSet
 
 [Service]
-ExecStart=sh -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set =cap_chown,cap_fowner,cap_kill"'
+ExecStart=bash -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set =cap_chown,cap_fowner,cap_kill"'
 Type=oneshot
 CapabilityBoundingSet=CAP_FOWNER
 CapabilityBoundingSet=CAP_KILL CAP_CHOWN
index 244395165181ca7f81b4603f636b05f3ff3d109d..7354a1cb83fc46acf58f23fbd8e684bafb8ab189 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for CapabilityBoundingSet
 
 [Service]
-ExecStart=sh -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set ="'
+ExecStart=bash -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set ="'
 Type=oneshot
 CapabilityBoundingSet=CAP_FOWNER CAP_KILL
 CapabilityBoundingSet=
index 3df3e6d9aeb84de297ab31c9e085fb558530009a..9c149264d3f474a56d56c72ce0f264aee5e99e87 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for CapabilityBoundingSet
 
 [Service]
-ExecStart=sh -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set =cap_fowner,cap_kill"'
+ExecStart=bash -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set =cap_fowner,cap_kill"'
 Type=oneshot
 CapabilityBoundingSet=CAP_FOWNER CAP_KILL
index eb136fff5d4b05a1447b229aa2687dce2d297c08..6c6f6cfd12de345ac7a880fc1eb09061fd6dabe1 100644 (file)
@@ -6,7 +6,7 @@ Description=Test for exec condition that fails the unit
 Type=oneshot
 
 # exit 255 will fail the unit
-ExecCondition=/bin/sh -c 'exit 255'
+ExecCondition=bash -c 'exit 255'
 
 # This should not get run
-ExecStart=sh -c 'true'
+ExecStart=bash -c 'true'
index 4ee58b9c11f9f896ef72d60843b965afcecca940..554e7c6fbdf0c0fbd252a0c6773850c0015cf24c 100644 (file)
@@ -6,11 +6,11 @@ Description=Test for exec condition that triggers skipping
 Type=oneshot
 
 # exit codes [1, 254] will result in skipping the rest of execution
-ExecCondition=/bin/sh -c 'exit 0'
-ExecCondition=/bin/sh -c 'exit 254'
+ExecCondition=bash -c 'exit 0'
+ExecCondition=bash -c 'exit 254'
 
 # This would normally fail the unit but will not get run due to the skip above
-ExecCondition=/bin/sh -c 'exit 255'
+ExecCondition=bash -c 'exit 255'
 
 # This should not get run
-ExecStart=sh -c 'true'
+ExecStart=bash -c 'true'
index c0941a55793faf874d3ce6df98b41a99556aad90..4229ebee4e79367d50f07c72f607ce60e6a08489 100644 (file)
@@ -3,5 +3,5 @@
 Description=Test for CPUAffinity (simple)
 
 [Service]
-ExecStart=sh -c 'test $$(cat /proc/self/status | grep Cpus_allowed: | rev | cut -c 1) = 1'
+ExecStart=bash -c 'test $$(cat /proc/self/status | grep Cpus_allowed: | rev | cut -c 1) = 1'
 CPUAffinity=0
index d699ecc031d840a9cf7a37a0205927a67acb9e4e..e0d8e76d3bfff742cc2190324700dc33a6f7069e 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for CPUAffinity (reset)
 
 [Service]
-ExecStart=sh -c 'test $$(cat /proc/self/status | grep Cpus_allowed: | rev | cut -c 1) = 1'
+ExecStart=bash -c 'test $$(cat /proc/self/status | grep Cpus_allowed: | rev | cut -c 1) = 1'
 CPUAffinity=0-1 3
 CPUAffinity=
 CPUAffinity=0
index 8e8f782ac35f7ed1846596f54b39a2bc25c4e37c..61ebd5b2ea89bb48d771eb0c1a87f4e716568db5 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for CPUAffinity (merge)
 
 [Service]
-ExecStart=sh -c 'test $$(cat /proc/self/status | grep Cpus_allowed: | rev | cut -c 1) = 7'
+ExecStart=bash -c 'test $$(cat /proc/self/status | grep Cpus_allowed: | rev | cut -c 1) = 7'
 CPUAffinity=0,1
 CPUAffinity=1-2
index 5e71eee246df331047783a77c8281e03c0a796f9..2bc8f07248a563512c10fd9b52d71f4580f9b490 100644 (file)
@@ -9,10 +9,10 @@ Environment=TOP_SECRET=%d/very_top_secret
 ExecStart=test %d/very_top_secret = "${CREDENTIALS_DIRECTORY}/very_top_secret"
 LoadCredential=very_top_secret
 ExecStart=test %d/very_top_secret = "${CREDENTIALS_DIRECTORY}/very_top_secret"
-ExecStart=sh -c 'test %d/very_top_secret = "$TOP_SECRET"'
+ExecStart=bash -c 'test %d/very_top_secret = "$TOP_SECRET"'
 ExecStartPost=test %d/very_top_secret = "${CREDENTIALS_DIRECTORY}/very_top_secret"
-ExecStartPost=sh -c 'test %d/very_top_secret = "$TOP_SECRET"'
+ExecStartPost=bash -c 'test %d/very_top_secret = "$TOP_SECRET"'
 ExecStop=test %d/very_top_secret = "${CREDENTIALS_DIRECTORY}/very_top_secret"
-ExecStop=sh -c 'test %d/very_top_secret = "$TOP_SECRET"'
+ExecStop=bash -c 'test %d/very_top_secret = "$TOP_SECRET"'
 ExecStopPost=test %d/very_top_secret = "${CREDENTIALS_DIRECTORY}/very_top_secret"
-ExecStopPost=sh -c 'test %d/very_top_secret = "$TOP_SECRET"'
+ExecStopPost=bash -c 'test %d/very_top_secret = "$TOP_SECRET"'
index 3a7f8aef60f1af8d045dcdf61c4eede927d493ca..5255a010ca9613e03388efda84584fcdadf3d474 100644 (file)
@@ -5,9 +5,9 @@ Description=Test DynamicUser with static User= whose uid and gid are different
 
 [Service]
 Type=oneshot
-ExecStart=sh -x -c 'test "$$(id -nG)" = "adm" && test "$$(id -ng)" = "adm" && test "$$(id -nu)" = "adm"'
+ExecStart=bash -x -c 'test "$$(id -nG)" = "adm" && test "$$(id -ng)" = "adm" && test "$$(id -nu)" = "adm"'
 # Multiple ExecStart= lines causes the issue #9702.
-ExecStart=sh -x -c 'test "$$(id -nG)" = "adm" && test "$$(id -ng)" = "adm" && test "$$(id -nu)" = "adm"'
+ExecStart=bash -x -c 'test "$$(id -nG)" = "adm" && test "$$(id -ng)" = "adm" && test "$$(id -nu)" = "adm"'
 DynamicUser=yes
 User=adm
 ReadWritePaths=-/coverage
index 40048d27a8e915caf7de250efb73e689be62f9d8..29b712c9aa1f7491784e3de8103c92759661aecc 100644 (file)
@@ -5,9 +5,9 @@ Description=Test DynamicUser with static User= whose uid and gid are different
 
 [Service]
 Type=oneshot
-ExecStart=sh -x -c 'test "$$(id -nG)" = "games" && test "$$(id -ng)" = "games" && test "$$(id -nu)" = "games"'
+ExecStart=bash -x -c 'test "$$(id -nG)" = "games" && test "$$(id -ng)" = "games" && test "$$(id -nu)" = "games"'
 # Multiple ExecStart= lines causes the issue #9702.
-ExecStart=sh -x -c 'test "$$(id -nG)" = "games" && test "$$(id -ng)" = "games" && test "$$(id -nu)" = "games"'
+ExecStart=bash -x -c 'test "$$(id -nG)" = "games" && test "$$(id -ng)" = "games" && test "$$(id -nu)" = "games"'
 DynamicUser=yes
 User=games
 ReadWritePaths=-/coverage
index e58b5240335c8e38f715617957312185c392fa5c..8a4eabb894c05a80134a6ab474a8d1f826b1bc15 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test DynamicUser with User= and SupplementaryGroups=
 
 [Service]
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "1"'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "1"'
 Type=oneshot
 User=1
 DynamicUser=yes
index 8e5244d891c46956cd124c284c463ee149b63f6d..412198b8877c69003e1ef16d32a2d042107403af 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test DynamicUser with User=
 
 [Service]
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "1"'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "1"'
 Type=oneshot
 User=1
 DynamicUser=yes
index 671b3167360d1cdcfc09c899609ed4df8d06b89a..30d28aee07635a97ba97983021b8d02497e40dbe 100644 (file)
@@ -3,9 +3,9 @@
 Description=Test for RuntimeDirectory with RuntimeDirectoryPreserve=yes and DynamicUser=yes
 
 [Service]
-ExecStart=sh -x -c 'test -d %t/test-exec_runtimedirectorypreserve'
-ExecStart=sh -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectorypreserve"'
-ExecStart=sh -x -c 'touch $$RUNTIME_DIRECTORY/test'
+ExecStart=bash -x -c 'test -d %t/test-exec_runtimedirectorypreserve'
+ExecStart=bash -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectorypreserve"'
+ExecStart=bash -x -c 'touch $$RUNTIME_DIRECTORY/test'
 Type=oneshot
 RuntimeDirectory=test-exec_runtimedirectorypreserve
 RuntimeDirectoryPreserve=yes
index cdb80848e3d5cacbade0b4810c031e9bbf957ed2..ef9ba35c06a88026236ddd5871b70b7c8d76a988 100644 (file)
@@ -3,10 +3,10 @@
 Description=Test for RuntimeDirectory with RuntimeDirectoryPreserve=yes and DynamicUser=yes 2nd trial
 
 [Service]
-ExecStart=sh -x -c 'test -d %t/test-exec_runtimedirectorypreserve'
-ExecStart=sh -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectorypreserve"'
-ExecStart=sh -x -c 'test -f $$RUNTIME_DIRECTORY/test'
-ExecStart=sh -x -c 'touch $$RUNTIME_DIRECTORY/test'
+ExecStart=bash -x -c 'test -d %t/test-exec_runtimedirectorypreserve'
+ExecStart=bash -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectorypreserve"'
+ExecStart=bash -x -c 'test -f $$RUNTIME_DIRECTORY/test'
+ExecStart=bash -x -c 'touch $$RUNTIME_DIRECTORY/test'
 Type=oneshot
 RuntimeDirectory=test-exec_runtimedirectorypreserve
 RuntimeDirectoryPreserve=yes
index 51a9e44c6f0535bbfda1f9b875432c4479217698..a8ee6facf950e45bb8662c2e75653461cf0c20f2 100644 (file)
@@ -3,10 +3,10 @@
 Description=Test for RuntimeDirectory with DynamicUser=yes migrated from RuntimeDirectoryPreserve=yes
 
 [Service]
-ExecStart=sh -x -c 'test -d %t/test-exec_runtimedirectorypreserve'
-ExecStart=sh -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectorypreserve"'
-ExecStart=sh -x -c 'test -f $$RUNTIME_DIRECTORY/test'
-ExecStart=sh -x -c 'touch $$RUNTIME_DIRECTORY/test'
+ExecStart=bash -x -c 'test -d %t/test-exec_runtimedirectorypreserve'
+ExecStart=bash -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectorypreserve"'
+ExecStart=bash -x -c 'test -f $$RUNTIME_DIRECTORY/test'
+ExecStart=bash -x -c 'touch $$RUNTIME_DIRECTORY/test'
 Type=oneshot
 RuntimeDirectory=test-exec_runtimedirectorypreserve
 DynamicUser=yes
index 12375afbb5e5a5f073f1a29aa7b1e8939504a4d8..855a3aa64e668302e80e86f61bcd384e83432ef5 100644 (file)
@@ -11,7 +11,7 @@ ExecStart=test -d %S/test-dynamicuser-migrate
 ExecStart=test -d %S/test-dynamicuser-migrate2/hoge
 ExecStart=touch %S/test-dynamicuser-migrate/yay
 ExecStart=touch %S/test-dynamicuser-migrate2/hoge/yayyay
-ExecStart=sh -x -c 'test "$$STATE_DIRECTORY" = "%S/test-dynamicuser-migrate:%S/test-dynamicuser-migrate2/hoge"'
+ExecStart=bash -x -c 'test "$$STATE_DIRECTORY" = "%S/test-dynamicuser-migrate:%S/test-dynamicuser-migrate2/hoge"'
 
 Type=oneshot
 DynamicUser=no
index f22862378c82ce287ae44901bf44654c1247ac8c..92a421bfc1703369e4d725b390fbcbd8fce5faf4 100644 (file)
@@ -19,7 +19,7 @@ ExecStart=touch %S/test-dynamicuser-migrate/yay
 ExecStart=touch %S/test-dynamicuser-migrate2/hoge/yayyay
 ExecStart=touch %S/private/test-dynamicuser-migrate/yay
 ExecStart=touch %S/private/test-dynamicuser-migrate2/hoge/yayyay
-ExecStart=sh -x -c 'test "$$STATE_DIRECTORY" = "%S/test-dynamicuser-migrate:%S/test-dynamicuser-migrate2/hoge"'
+ExecStart=bash -x -c 'test "$$STATE_DIRECTORY" = "%S/test-dynamicuser-migrate:%S/test-dynamicuser-migrate2/hoge"'
 
 Type=oneshot
 DynamicUser=yes
index 1e4fe818ac98eb2c2bcbaad824c5b3e0c3eec152..d52684ebde073f8ed60a6c95da91edca223b36d2 100644 (file)
@@ -78,7 +78,7 @@ ExecStart=test -f %S/private/xxx/foo
 ExecStart=test -f %S/private/xxx/yyy/foo
 ExecStart=test -f %S/private/xxx/zzz/foo
 
-ExecStart=sh -x -c 'test "$$STATE_DIRECTORY" = "%S/aaa:%S/aaa/bbb:%S/aaa/ccc:%S/abc:%S/quux/pief:%S/waldo:%S/xxx:%S/xxx/yyy:%S/xxx/zzz"'
+ExecStart=bash -x -c 'test "$$STATE_DIRECTORY" = "%S/aaa:%S/aaa/bbb:%S/aaa/ccc:%S/abc:%S/quux/pief:%S/waldo:%S/xxx:%S/xxx/yyy:%S/xxx/zzz"'
 
 Type=oneshot
 DynamicUser=yes
index fd88a790e4534e79368ca42f0e278ca3df527b4e..13fc61599e47d9abe6b045f1f89dfd393640b26b 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test DynamicUser with SupplementaryGroups=
 
 [Service]
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "2" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "2" && exit 0; done; exit 1'
 Type=oneshot
 DynamicUser=yes
 SupplementaryGroups=1 2
index e5af6ffe6830e452b8c28a426ae14c955f206180..ff373d51b0a0dd0fc62feb9701714a1786216458 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for Environment
 
 [Service]
-ExecStart=sh -x -c 'test "$${VAR1-unset}" = "unset" && test "$${VAR2-unset}" = "unset" && test "$${VAR3-unset}" = "unset"'
+ExecStart=bash -x -c 'test "$${VAR1-unset}" = "unset" && test "$${VAR2-unset}" = "unset" && test "$${VAR3-unset}" = "unset"'
 Type=oneshot
 Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"
 Environment=
index 4199a46d844a8eccf1ae2f692aa38e8107132b38..c6565f492beb4c197e9114d707c1fe05dc1c4eba 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for Environment
 
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = foobar'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = foobar'
 Type=oneshot
 Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"
 Environment="VAR3=foobar"
index 7396576d7d8d9fa26331c0372027457b8ec1f658..6748c1292ad0edfc208c68c5bd86e535b0764daa 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for No Environment Variable Substitution
 
 [Service]
-ExecStart=sh -x -c 'test "$${VAR1-unset}" = "unset" && test "$${VAR2}" = "word3" && test "$${VAR3-unset}" = \'$word 5 6\''
-ExecStart=:/bin/sh -x -c 'test "$${VAR1-unset}" != "unset" && test "$${VAR2}" != "word3" && test "$${VAR3-unset}" != \'$word 5 6\''
+ExecStart=bash -x -c 'test "$${VAR1-unset}" = "unset" && test "$${VAR2}" = "word3" && test "$${VAR3-unset}" = \'$word 5 6\''
+ExecStart=:bash -x -c 'test "$${VAR1-unset}" != "unset" && test "$${VAR2}" != "word3" && test "$${VAR3-unset}" != \'$word 5 6\''
 Type=oneshot
 Environment="VAR2=word3" "VAR3=$word 5 6"
index 7e3cb0ef42a21c6b40b6f6c92df6fe1dc49e2af9..d20875840c38bb7a1cc13959ad8bc78d242d413e 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Environment
 
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6"'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6"'
 Type=oneshot
 Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"
index 3f739fa1e0470a4b5e0488608bdeff5ac4405cfc..4331dd2109483ed885595dd77bbbbdd5f2e4b9cc 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for EnvironmentFile
 
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes'
 Type=oneshot
 EnvironmentFile=/tmp/test-exec_environmentfile.conf
index 424c4ac7b6a07e102ed6b9dfd616bbb45e4c40a5..b6d3481d27b0792dee871f35aaded8554aacf811 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 [Service]
-ExecStart=sh -x -c 'test "$$PATH" = "/usr" && test "$$VAR1" = word3 && test "$$VAR2" = "\\$$word 5 6"'
+ExecStart=bash -x -c 'test "$$PATH" = "/usr" && test "$$VAR1" = word3 && test "$$VAR2" = "\\$$word 5 6"'
 Type=oneshot
 ExecSearchPath=/tmp:/bin
 Environment="PATH=/usr" VAR1=word3 "VAR2=$word 5 6"
index 5c39d9ca63b28fc3c0fb341c0a7d5fbbd1f6c8fd..aed95cbe9e6d2695f8d02cf52d194a91a9099ba2 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$PATH" = "/tmp:/bin"'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$PATH" = "/tmp:/bin"'
 Type=oneshot
 ExecSearchPath=/tmp:/bin
 Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"
index 8741582231c4b255bb3cdb4334ee4f29da378848..279c83da10488ea325690649732952630e13d513 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for ExecSearchPath with EnvironmentFile where EnvironmentFile sets PATH
 
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes && test "$$PATH" = /usr'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes && test "$$PATH" = /usr'
 Type=oneshot
 EnvironmentFile=/tmp/test-exec_execsearchpath_environmentfile-set.conf
 ExecSearchPath=/tmp:/bin
index 53cede8f1beebe6db3ed8ff7c898c8c58379cd58..29150f4b9f464a3164ab744dc50a16a72dfe6bf2 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for ExecSearchPath with EnvironmentFile where EnvironmentFile does not set PATH
 
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes && test "$$PATH" = "/tmp:/bin"'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes && test "$$PATH" = "/tmp:/bin"'
 Type=oneshot
 ExecSearchPath=/tmp:/bin
 EnvironmentFile=/tmp/test-exec_execsearchpath_environmentfile.conf
index 2d4e75a0c8b4f8ae269ad432ebff1ba9b0ef163d..05e8f93dbd376c1128461bf0ee79c00ab2d27862 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for PassEnvironment with ExecSearchPath with PATH set by user
 
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes && test "$$PATH" = "/usr"'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes && test "$$PATH" = "/usr"'
 Type=oneshot
 PassEnvironment=VAR1 VAR2 VAR3 VAR4 VAR5 PATH
 ExecSearchPath=/tmp:/bin
index 5bdab471939d5c181b70844313f266d62cd101b6..373afcee7bff4fd2a94db5a788635913ce1210f7 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for PassEnvironment with ExecSearchPath with PATH not set by user
 
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes && test "$$PATH" = "/tmp:/bin"'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes && test "$$PATH" = "/tmp:/bin"'
 Type=oneshot
 PassEnvironment=VAR1 VAR2 VAR3 VAR4 VAR5
 ExecSearchPath=/tmp:/bin
index a2037e930df4b999a0fe945d0337dd977373f4df..56e4f3f563071bd805e363e48551484081d4eedd 100644 (file)
@@ -5,4 +5,4 @@ Description=Test for specifiers with exec search path
 [Service]
 Type=oneshot
 ExecSearchPath=/tmp:/bin:/usr/bin:%V
-ExecStart=sh -x -c 'test %V = /var/tmp && test "$$PATH" = "/tmp:/bin:/usr/bin:/var/tmp"'
+ExecStart=bash -x -c 'test %V = /var/tmp && test "$$PATH" = "/tmp:/bin:/usr/bin:/var/tmp"'
index aebb1984a190a23146333e95d070b167d4b4b375..b9d0ac9a8bcf67f6880a0182ba7a339335fcb23b 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Group
 
 [Service]
-ExecStart=sh -x -c 'test "$$(id -n -g)" = "nfsnobody"'
+ExecStart=bash -x -c 'test "$$(id -n -g)" = "nfsnobody"'
 Type=oneshot
 Group=nfsnobody
index cf283cb65782e35ccfa88d8af3f0e3762457d548..c4adb5f8fa3aa47fabdff39846d7b27ed88f38aa 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Group
 
 [Service]
-ExecStart=sh -x -c 'test "$$(id -n -g)" = "nobody"'
+ExecStart=bash -x -c 'test "$$(id -n -g)" = "nobody"'
 Type=oneshot
 Group=nobody
index 46c3dd3acf6890dc579b8675230107d4f1086e38..bfdc9afa66e9ecc0bf9afec77fc0a479a5735f4c 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Group
 
 [Service]
-ExecStart=sh -x -c 'test "$$(id -n -g)" = "nogroup"'
+ExecStart=bash -x -c 'test "$$(id -n -g)" = "nogroup"'
 Type=oneshot
 Group=nogroup
index bd5ac2db3471a59a25ff864572574a8d958b5b52..5bfc4e9a2d61beafde2372ae63b1f4dd05c38740 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Group (daemon)
 
 [Service]
-ExecStart=sh -x -c 'test "$$(id -n -g)" = "daemon"'
+ExecStart=bash -x -c 'test "$$(id -n -g)" = "daemon"'
 Type=oneshot
 Group=daemon
index ce8b25871270a708e759165b69cb30bc783b3ae3..caedab1447adcd342dd8d5554ad38b48fff88a08 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for IgnoreSIGPIPE=no
 
 [Service]
-ExecStart=sh -x -c 'kill -PIPE 0'
+ExecStart=bash -x -c 'kill -PIPE 0'
 Type=oneshot
 IgnoreSIGPIPE=no
index a26f53c413e61db57d0a8be66b4af17c30f99e5f..bc093c0c0ac2edc5625388b463d5c37696093226 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for IgnoreSIGPIPE=yes
 
 [Service]
-ExecStart=sh -x -c 'kill -PIPE 0'
+ExecStart=bash -x -c 'kill -PIPE 0'
 Type=oneshot
 IgnoreSIGPIPE=yes
index 8580f5208e8c520068214a4d71801808f20c2a17..fbe754455c04689192fb3d5a67c5f06570ec445a 100644 (file)
@@ -4,5 +4,5 @@ Description=Test to make sure that InaccessiblePaths= disconnect mount propagati
 
 [Service]
 InaccessiblePaths=-/i-dont-exist
-ExecStart=sh -x -c 'd=$$(mktemp -d -p /tmp); trap "umount \'$$d\' && rmdir \'$$d\'" EXIT; mount -t tmpfs tmpfs "$$d"; grep "$$d" /proc/self/mountinfo && ! grep "$$d" /proc/$${PPID}/mountinfo && ! grep "$$d" /proc/1/mountinfo'
+ExecStart=bash -x -c 'd=$$(mktemp -d -p /tmp); trap "umount \'$$d\' && rmdir \'$$d\'" EXIT; mount -t tmpfs tmpfs "$$d"; grep "$$d" /proc/self/mountinfo && ! grep "$$d" /proc/$${PPID}/mountinfo && ! grep "$$d" /proc/1/mountinfo'
 Type=oneshot
index 64a570ce4df283e03abea2cef6b0b015bcc9d75e..599b7c854c8c2bc89401e8bd932d6dda7ba4cdcc 100644 (file)
@@ -4,5 +4,5 @@ Description=Test to make sure that mount namespace setup works properly with the
 
 [Service]
 InaccessiblePaths=/sys
-ExecStart=sh -x -c 'test "$$(stat -c %%a /sys)" = "0"'
+ExecStart=bash -x -c 'test "$$(stat -c %%a /sys)" = "0"'
 Type=oneshot
index 569183f1737da2b0b72be6e825b21ec897ae7bfd..a98d54c7cf8e16c08bca5e52b52224bef2289d5c 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for IOSchedulingClass=best-effort
 
 [Service]
-ExecStart=sh -x -c 'c=$$(LC_ALL=C ionice); test "$${c%%:*}" = "best-effort"'
+ExecStart=bash -x -c 'c=$$(LC_ALL=C ionice); test "$${c%%:*}" = "best-effort"'
 Type=oneshot
 IOSchedulingClass=best-effort
index 93377ea0c07f1394bdeb97ba189181e5df9ed1e9..7a62682478c0546acc5ae1b1e8dc4e8437677518 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for IOSchedulingClass=idle
 
 [Service]
-ExecStart=sh -x -c 'c=$$(LC_ALL=C ionice); test "$${c%%:*}" = "idle"'
+ExecStart=bash -x -c 'c=$$(LC_ALL=C ionice); test "$${c%%:*}" = "idle"'
 Type=oneshot
 IOSchedulingClass=idle
index b8198d16f2b7fe28a59efea9926908336644db9d..313eca79c5b6014342f428a620825f0f677241d9 100644 (file)
@@ -4,6 +4,6 @@ Description=Test for IOSchedulingClass=none
 
 [Service]
 # Old kernels might report "none" here, new kernels "best-effort".
-ExecStart=sh -x -c 'c=$$(LC_ALL=C ionice); test "$${c%%:*}" = "none" -o "$${c%%:*}" = "best-effort"'
+ExecStart=bash -x -c 'c=$$(LC_ALL=C ionice); test "$${c%%:*}" = "none" -o "$${c%%:*}" = "best-effort"'
 Type=oneshot
 IOSchedulingClass=none
index a7edb6d012e7529a6c825574babc15ff5570535a..83ad99e6d4a799ec0377e3afae4cfe71f1e1040b 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for IOSchedulingClass=realtime
 
 [Service]
-ExecStart=sh -x -c 'c=$$(LC_ALL=C ionice); test "$${c%%:*}" = "realtime"'
+ExecStart=bash -x -c 'c=$$(LC_ALL=C ionice); test "$${c%%:*}" = "realtime"'
 Type=oneshot
 IOSchedulingClass=realtime
index 9da19e6369c640f5c970af5a6b3b2c6374f7ad1f..d8a0a14b861951ede5523674b0bd16dddba3708f 100644 (file)
@@ -3,9 +3,9 @@
 Description=Test for LoadCredential=
 
 [Service]
-ExecStart=sh -x -c 'test "$$(cat %d/test-execute.load-credential)" = "foo"'
-ExecStartPost=sh -x -c 'test "$$(cat %d/test-execute.load-credential)" = "foo"'
-ExecStop=sh -x -c 'test "$$(cat %d/test-execute.load-credential)" = "foo"'
-ExecStopPost=sh -x -c 'test "$$(cat %d/test-execute.load-credential)" = "foo"'
+ExecStart=bash -x -c 'test "$$(cat %d/test-execute.load-credential)" = "foo"'
+ExecStartPost=bash -x -c 'test "$$(cat %d/test-execute.load-credential)" = "foo"'
+ExecStop=bash -x -c 'test "$$(cat %d/test-execute.load-credential)" = "foo"'
+ExecStopPost=bash -x -c 'test "$$(cat %d/test-execute.load-credential)" = "foo"'
 Type=oneshot
 LoadCredential=test-execute.load-credential
index 07c0525dcc611cb45a1fb1e1c27a5d88c6021899..4aad58eb69d72f77b999b38ddba0ef2e8a28fd85 100644 (file)
@@ -3,14 +3,14 @@
 Description=Test for NetworkNamespacePath= without mount namespacing
 
 [Service]
-ExecStart=sh -x -c '! ip link show dummy-test-exec'
-ExecStart=sh -x -c 'test ! -e /proc/sys/net/ipv4/conf/dummy-test-exec'
+ExecStart=bash -x -c '! ip link show dummy-test-exec'
+ExecStart=bash -x -c 'test ! -e /proc/sys/net/ipv4/conf/dummy-test-exec'
 # Without mount namespacing, we can access the dummy-test-exec interface through sysfs.
-ExecStart=sh -x -c 'test -e /sys/class/net/dummy-test-exec'
-ExecStart=sh -x -c 'ip link show dummy-test-ns'
-ExecStart=sh -x -c 'test -e /proc/sys/net/ipv4/conf/dummy-test-ns'
+ExecStart=bash -x -c 'test -e /sys/class/net/dummy-test-exec'
+ExecStart=bash -x -c 'ip link show dummy-test-ns'
+ExecStart=bash -x -c 'test -e /proc/sys/net/ipv4/conf/dummy-test-ns'
 # Without mount namespacing, we cannot access the dummy-test-ns interface through sysfs.
-ExecStart=sh -x -c 'test ! -e /sys/class/net/dummy-test-ns'
+ExecStart=bash -x -c 'test ! -e /sys/class/net/dummy-test-ns'
 Type=oneshot
 NetworkNamespacePath=/run/netns/test-execute-netns
 PrivateMounts=no
index 10bc1923b794be80ec39445fb5fc6baffd9a5323..9efd54ae6c8f0b9b2b5023895ba869caba277d9a 100644 (file)
@@ -3,14 +3,14 @@
 Description=Test for NetworkNamespacePath= with mount namespacing
 
 [Service]
-ExecStart=sh -x -c '! ip link show dummy-test-exec'
-ExecStart=sh -x -c 'test ! -e /proc/sys/net/ipv4/conf/dummy-test-exec'
+ExecStart=bash -x -c '! ip link show dummy-test-exec'
+ExecStart=bash -x -c 'test ! -e /proc/sys/net/ipv4/conf/dummy-test-exec'
 # With mount namespacing, we cannot access the dummy-test-exec interface through sysfs.
-ExecStart=sh -x -c 'test ! -e /sys/class/net/dummy-test-exec'
-ExecStart=sh -x -c 'ip link show dummy-test-ns'
-ExecStart=sh -x -c 'test -e /proc/sys/net/ipv4/conf/dummy-test-ns'
+ExecStart=bash -x -c 'test ! -e /sys/class/net/dummy-test-exec'
+ExecStart=bash -x -c 'ip link show dummy-test-ns'
+ExecStart=bash -x -c 'test -e /proc/sys/net/ipv4/conf/dummy-test-ns'
 # With mount namespacing, we can access the dummy-test-ns interface through sysfs.
-ExecStart=sh -x -c 'test -e /sys/class/net/dummy-test-ns'
+ExecStart=bash -x -c 'test -e /sys/class/net/dummy-test-ns'
 Type=oneshot
 NetworkNamespacePath=/run/netns/test-execute-netns
 # NetworkNamespacePath= implies PrivateMounts=yes
index 503be5a770930a85f34583ed57df92a172ed800b..2eb8aae6abb7190de73d4a977faff55b82585b3d 100644 (file)
@@ -5,7 +5,7 @@ Description=Test for NoExecPaths=
 [Service]
 Type=oneshot
 # This should work, as we explicitly disable the effect of NoExecPaths=
-ExecStart=+/bin/sh -c '/bin/cat /dev/null'
+ExecStart=+bash -c '/bin/cat /dev/null'
 # This should also work, as we do not disable the effect of NoExecPaths= but invert the exit code
-ExecStart=sh -x -c '! /bin/cat /dev/null'
+ExecStart=bash -x -c '! /bin/cat /dev/null'
 NoExecPaths=/bin/cat
index 56560307968020ff09225c6f0830eac6b303edb4..a6d3a52d4ed653ada5699a665f11752d072a57a4 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for OOMScoreAdjust
 
 [Service]
-ExecStart=sh -x -c 'c=$$(cat /proc/self/oom_score_adj); test "$$c" -eq -100'
+ExecStart=bash -x -c 'c=$$(cat /proc/self/oom_score_adj); test "$$c" -eq -100'
 Type=oneshot
 OOMScoreAdjust=-100
index a2079b841ecd318b02e256d38d41bbcaecca58a2..1d903d3b7a7813169e25d072c430d46807caa5ae 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for OOMScoreAdjust
 
 [Service]
-ExecStart=sh -x -c 'c=$$(cat /proc/self/oom_score_adj); test "$$c" -eq 100'
+ExecStart=bash -x -c 'c=$$(cat /proc/self/oom_score_adj); test "$$c" -eq 100'
 Type=oneshot
 OOMScoreAdjust=100
index b2e5c200162f5991c859d64c264a3460699389d4..1b92df85c73df8fe55cd1032fb453fb89d5245bd 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for PassEnvironment with variables absent from the execution environment
 
 [Service]
-ExecStart=sh -x -c 'test "$${VAR1-unset}" = "unset" && test "$${VAR2-unset}" = "unset" && test "$${VAR3-unset}" = "unset" && test "$${VAR4-unset}" = "unset" && test "$${VAR5-unset}" = "unset"'
+ExecStart=bash -x -c 'test "$${VAR1-unset}" = "unset" && test "$${VAR2-unset}" = "unset" && test "$${VAR3-unset}" = "unset" && test "$${VAR4-unset}" = "unset" && test "$${VAR5-unset}" = "unset"'
 Type=oneshot
 PassEnvironment=VAR1 VAR2 VAR3 VAR4 VAR5
index a5fd092783eba99750c293103dd2f88eb88eb548..21db61cbc146dc06945cfadeb9f6d6d744d04148 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for PassEnvironment and erasing the variable list
 
 [Service]
-ExecStart=sh -x -c 'test "$${VAR1-unset}" = "unset" && test "$${VAR2-unset}" = "unset" && test "$${VAR3-unset}" = "unset" && test "$${VAR4-unset}" = "unset" && test "$${VAR5-unset}" = "unset"'
+ExecStart=bash -x -c 'test "$${VAR1-unset}" = "unset" && test "$${VAR2-unset}" = "unset" && test "$${VAR3-unset}" = "unset" && test "$${VAR4-unset}" = "unset" && test "$${VAR5-unset}" = "unset"'
 Type=oneshot
 PassEnvironment=VAR1 VAR2 VAR3 VAR4 VAR5
 PassEnvironment=
index f3b886c5c6920add4ac7aee2934037b16afd3da3..a2067a6aff5fba11cbbba4e607f50447b10a090b 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for PassEnvironment with a variable name repeated
 
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes'
 Type=oneshot
 PassEnvironment=VAR1 VAR2
 PassEnvironment=VAR1 VAR3
index 1dcbcf97c88da6898cc75774c1a83f64cc30d2c0..5584aa35007f72e03a8f5f9ad7ea810dc9e05ff3 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for PassEnvironment
 
 [Service]
-ExecStart=sh -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes'
+ExecStart=bash -x -c 'test "$$VAR1" = "word1 word2" && test "$$VAR2" = word3 && test "$$VAR3" = "\\$$word 5 6" && test "$$VAR4" = "new\nline" && test "$$VAR5" = passwordwithbackslashes'
 Type=oneshot
 PassEnvironment=VAR1 VAR2 VAR3 VAR4 VAR5
index e4ea294dcc24bd4aba58a0c822769c34d650deb7..72afaf386b4c81fe47b1347288bebe5364526ad4 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Personality=aarch64
 
 [Service]
-ExecStart=sh -c 'echo $(uname -m); exit $(test $(uname -m) = "aarch64")'
+ExecStart=bash -c 'echo $(uname -m); exit $(test $(uname -m) = "aarch64")'
 Type=oneshot
 Personality=aarch64
index 31c6b258c71e3998c865222e7d1a4d34464140b0..689f35ff9eec1b7e94d664b9afd5860eed7e4a37 100644 (file)
@@ -2,6 +2,6 @@
 Description=Test for Personality=loongarch64
 
 [Service]
-ExecStart=sh -c 'echo $(uname -m); exit $(test $(uname -m) = "loongarch64")'
+ExecStart=bash -c 'echo $(uname -m); exit $(test $(uname -m) = "loongarch64")'
 Type=oneshot
 Personality=loongarch64
index dd83bf66eec7b822cd9b81e0639fb1f3c15c67ca..3377c6b82370d9a2d500f271432f2ac33a2e2888 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Personality=ppc64
 
 [Service]
-ExecStart=sh -c 'echo $(uname -m); exit $(test $(uname -m) = "ppc64")'
+ExecStart=bash -c 'echo $(uname -m); exit $(test $(uname -m) = "ppc64")'
 Type=oneshot
 Personality=ppc64
index 3f19d825db6dc74ad21422fc718e7fd9a0e24ebd..f38c31b4c429612931649519b07509c001203fa7 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Personality=ppc64le
 
 [Service]
-ExecStart=sh -c 'echo $(uname -m); exit $(test $(uname -m) = "ppc64le")'
+ExecStart=bash -c 'echo $(uname -m); exit $(test $(uname -m) = "ppc64le")'
 Type=oneshot
 Personality=ppc64le
index 7d120cde2d2e83683a9fb4d5802c21059e40e9f9..d81b90bcd412c332fe3e5fa921624be8a362c5e1 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Personality=s390
 
 [Service]
-ExecStart=sh -x -c 'c=$$(uname -m); test "$$c" = "s390"'
+ExecStart=bash -x -c 'c=$$(uname -m); test "$$c" = "s390"'
 Type=oneshot
 Personality=s390
index 4545dee4c33600a0ce948ea55e937fd60abd2892..10bcd37b694f3b426ced9421566e008e2cfa55aa 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Personality=s390x
 
 [Service]
-ExecStart=sh -x -c 'c=$$(uname -m); test "$$c" = "s390x"'
+ExecStart=bash -x -c 'c=$$(uname -m); test "$$c" = "s390x"'
 Type=oneshot
 Personality=s390x
index e7b945ca1491c3b7d9f68635bb52137e20efff89..d2324001b580f6c3dee0a30c16ee9f0db9fae39e 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Personality=x86-64
 
 [Service]
-ExecStart=sh -x -c 'c=$$(uname -m); test "$$c" = "x86_64"'
+ExecStart=bash -x -c 'c=$$(uname -m); test "$$c" = "x86_64"'
 Type=oneshot
 Personality=x86-64
index 95ec353cb1e8c45825353d052a38131acbd2db07..1245d0b4820a859565f4ef63280cad189dc782c5 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for Personality=x86
 
 [Service]
-ExecStart=sh -x -c 'c=$$(uname -m); test "$$c" = "i686" -o "$$c" = "x86_64"'
+ExecStart=bash -x -c 'c=$$(uname -m); test "$$c" = "i686" -o "$$c" = "x86_64"'
 Type=oneshot
 Personality=x86
index c2229a4a7af4238c9113b070a66ebab771a12223..a74a4435a489350c9adb024a61d4caa8e047dda2 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test for PrivateDevices=yes with a bind mounted device
 
 [Service]
-ExecStart=sh -c 'test -c /dev/kmsg'
-ExecStart=sh -c 'test ! -w /dev/'
+ExecStart=bash -c 'test -c /dev/kmsg'
+ExecStart=bash -c 'test ! -w /dev/'
 Type=oneshot
 PrivateDevices=yes
 BindPaths=/dev/kmsg
index 8f09c4ab95c42e5c967553a3377ad8099bdb04a5..eeea0b93555467a9701d2ecb24d7f635029de990 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for PrivateDevices=yes with prefix
 
 [Service]
-ExecStart=sh -x -c '! test -c /dev/kmsg'
-ExecStart=+/bin/sh -x -c 'test -c /dev/kmsg'
+ExecStart=bash -x -c '! test -c /dev/kmsg'
+ExecStart=+bash -x -c 'test -c /dev/kmsg'
 Type=oneshot
 PrivateDevices=yes
index 811f4ad6853b629831d26242b957965c36ea3ec1..dfdb5932b2979a5c5d87393568a29ecebe4644fc 100644 (file)
@@ -5,5 +5,5 @@ Description=Test CAP_MKNOD capability for PrivateDevices=no
 [Service]
 PrivateDevices=no
 # sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
-ExecStart=sh -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_mknod'
+ExecStart=bash -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_mknod'
 Type=oneshot
index 47be622b5fb7720021b4a21f77c0c6a620a5bfd2..e756f83b7f438a8d9e1c70c40d25613cf8788039 100644 (file)
@@ -5,5 +5,5 @@ Description=Test CAP_SYS_RAWIO capability for PrivateDevices=no
 [Service]
 PrivateDevices=no
 # sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
-ExecStart=sh -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_rawio'
+ExecStart=bash -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_rawio'
 Type=oneshot
index 5b8a05133bfed1fba69553ff6763ebf1646f661e..c2b22b81c24c36f44d40e5eb105ff746d85f00aa 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for PrivateDevices=no
 
 [Service]
-ExecStart=sh -x -c 'test -c /dev/kmsg'
+ExecStart=bash -x -c 'test -c /dev/kmsg'
 Type=oneshot
 PrivateDevices=no
index 3d29a9cb05073c87484ce505219afa4267050378..b3b06af60582204a9315262c74455d51a03880d6 100644 (file)
@@ -5,5 +5,5 @@ Description=Test CAP_MKNOD capability for PrivateDevices=yes
 [Service]
 PrivateDevices=yes
 # sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
-ExecStart=sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_mknod'
+ExecStart=bash -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_mknod'
 Type=oneshot
index b1c0617837c62dd5e4d5fecf6c6464588863c020..4233d477a2d4c195394b0af2900c248437d5d5bf 100644 (file)
@@ -5,5 +5,5 @@ Description=Test CAP_SYS_RAWIO capability for PrivateDevices=yes
 [Service]
 PrivateDevices=yes
 # sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
-ExecStart=sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_rawio'
+ExecStart=bash -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_rawio'
 Type=oneshot
index 094ac227247a533139c31a2ab7697c6d31870c7a..bdd164348ca2e1449378e81c72cefe51246b9f92 100644 (file)
@@ -8,10 +8,10 @@ Group=daemon
 Type=oneshot
 
 # Check the group applied
-ExecStart=sh -x -c 'test "$$(id -n -g)" = "daemon"'
+ExecStart=bash -x -c 'test "$$(id -n -g)" = "daemon"'
 
 # Check that the namespace applied
-ExecStart=sh -c 'test ! -c /dev/kmsg'
+ExecStart=bash -c 'test ! -c /dev/kmsg'
 
 # Check that the owning group of a node is not daemon (should be the host root)
-ExecStart=sh -x -c 'test ! "$$(stat -c %%G /dev/stderr)" = "daemon"'
+ExecStart=bash -x -c 'test ! "$$(stat -c %%G /dev/stderr)" = "daemon"'
index 2d32753053aefb7799daa14f8fb3e0bdf6220c19..349fd8f974ae2c3618eb6d2f3058afd2bb41bc90 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for PrivateDevices=yes
 
 [Service]
-ExecStart=sh -c 'test ! -c /dev/kmsg'
+ExecStart=bash -c 'test ! -c /dev/kmsg'
 Type=oneshot
 PrivateDevices=yes
index c16102d07f43839e50ce09385793d50c5bb9c0aa..9c7f0a468ef36ed275f982ae41a872a1845f8c25 100644 (file)
@@ -3,10 +3,10 @@
 Description=Test for PrivateNetwork= without mount namespacing
 
 [Service]
-ExecStart=sh -x -c '! ip link show dummy-test-exec'
-ExecStart=sh -x -c 'test ! -e /proc/sys/net/ipv4/conf/dummy-test-exec'
+ExecStart=bash -x -c '! ip link show dummy-test-exec'
+ExecStart=bash -x -c 'test ! -e /proc/sys/net/ipv4/conf/dummy-test-exec'
 # Without mount namespacing, we can access the dummy-test-exec interface through sysfs
-ExecStart=sh -x -c 'test -d /sys/class/net/dummy-test-exec'
+ExecStart=bash -x -c 'test -d /sys/class/net/dummy-test-exec'
 Type=oneshot
 PrivateNetwork=yes
 PrivateMounts=no
index eb48d6e0c56a61934a115401cf4c7fb7f6bcce0e..2078eff0bd49d57e5df3134e376bcd9e1065e24d 100644 (file)
@@ -3,10 +3,10 @@
 Description=Test for PrivateNetwork= with mount namespacing
 
 [Service]
-ExecStart=sh -x -c '! ip link show dummy-test-exec'
-ExecStart=sh -x -c 'test ! -e /proc/sys/net/ipv4/conf/dummy-test-exec'
+ExecStart=bash -x -c '! ip link show dummy-test-exec'
+ExecStart=bash -x -c 'test ! -e /proc/sys/net/ipv4/conf/dummy-test-exec'
 # With mount namespacing, we cannot access the dummy-test-exec interface through sysfs.
-ExecStart=sh -x -c 'test ! -e /sys/class/net/dummy-test-exec'
+ExecStart=bash -x -c 'test ! -e /sys/class/net/dummy-test-exec'
 Type=oneshot
 PrivateNetwork=yes
 # PrivateNetwork=yes implies PrivateMounts=yes
index 9dfcecc02c139e545901fa43e18f0563153504de..6437244520fee9e9a6aaad8a63cfca362cab2ccf 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for PrivateTmp=yes with prefix
 
 [Service]
-ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
-ExecStart=+/bin/sh -x -c 'test -f /tmp/test-exec_privatetmp'
+ExecStart=bash -x -c 'test ! -f /tmp/test-exec_privatetmp'
+ExecStart=+bash -x -c 'test -f /tmp/test-exec_privatetmp'
 Type=oneshot
 PrivateTmp=yes
index 39e49c698a2740ff31f4aeebd825e30197d413ae..39594a768e0fb74ebce2c77a030b0f1ff65d5991 100644 (file)
@@ -6,10 +6,10 @@ After=var.mount
 Requires=var.mount
 
 [Service]
-ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
+ExecStart=bash -x -c 'test ! -f /tmp/test-exec_privatetmp'
 ExecStart=touch /tmp/test-exec_privatetmp_disconnected
 ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
-ExecStart=sh -x -c 'test x$$TMPDIR = x'
+ExecStart=bash -x -c 'test x$$TMPDIR = x'
 Type=oneshot
 ProtectSystem=strict
 PrivateTmp=disconnected
index b11302f5f2c33efb5a4e791fee8d5aa41c0074ea..79553df7f1b46a3c782db3cae10d4d9bb6c5553b 100644 (file)
@@ -6,10 +6,10 @@ After=var.mount
 Wants=var.mount
 
 [Service]
-ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
+ExecStart=bash -x -c 'test ! -f /tmp/test-exec_privatetmp'
 ExecStart=touch /tmp/test-exec_privatetmp_disconnected
 ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
-ExecStart=sh -x -c 'test x$$TMPDIR = x'
+ExecStart=bash -x -c 'test x$$TMPDIR = x'
 Type=oneshot
 ProtectSystem=strict
 PrivateTmp=disconnected
index 2208b8e1b57ad28a032ce7c80e6a99415441cca3..2b8693796aa2a88bb562107931f49998383a4767 100644 (file)
@@ -4,10 +4,10 @@ Description=Test for PrivateTmp=disconnected with DefaultDependencies=no
 DefaultDependencies=no
 
 [Service]
-ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
+ExecStart=bash -x -c 'test ! -f /tmp/test-exec_privatetmp'
 ExecStart=touch /tmp/test-exec_privatetmp_disconnected
-ExecStart=sh -x -c '(! touch /var/tmp/test-exec_privatetmp_disconnected)'
-ExecStart=sh -x -c 'test $$TMPDIR = /tmp'
+ExecStart=bash -x -c '(! touch /var/tmp/test-exec_privatetmp_disconnected)'
+ExecStart=bash -x -c 'test $$TMPDIR = /tmp'
 Type=oneshot
 ProtectSystem=strict
 PrivateTmp=disconnected
index 4bff9d03f17a73104718d260882cd035b46fa644..6fb561d0c9af7510334aa6a0b31471ed1848250a 100644 (file)
@@ -5,6 +5,6 @@ DefaultDependencies=no
 
 [Service]
 ExecStart=+touch /tmp/test-exec_privatetmp_disconnected
-ExecStart=+sh -x -c 'test x$$TMPDIR = x'
+ExecStart=+bash -x -c 'test x$$TMPDIR = x'
 Type=oneshot
 PrivateTmp=disconnected
index 349c1379841cd8001af1bd36f200a0c26ab1c8f1..58c3ee949994c271cb122b7d3c95d1fb687deafb 100644 (file)
@@ -5,10 +5,10 @@ DefaultDependencies=no
 RequiresMountsFor=/var/
 
 [Service]
-ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
+ExecStart=bash -x -c 'test ! -f /tmp/test-exec_privatetmp'
 ExecStart=touch /tmp/test-exec_privatetmp_disconnected
 ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
-ExecStart=sh -x -c 'test x$$TMPDIR = x'
+ExecStart=bash -x -c 'test x$$TMPDIR = x'
 Type=oneshot
 ProtectSystem=strict
 PrivateTmp=disconnected
index 09ac3495b830ba14552319bcee754d93af4f4da5..66337df79af7f3016cc784d8febf953ac6310781 100644 (file)
@@ -5,10 +5,10 @@ DefaultDependencies=no
 WantsMountsFor=/var/
 
 [Service]
-ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
+ExecStart=bash -x -c 'test ! -f /tmp/test-exec_privatetmp'
 ExecStart=touch /tmp/test-exec_privatetmp_disconnected
 ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
-ExecStart=sh -x -c 'test x$$TMPDIR = x'
+ExecStart=bash -x -c 'test x$$TMPDIR = x'
 Type=oneshot
 ProtectSystem=strict
 PrivateTmp=disconnected
index fbee568d743b83258bc10cac53f7d300c1352dd9..470e4828cfac894f3d040f8ad66228d8364351b6 100644 (file)
@@ -3,10 +3,10 @@
 Description=Test for PrivateTmp=disconnected
 
 [Service]
-ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
+ExecStart=bash -x -c 'test ! -f /tmp/test-exec_privatetmp'
 ExecStart=touch /tmp/test-exec_privatetmp_disconnected
 ExecStart=touch /var/tmp/test-exec_privatetmp_disconnected
-ExecStart=sh -x -c 'test x$$TMPDIR = x'
+ExecStart=bash -x -c 'test x$$TMPDIR = x'
 Type=oneshot
 ProtectSystem=strict
 PrivateTmp=disconnected
index 599203abb80f92ce4f5768067ef5c8358553485b..4cf9104a64b308aaf89c0d7c35e368180a3594c8 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for PrivateTmp=no
 
 [Service]
-ExecStart=sh -x -c 'test -f /tmp/test-exec_privatetmp'
+ExecStart=bash -x -c 'test -f /tmp/test-exec_privatetmp'
 Type=oneshot
 PrivateTmp=no
index 5ea52639f0f90ba63da7fedbf85212ab135004bb..df6ec3a8162504bcdcbef692e1a1cc3ba5c3bfb4 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for PrivateTmp=yes
 
 [Service]
-ExecStart=sh -x -c 'test ! -f /tmp/test-exec_privatetmp'
+ExecStart=bash -x -c 'test ! -f /tmp/test-exec_privatetmp'
 Type=oneshot
 PrivateTmp=yes
index c51cacf40d4c263677acbbed6869999e530cce18..161acbcb12c96f5fb82318ea2083c3110a661bdb 100644 (file)
@@ -7,4 +7,4 @@ Description=Test ProtectHome=tmpfs vs ProtectSystem=strict
 ProtectHome=tmpfs
 ProtectSystem=strict
 Type=oneshot
-ExecStart=sh -x -c 'test "$$(stat -fc %%T /home)" = "tmpfs"'
+ExecStart=bash -x -c 'test "$$(stat -fc %%T /home)" = "tmpfs"'
index be64c58089f53c85e22238824a2c86f31edc7050..1ed350f4b16ec5f700783252ebede8ff3716e35e 100644 (file)
@@ -5,5 +5,5 @@ Description=Test CAP_SYSLOG for ProtectKernelLogs=no
 [Service]
 ProtectKernelLogs=no
 # sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
-ExecStart=sh -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_syslog'
+ExecStart=bash -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_syslog'
 Type=oneshot
index 646ff751a7b5622982d0375e2e09a267e1df70be..387a08af68c5e439a3ba95180e598a352e47327c 100644 (file)
@@ -5,5 +5,5 @@ Description=Test CAP_SYSLOG for ProtectKernelLogs=yes
 [Service]
 ProtectKernelLogs=yes
 # sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
-ExecStart=sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_syslog'
+ExecStart=bash -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_syslog'
 Type=oneshot
index cefdb60991ffd5348b4fceb17d2a33a32d6832fd..c34a474362c679571c3e4e411b742874416a9896 100644 (file)
@@ -5,5 +5,5 @@ Description=Test CAP_SYS_MODULE ProtectKernelModules=no
 [Service]
 ProtectKernelModules=no
 # sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
-ExecStart=sh -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_module'
+ExecStart=bash -x -c 'capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_module'
 Type=oneshot
index 1f327a28aba757ebef0513d31e5004a34409e72a..cfd0ac1ff70055f4c49f8bb4da5ddd7ed639ecb6 100644 (file)
@@ -5,5 +5,5 @@ Description=Test CAP_SYS_MODULE for ProtectKernelModules=yes
 [Service]
 ProtectKernelModules=yes
 # sed: remove dropped (cap_xxx-[epi]) and IAB capabilities from the output
-ExecStart=sh -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_module'
+ExecStart=bash -x -c '! capsh --print | sed -re "s/[^ ]+?\-[epi]+//g" -e '/IAB/d' | grep cap_sys_module'
 Type=oneshot
index 16399bd2061800597338780db911c8c173f6c8d4..f134aac8af056b2fe81e4ea6715e6e46182ea690 100644 (file)
@@ -4,5 +4,5 @@ Description=Test to make sure that passing ProtectKernelModules=yes disconnect m
 
 [Service]
 ProtectKernelModules=yes
-ExecStart=sh -x -c 'd=$$(mktemp -d -p /tmp); trap "umount \'$$d\' && rmdir \'$$d\'" EXIT; mount -t tmpfs tmpfs "$$d"; grep "$$d" /proc/self/mountinfo && ! grep "$$d" /proc/$${PPID}/mountinfo && ! grep "$$d" /proc/1/mountinfo'
+ExecStart=bash -x -c 'd=$$(mktemp -d -p /tmp); trap "umount \'$$d\' && rmdir \'$$d\'" EXIT; mount -t tmpfs tmpfs "$$d"; grep "$$d" /proc/self/mountinfo && ! grep "$$d" /proc/$${PPID}/mountinfo && ! grep "$$d" /proc/1/mountinfo'
 Type=oneshot
index e896bac5fdad40f356a2785f5ee91ee0c349c089..f3d1f2e7df398b21e8a82071eb22a9873b067da6 100644 (file)
@@ -4,5 +4,5 @@ Description=Test to make sure that passing ReadOnlyPaths= disconnect mount propa
 
 [Service]
 ReadOnlyPaths=-/i-dont-exist
-ExecStart=sh -x -c 'd=$$(mktemp -d -p /tmp); trap "umount \'$$d\' && rmdir \'$$d\'" EXIT; mount -t tmpfs tmpfs "$$d"; grep "$$d" /proc/self/mountinfo && ! grep "$$d" /proc/$${PPID}/mountinfo && ! grep "$$d" /proc/1/mountinfo'
+ExecStart=bash -x -c 'd=$$(mktemp -d -p /tmp); trap "umount \'$$d\' && rmdir \'$$d\'" EXIT; mount -t tmpfs tmpfs "$$d"; grep "$$d" /proc/self/mountinfo && ! grep "$$d" /proc/$${PPID}/mountinfo && ! grep "$$d" /proc/1/mountinfo'
 Type=oneshot
index 80e6c83bf74b2f7d5cb82a001fce3b9251455908..53ba3157705db578022363daef7499a21ff4008d 100644 (file)
@@ -5,8 +5,8 @@ Description=Test for ReadOnlyPaths=
 [Service]
 Type=oneshot
 # This should work, as we explicitly disable the effect of ReadOnlyPaths=
-ExecStart=+/bin/sh -c 'touch /tmp/thisisasimpletest'
+ExecStart=+bash -c 'touch /tmp/thisisasimpletest'
 # This should also work, as we do not disable the effect of ReadOnlyPaths= but invert the exit code
-ExecStart=sh -x -c '! touch /tmp/thisisasimpletest'
-ExecStart=+/bin/sh -c 'rm /tmp/thisisasimpletest'
+ExecStart=bash -x -c '! touch /tmp/thisisasimpletest'
+ExecStart=+bash -c 'rm /tmp/thisisasimpletest'
 ReadOnlyPaths=/tmp
index 7a183672c73b7b92499f55974028e921b45b5f09..2879e3d079a64c1d34d54a4b09e8278567a8bbeb 100644 (file)
@@ -5,5 +5,5 @@ Description=Test for ReadOnlyPaths=
 [Service]
 ReadOnlyPaths=/etc -/i-dont-exist /usr
 BindPaths=/etc:/tmp/etc2
-ExecStart=sh -x -c 'test ! -w /etc && test ! -w /usr && test ! -e /i-dont-exist && test -w /var'
+ExecStart=bash -x -c 'test ! -w /etc && test ! -w /usr && test ! -e /i-dont-exist && test -w /var'
 Type=oneshot
index a0eff8bcecc897ff24a6a0f021540c820ff7df48..b1a1e43d5f884c840d8f58b1d16296eeeddee4bc 100644 (file)
@@ -5,6 +5,6 @@ Description=Test for ReadOnlyPaths=
 [Service]
 ReadOnlyPaths=/usr /etc /sys /dev -/i-dont-exist
 PrivateDevices=yes
-ExecStart=sh -x -c 'test ! -w /usr && test ! -w /etc && test ! -w /sys && test ! -w /sys/fs/cgroup'
-ExecStart=sh -x -c 'test ! -w /dev && test ! -w /dev/shm && test ! -e /i-dont-exist && test -w /var'
+ExecStart=bash -x -c 'test ! -w /usr && test ! -w /etc && test ! -w /sys && test ! -w /sys/fs/cgroup'
+ExecStart=bash -x -c 'test ! -w /dev && test ! -w /dev/shm && test ! -e /i-dont-exist && test -w /var'
 Type=oneshot
index 9b844cf4338db7b176def66842177dbcc08af778..e203d13493cfac67682404412e967ee7da725966 100644 (file)
@@ -4,5 +4,5 @@ Description=Test to make sure that passing ReadWritePaths= disconnect mount prop
 
 [Service]
 ReadWritePaths=-/i-dont-exist
-ExecStart=sh -x -c 'd=$$(mktemp -d -p /tmp); trap "umount \'$$d\' && rmdir \'$$d\'" EXIT; mount -t tmpfs tmpfs "$$d"; grep "$$d" /proc/self/mountinfo && ! grep "$$d" /proc/$${PPID}/mountinfo && ! grep "$$d" /proc/1/mountinfo'
+ExecStart=bash -x -c 'd=$$(mktemp -d -p /tmp); trap "umount \'$$d\' && rmdir \'$$d\'" EXIT; mount -t tmpfs tmpfs "$$d"; grep "$$d" /proc/self/mountinfo && ! grep "$$d" /proc/$${PPID}/mountinfo && ! grep "$$d" /proc/1/mountinfo'
 Type=oneshot
index fdeb3f140d131abf0f6ac575befe5a892e042423..ca99dba412714136e0b159dfe9671f5e86af9954 100644 (file)
@@ -6,5 +6,5 @@ Description=Test merging RestrictNamespaces= with AND
 RestrictNamespaces=mnt pid
 RestrictNamespaces=~mnt usr
 ExecStart=unshare -p -f
-ExecStart=sh -c '! unshare -m -u -i -n'
+ExecStart=bash -c '! unshare -m -u -i -n'
 Type=oneshot
index fca3718c9d703996f4ad90a7bae30b220c2109d3..0e2dff296e36c9de5851f27025e6e9fa32e824aa 100644 (file)
@@ -6,5 +6,5 @@ Description=Test merging RestrictNamespaces= with OR
 RestrictNamespaces=mnt pid
 RestrictNamespaces=mnt uts
 ExecStart=unshare -m -u -p -f
-ExecStart=sh -c '! unshare -u -i -n'
+ExecStart=bash -c '! unshare -u -i -n'
 Type=oneshot
index e75e0d23800ab28f6586566c4561ca766c1112b9..c99ac3751697af91b66a8b1201d2ace4bdcca036 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test for RuntimeDirectoryMode
 
 [Service]
-ExecStart=sh -x -c 'mode=$$(stat -c %%a %t/test-exec_runtimedirectory-mode); test "$$mode" = "750"'
-ExecStart=sh -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectory-mode"'
+ExecStart=bash -x -c 'mode=$$(stat -c %%a %t/test-exec_runtimedirectory-mode); test "$$mode" = "750"'
+ExecStart=bash -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectory-mode"'
 Type=oneshot
 RuntimeDirectory=test-exec_runtimedirectory-mode
 RuntimeDirectoryMode=0750
index 4bc336167c96c154831f00454a3d1e6e7930e329..a08a5fdfc49878b768a80f77c2c1e604165a90f6 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set)
 
 [Service]
-ExecStart=sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nfsnobody"'
+ExecStart=bash -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nfsnobody"'
 Type=oneshot
 Group=nfsnobody
 User=root
index 5f94bf9cd0be39fd0693943e8bc3e0de89675729..11afe7f57e3a79d638f6af9d2ee7646134ebb4b2 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set)
 
 [Service]
-ExecStart=sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nobody"'
+ExecStart=bash -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nobody"'
 Type=oneshot
 Group=nobody
 User=root
index 6d508959f8033a4bff55ddcea71ef735345973cf..134e84ef0b964a5ae705118ed51fc27372abdcfc 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set)
 
 [Service]
-ExecStart=sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nogroup"'
+ExecStart=bash -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nogroup"'
 Type=oneshot
 Group=nogroup
 User=root
index 64d66b302ee53710d32a82abb32d60ffec2d0ca1..38d581b205e90e3327f5f6c611be7d3e53dbb62d 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set)
 
 [Service]
-ExecStart=sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner-daemon); test "$$group" = "daemon"'
+ExecStart=bash -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner-daemon); test "$$group" = "daemon"'
 Type=oneshot
 Group=daemon
 User=root
index f60110a48587994dcf7d51b6501ead771516a8b9..1e23d6aec5ea724d3c097a381104530155090fa5 100644 (file)
@@ -3,9 +3,9 @@
 Description=Test for RuntimeDirectory
 
 [Service]
-ExecStart=sh -x -c 'test -d %t/test-exec_runtimedirectory'
-ExecStart=sh -x -c 'test -d %t/test-exec_runtimedirectory2/hogehoge'
-ExecStart=sh -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectory:%t/test-exec_runtimedirectory2/hogehoge"'
+ExecStart=bash -x -c 'test -d %t/test-exec_runtimedirectory'
+ExecStart=bash -x -c 'test -d %t/test-exec_runtimedirectory2/hogehoge'
+ExecStart=bash -x -c 'test "$$RUNTIME_DIRECTORY" = "%t/test-exec_runtimedirectory:%t/test-exec_runtimedirectory2/hogehoge"'
 Type=oneshot
 RuntimeDirectory=test-exec_runtimedirectory
 RuntimeDirectory=./test-exec_runtimedirectory2///./hogehoge/.
index 7f2e87f6584d784924c33b99ab710758c5d947c4..ac33095cdfe54d06c9cbfc3c2b736cf37367a920 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test for SetCredential=
 
 [Service]
-ExecStart=sh -x -c 'test "$$(cat %d/test-execute.set-credential)" = "hoge"'
-ExecStartPost=sh -x -c 'test "$$(cat %d/test-execute.set-credential)" = "hoge"'
+ExecStart=bash -x -c 'test "$$(cat %d/test-execute.set-credential)" = "hoge"'
+ExecStartPost=bash -x -c 'test "$$(cat %d/test-execute.set-credential)" = "hoge"'
 ExecStop=bash -x -c '[[ ! -v CREDENTIALS_DIRECTORY ]]'
 ExecStopPost=bash -x -c '[[ ! -v CREDENTIALS_DIRECTORY ]]'
 Type=oneshot
index ab565fb4fbb873b027268be3d89533666e68146d..6bbc9c89536d40a67f848510d10094de51643ed5 100644 (file)
@@ -4,8 +4,8 @@ Description=Test for specifiers
 
 [Service]
 Type=oneshot
-ExecStart=sh -c 'test %t = $$XDG_RUNTIME_DIR'
-ExecStart=sh -c 'test %S = %h/.local/state'
-ExecStart=sh -c 'test %C = %h/.cache'
-ExecStart=sh -c 'test %L = %h/.local/state/log'
-ExecStart=sh -c 'test %E = %h/.config'
+ExecStart=bash -c 'test %t = $$XDG_RUNTIME_DIR'
+ExecStart=bash -c 'test %S = %h/.local/state'
+ExecStart=bash -c 'test %C = %h/.cache'
+ExecStart=bash -c 'test %L = %h/.local/state/log'
+ExecStart=bash -c 'test %E = %h/.config'
index 512f786f833508857398494d0a52c395d54ccc57..d4c23b3ace3f006fbd589d2a1fe37e381e8545f3 100644 (file)
@@ -16,12 +16,12 @@ ExecStart=test %f = /exec/specifier
 ExecStart=test %T = /tmp
 ExecStart=test %V = /var/tmp
 ExecStart=test %d = %t/credentials/%n
-ExecStart=sh -c 'test %u = $$(id -un)'
-ExecStart=sh -c 'test %U = $$(id -u)'
-ExecStart=sh -c 'test %g = $$(id -gn)'
-ExecStart=sh -c 'test %G = $$(id -g)'
+ExecStart=bash -c 'test %u = $$(id -un)'
+ExecStart=bash -c 'test %U = $$(id -u)'
+ExecStart=bash -c 'test %g = $$(id -gn)'
+ExecStart=bash -c 'test %G = $$(id -g)'
 ExecStart=test %h = /root
-ExecStart=sh -c 'test -x %s'
-ExecStart=sh -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
-ExecStart=sh -c 'test %H = $$(uname -n)'
-ExecStart=sh -c 'test %v = $$(uname -r)'
+ExecStart=bash -c 'test -x %s'
+ExecStart=bash -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
+ExecStart=bash -c 'test %H = $$(uname -n)'
+ExecStart=bash -c 'test %v = $$(uname -r)'
index cb9d0a182a2271d3a09c5ff1a42fb4bc39473414..4e630a711e4eff672c3e055b8083c9318a67793a 100644 (file)
@@ -13,12 +13,12 @@ ExecStart=test %I = foo/bar
 ExecStart=test %j = specifier
 ExecStart=test %J = specifier
 ExecStart=test %f = /foo/bar
-ExecStart=sh -c 'test %u = $$(id -un)'
-ExecStart=sh -c 'test %U = $$(id -u)'
-ExecStart=sh -c 'test %g = $$(id -gn)'
-ExecStart=sh -c 'test %G = $$(id -g)'
+ExecStart=bash -c 'test %u = $$(id -un)'
+ExecStart=bash -c 'test %U = $$(id -u)'
+ExecStart=bash -c 'test %g = $$(id -gn)'
+ExecStart=bash -c 'test %G = $$(id -g)'
 ExecStart=test %h = /root
-ExecStart=sh -c 'test -x %s'
-ExecStart=sh -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
-ExecStart=sh -c 'test %H = $$(uname -n)'
-ExecStart=sh -c 'test %v = $$(uname -r)'
+ExecStart=bash -c 'test -x %s'
+ExecStart=bash -c 'test %b = $$(cat /proc/sys/kernel/random/boot_id | sed -e 's/-//g')'
+ExecStart=bash -c 'test %H = $$(uname -n)'
+ExecStart=bash -c 'test %v = $$(uname -r)'
index fd56f7e37b3f7538fa5449ab3aabc5357ac1aa4a..cac94393040a7a9e6a3b73e2665c6f9e8bd9da93 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for StandardInputText= and StandardInputData=
 
 [Service]
-ExecStart=sh -x -c 'd=$$(mktemp -d -p /tmp); echo -e "this is a test\nand this is more\nsomething encoded!\nsomething   in multiple lines\nand some more\nand a more bas64 data\nsomething with strange\nembedded\tcharacters\nand something with a exec-stdin-data.service specifier" >$d/text ; cmp $d/text ; rm -rf $d'
+ExecStart=bash -x -c 'd=$$(mktemp -d -p /tmp); echo -e "this is a test\nand this is more\nsomething encoded!\nsomething   in multiple lines\nand some more\nand a more bas64 data\nsomething with strange\nembedded\tcharacters\nand something with a exec-stdin-data.service specifier" >$d/text ; cmp $d/text ; rm -rf $d'
 Type=oneshot
 StandardInput=data
 StandardInputText=this is a test
index 45d29ecfdd6edd92fe175f84b6d67207dc800a34..563d3eba77b476ec6ea3cf8df7ed893f7ba95301 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test for StandardOutput=append:
 
 [Service]
-ExecStartPre=sh -c 'printf "hello\n" >/tmp/test-exec-standardoutput-output'
-ExecStartPre=sh -c 'printf "hello\nhello\n" >/tmp/test-exec-standardoutput-expected'
+ExecStartPre=bash -c 'printf "hello\n" >/tmp/test-exec-standardoutput-output'
+ExecStartPre=bash -c 'printf "hello\nhello\n" >/tmp/test-exec-standardoutput-expected'
 StandardInput=data
 StandardInputText=hello
 StandardOutput=append:/tmp/test-exec-standardoutput-output
index 8b689a249430bbe8c96898baa23a119f0485b364..6d14b359a3aafa869538d8ffeb33ef145ae4b43b 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test for StandardOutput=file:
 
 [Service]
-ExecStartPre=sh -c 'printf "nooo\nhello\n" >/tmp/test-exec-standardoutput-output'
-ExecStartPre=sh -c 'printf "hello\nello\n" >/tmp/test-exec-standardoutput-expected'
+ExecStartPre=bash -c 'printf "nooo\nhello\n" >/tmp/test-exec-standardoutput-output'
+ExecStartPre=bash -c 'printf "hello\nello\n" >/tmp/test-exec-standardoutput-expected'
 StandardInput=data
 StandardInputText=hello
 StandardOutput=file:/tmp/test-exec-standardoutput-output
index 1a86d92d8b620094a33e7d9efd033472fb3319ce..4be9022a380266831412ac60c78327b2f3309754 100644 (file)
@@ -3,11 +3,11 @@
 Description=Test for StandardOutput=truncate:
 
 [Service]
-ExecStartPre=sh -c 'printf "hello\n" >/tmp/test-exec-standardoutput-output'
-ExecStartPre=sh -c 'printf "hi\n" >/tmp/test-exec-standardoutput-expected'
+ExecStartPre=bash -c 'printf "hello\n" >/tmp/test-exec-standardoutput-output'
+ExecStartPre=bash -c 'printf "hi\n" >/tmp/test-exec-standardoutput-expected'
 StandardInput=data
 StandardInputText=hi
 StandardOutput=truncate:/tmp/test-exec-standardoutput-output
 StandardError=null
-ExecStart=sh -c 'cat && cmp /tmp/test-exec-standardoutput-output /tmp/test-exec-standardoutput-expected'
+ExecStart=bash -c 'cat && cmp /tmp/test-exec-standardoutput-output /tmp/test-exec-standardoutput-expected'
 Type=oneshot
index 3c90124818db3bbbb153700ebe36208baa2140be..a46a760c0c0acc5a465ab83c39cd344e78c85a1f 100644 (file)
@@ -3,9 +3,9 @@
 Description=Test for Supplementary Group with multiple groups without Group and User
 
 [Service]
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "%G" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "2" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'test "$$(id -g)" = "%G" && test "$$(id -u)" = "%U"'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "%G" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "2" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'test "$$(id -g)" = "%G" && test "$$(id -u)" = "%U"'
 Type=oneshot
 SupplementaryGroups=1 2
index 0fd1c6205286e4bbc93966c234e3e9c5c5f79738..c597fbce79a114b2d8f892f5f43c6cea357771be 100644 (file)
@@ -3,9 +3,9 @@
 Description=Test for Supplementary Group with multiple groups and Group=1
 
 [Service]
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "2" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "%U"'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "2" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "%U"'
 Type=oneshot
 Group=1
 SupplementaryGroups=1 2
index c430e54685a1b6701e5460599f9e1a166cf95904..8149612b8dfc882abfc41a796c2ff29126c6194a 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test for Supplementary Group with multiple groups and Uid=1
 
 [Service]
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "2" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "2" && exit 0; done; exit 1'
 Type=oneshot
 User=1
 SupplementaryGroups=1 2
index 20a3561d08d36a30cebc3276e20eaf32bc20e1cf..00c29bf24b5b51dda75a5e52897d324f6be32b85 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test for Supplementary Group with only one group and uid 1
 
 [Service]
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "1"'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "1"'
 Type=oneshot
 User=1
 Group=1
index 8c812573e4d289cb400fdf5fd426d92bb66c7a3d..99c821bf59cec38c910e75ee45f679e502d516b2 100644 (file)
@@ -3,8 +3,8 @@
 Description=Test for Supplementary Group with only one group
 
 [Service]
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "0"'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'test "$$(id -g)" = "1" && test "$$(id -u)" = "0"'
 Type=oneshot
 Group=1
 SupplementaryGroups=1
index 0a3d370595c0096de041736b0b01db625586fcdc..a147cc79f4736dddad9737caed327e93d39a5ecb 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for Supplementary Group
 
 [Service]
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "%G" && exit 0; done; exit 1'
-ExecStart=sh -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "%G" && exit 0; done; exit 1'
+ExecStart=bash -x -c 'for g in $$(id -G); do test "$$g" = "1" && exit 0; done; exit 1'
 Type=oneshot
 SupplementaryGroups=1
index 7437d301081de34e0dbc18bf96a0a189123a0381..800e6ede0ca4bd85cf57152a3ac324e8f08991c8 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for SystemCallFilter
 
 [Service]
-ExecStart=sh -c '/bin/echo "This should not be seen"'
+ExecStart=bash -c '/bin/echo "This should not be seen"'
 Type=oneshot
 LimitCORE=0
 SystemCallFilter=ioperm
index 92672d1eb132324ea6f85d7327dd2b975775c0ab..1738ee93a1a4c2a64f52a25aba53e7dec1768383 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for SystemCallFilter
 
 [Service]
-ExecStart=sh -c '/bin/echo "This should not be seen"'
+ExecStart=bash -c '/bin/echo "This should not be seen"'
 Type=oneshot
 LimitCORE=0
 SystemCallFilter=~write open execve fexecve execveat exit_group close mmap munmap fstat DONOTEXIST
index 4e7b81214b264ccfb438a10aafbc73dfc453e528..9e27c8040066171fb40210d8d7691f1f9fa96b89 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for SystemCallFilter
 
 [Service]
-ExecStart=sh -c '/bin/echo "This should not be seen"'
+ExecStart=bash -c '/bin/echo "This should not be seen"'
 Type=oneshot
 LimitCORE=0
 SystemCallArchitectures=native
index eaa75dfb61671115ac9d3b69412e68c5f4e98db0..e8ab9b715a308c4a5298cba40c35d4130d230511 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test bounding set is right with SystemCallFilter and non-root user
 
 [Service]
-ExecStart=sh -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set =cap_net_bind_service"'
+ExecStart=bash -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set =cap_net_bind_service"'
 Type=oneshot
 User=1
 SystemCallFilter=@system-service
index fd0e3a259db5d9db6614bf76f324dffe15272eed..a5734fee69548bce8a73fb6b2fa7118561f8157d 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test bounding set is right with SystemCallFilter and non-root user
 
 [Service]
-ExecStart=sh -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set =cap_setpcap,cap_net_bind_service,cap_sys_admin"'
+ExecStart=bash -x -c 'c=$$(capsh --print | grep "Bounding set "); test "$$c" = "Bounding set =cap_setpcap,cap_net_bind_service,cap_sys_admin"'
 Type=oneshot
 User=1
 SystemCallFilter=@system-service
index 76b028c82c9314b87641497c61e668813192bb4a..64a6b2adbe615a14ad0f18471b9e86ba04c3cc7d 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test no_new_privs is unset for ProtectClock and non-root user
 
 [Service]
-ExecStart=sh -x -c 'c=$$(cat /proc/self/status | grep "NoNewPrivs:     "); test "$$c" = "NoNewPrivs:   0"'
+ExecStart=bash -x -c 'c=$$(cat /proc/self/status | grep "NoNewPrivs:   "); test "$$c" = "NoNewPrivs:   0"'
 Type=oneshot
 User=1
 ProtectClock=yes
index 2091b71db009d2a4679a6c619a724423d5311cc4..fcae37adc7c1ec39315919fbf6f0ec515e147d12 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test no_new_privs is unset for SystemCallFilter and non-root user
 
 [Service]
-ExecStart=sh -x -c 'c=$$(cat /proc/self/status | grep "NoNewPrivs:     "); test "$$c" = "NoNewPrivs:   0"'
+ExecStart=bash -x -c 'c=$$(cat /proc/self/status | grep "NoNewPrivs:   "); test "$$c" = "NoNewPrivs:   0"'
 Type=oneshot
 User=1
 SystemCallFilter=@system-service
index bb2ea5516695a4ed08f46994b056e6519f5be136..ad72b579273d62ec0d014f04c24681bbe718a59e 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for SystemCallFilter
 
 [Service]
-ExecStart=sh -c 'echo "Foo bar"'
+ExecStart=bash -c 'echo "Foo bar"'
 Type=oneshot
 SystemCallFilter=~read write open execve ioperm
 SystemCallFilter=ioctl
index d9f0a3717cf0db9d03fad5c9d4e20768458b6cc2..f69998a8e863bf24f1525d4508a74e21205f1136 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for SystemCallFilter
 
 [Service]
-ExecStart=sh -c 'echo "Foo bar"'
+ExecStart=bash -c 'echo "Foo bar"'
 Type=oneshot
 SystemCallFilter=
index df4e662d40dc15237a8a379ba853f924f54f5dea..9e7ef6da4d25e00669f55538a093350be4393827 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for SystemCallFilter
 
 [Service]
-ExecStart=sh -c 'echo "Foo bar"'
+ExecStart=bash -c 'echo "Foo bar"'
 Type=oneshot
 SystemCallArchitectures=native
 SystemCallFilter=
index 19122869b1ab6ffde616eabea6c51a124d0a078d..6e978540688ed426cf143dc3fa5b89077ce9fdde 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for SystemCallFilter in system mode with User set
 
 [Service]
-ExecStart=sh -c 'echo "Foo bar"'
+ExecStart=bash -c 'echo "Foo bar"'
 Type=oneshot
 User=nfsnobody
 SystemCallFilter=~read write open execve ioperm
index 0c2ebdd83e613c7342c376435ba10ea06ba94e78..133ff9335a69db728eacc39287ee2bc9045e987a 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for SystemCallFilter in system mode with User set
 
 [Service]
-ExecStart=sh -c 'echo "Foo bar"'
+ExecStart=bash -c 'echo "Foo bar"'
 Type=oneshot
 User=nobody
 SystemCallFilter=~read write open execve ioperm
index 6de39642e900a52eefb7837fed74da45b104c47e..729ea4c9d80ab3fa7dca00e1f5062bd53675b894 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for SystemCallFilter in system mode with User set (daemon)
 
 [Service]
-ExecStart=sh -c 'echo "Foo bar"'
+ExecStart=bash -c 'echo "Foo bar"'
 Type=oneshot
 User=daemon
 SystemCallFilter=~read write open execve ioperm
index b00030131ec6f3b0073560f6b17bcb0463063599..a767b9530873236c58e19de0a2e82f8dceec7a6d 100644 (file)
@@ -10,8 +10,8 @@ Type=oneshot
 TemporaryFileSystem=/var:ro,mode=0700,nostrictatime
 
 # Check /proc/self/mountinfo
-ExecStart=sh -x -c 'test "$$(awk \'$$5 == "/var" && $$11 !~ /(^|,)mode=700(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
+ExecStart=bash -x -c 'test "$$(awk \'$$5 == "/var" && $$11 !~ /(^|,)mode=700(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
 
-ExecStart=sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)ro(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
-ExecStart=sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)nodev(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
-ExecStart=sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 ~ /(^|,)strictatime(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
+ExecStart=bash -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)ro(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
+ExecStart=bash -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)nodev(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
+ExecStart=bash -x -c 'test "$$(awk \'$$5 == "/var" && $$6 ~ /(^|,)strictatime(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
index 0a4b0f25521c39e5f0cb5975f711f10d40a2b174..6735278252b189df045ffa0637e164eb4f3a84ae 100644 (file)
@@ -6,31 +6,31 @@ Description=Test for TemporaryFileSystem with read-only mode
 Type=oneshot
 
 # Check directories exist
-ExecStart=sh -c 'test -d /var/test-exec-temporaryfilesystem/rw && test -d /var/test-exec-temporaryfilesystem/ro'
+ExecStart=bash -c 'test -d /var/test-exec-temporaryfilesystem/rw && test -d /var/test-exec-temporaryfilesystem/ro'
 
 # Check TemporaryFileSystem= are empty
-ExecStart=sh -c 'for i in $$(ls -A /var); do test $$i = test-exec-temporaryfilesystem || false; done'
+ExecStart=bash -c 'for i in $$(ls -A /var); do test $$i = test-exec-temporaryfilesystem || false; done'
 
 # Check default mode
-ExecStart=sh -x -c 'test "$$(stat -c %%a /var)" = "755"'
+ExecStart=bash -x -c 'test "$$(stat -c %%a /var)" = "755"'
 
 # Cannot create a file in /var
-ExecStart=sh -c '! touch /var/hoge'
+ExecStart=bash -c '! touch /var/hoge'
 
 # Create a file in /var/test-exec-temporaryfilesystem/rw
-ExecStart=sh -c 'touch /var/test-exec-temporaryfilesystem/rw/thisisasimpletest-temporaryfilesystem'
+ExecStart=bash -c 'touch /var/test-exec-temporaryfilesystem/rw/thisisasimpletest-temporaryfilesystem'
 
 # Then, the file can be access through /tmp
-ExecStart=sh -c 'test -f /tmp/thisisasimpletest-temporaryfilesystem'
+ExecStart=bash -c 'test -f /tmp/thisisasimpletest-temporaryfilesystem'
 
 # Also, through /var/test-exec-temporaryfilesystem/ro
-ExecStart=sh -c 'test -f /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem'
+ExecStart=bash -c 'test -f /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem'
 
 # The file cannot modify through /var/test-exec-temporaryfilesystem/ro
-ExecStart=sh -c '! touch /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem'
+ExecStart=bash -c '! touch /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem'
 
 # Cleanup
-ExecStart=sh -c 'rm /tmp/thisisasimpletest-temporaryfilesystem'
+ExecStart=bash -c 'rm /tmp/thisisasimpletest-temporaryfilesystem'
 
 TemporaryFileSystem=/var:ro
 BindPaths=/tmp:/var/test-exec-temporaryfilesystem/rw
index ff0aa048d49740113a6f03e648bf11ea8fa84567..48a0b2d613b0f65499c23c5dfba23593337a0d36 100644 (file)
@@ -9,10 +9,10 @@ Type=oneshot
 ExecStart=test -d /var/test-exec-temporaryfilesystem/rw -a -d /var/test-exec-temporaryfilesystem/ro
 
 # Check TemporaryFileSystem= are empty
-ExecStart=sh -c 'for i in $$(ls -A /var); do test $$i = test-exec-temporaryfilesystem || false; done'
+ExecStart=bash -c 'for i in $$(ls -A /var); do test $$i = test-exec-temporaryfilesystem || false; done'
 
 # Check default mode
-ExecStart=sh -x -c 'test "$$(stat -c %%a /var)" = "755"'
+ExecStart=bash -x -c 'test "$$(stat -c %%a /var)" = "755"'
 
 # Create a file in /var
 ExecStart=touch /var/hoge
@@ -27,7 +27,7 @@ ExecStart=test -f /tmp/thisisasimpletest-temporaryfilesystem
 ExecStart=test -f /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem
 
 # The file cannot modify through /var/test-exec-temporaryfilesystem/ro
-ExecStart=sh -c '! touch /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem'
+ExecStart=bash -c '! touch /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem'
 
 # Cleanup
 ExecStart=rm /tmp/thisisasimpletest-temporaryfilesystem
index 455344e114c6952a63cc260f52fed63e9d1b5171..cae1b8b074d171f8a1ce6f918be92772fb10f042 100644 (file)
@@ -6,11 +6,11 @@ Description=Test for TemporaryFileSystem on /usr
 Type=oneshot
 
 # Check TemporaryFileSystem= are empty
-ExecStart=sh -c 'for i in $$(ls -A /usr); do test $$i = lib -o $$i = lib64 -o $$i = bin -o $$i = sbin || false; done'
+ExecStart=bash -c 'for i in $$(ls -A /usr); do test $$i = lib -o $$i = lib64 -o $$i = bin -o $$i = sbin || false; done'
 
 # Cannot create files under /usr
-ExecStart=sh -c '! touch /usr/hoge'
-ExecStart=sh -c '! touch /usr/bin/hoge'
+ExecStart=bash -c '! touch /usr/hoge'
+ExecStart=bash -c '! touch /usr/bin/hoge'
 
 TemporaryFileSystem=/usr:ro
 BindReadOnlyPaths=-/usr/lib -/usr/lib64 /usr/bin /usr/sbin
index de9ac5a2333cb34ee65676db733831834e0247c7..c8835af473b9a047c03d5d424af9e38b073371b9 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for UMask
 
 [Service]
-ExecStart=sh -x -c 'rm /tmp/test-exec-umask; touch /tmp/test-exec-umask; mode=$$(stat -c %%a /tmp/test-exec-umask); test "$$mode" = "600"'
+ExecStart=bash -x -c 'rm /tmp/test-exec-umask; touch /tmp/test-exec-umask; mode=$$(stat -c %%a /tmp/test-exec-umask); test "$$mode" = "600"'
 Type=oneshot
 UMask=0177
 PrivateTmp=yes
index 6d13c0bfa2a7045cdf669ec0c747385171b26367..f44f94b2b18008a8adb857e53477e652c48d4a48 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for UMask default
 
 [Service]
-ExecStart=sh -x -c 'rm /tmp/test-exec-umask; touch /tmp/test-exec-umask; mode=$$(stat -c %%a /tmp/test-exec-umask); test "$$mode" = "644"'
+ExecStart=bash -x -c 'rm /tmp/test-exec-umask; touch /tmp/test-exec-umask; mode=$$(stat -c %%a /tmp/test-exec-umask); test "$$mode" = "644"'
 Type=oneshot
 PrivateTmp=yes
index 9c5e277d0578e83d2fbabade95cf39d5ec5a47e6..e64e2610729df9d0f03f83c7a41cd326482db1b5 100644 (file)
@@ -3,7 +3,7 @@
 Description=Test for UnsetEnvironment
 
 [Service]
-ExecStart=sh -x -c 'test "$$FOO" = "bar" && test "$${QUUX-X}" = "X" && test "$$VAR3" = "value3" && test "$${VAR4-X}" = "X" && test "$$VAR5" = "value5" && test "$${X%b-X}" = "X"'
+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"'
 Type=oneshot
 Environment=FOO=bar QUUX=waldo VAR3=value3 VAR4=value4 VAR5=value5 X%b=%U
 UnsetEnvironment=QUUX=waldo VAR3=somethingelse VAR4 X%b=%U
index 1ce5f08370c08381450d20d1ef2e1170934c4478..aa6a3cca870a90a357b5758996bf17fd6b2274f4 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for User
 
 [Service]
-ExecStart=sh -x -c 'test "$$USER" = "nfsnobody"'
+ExecStart=bash -x -c 'test "$$USER" = "nfsnobody"'
 Type=oneshot
 User=nfsnobody
index 003b873b39706467c20290b0574aada8fd2756ef..f5f79540bd58e35ec9bdf6f8393ed8d9107b6bf1 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for User
 
 [Service]
-ExecStart=sh -x -c 'test "$$USER" = "nobody"'
+ExecStart=bash -x -c 'test "$$USER" = "nobody"'
 Type=oneshot
 User=nobody
index 696c7e5739ac9d56b1c47dfa082604098c8e3b8d..c0335b74fabcf289f990d4016682031547eb5bb4 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for User (daemon)
 
 [Service]
-ExecStart=sh -x -c 'test "$$USER" = "daemon"'
+ExecStart=bash -x -c 'test "$$USER" = "daemon"'
 Type=oneshot
 User=daemon
index 3c4869d858078a8215b62e3583995d9f22894acb..6fb9fd490f1eae4ee7922bbe9f54ebffa7d87614 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for WorkingDirectory with trailing dot
 
 [Service]
-ExecStart=sh -x -c 'test "$$PWD" = "/tmp/test-exec_workingdirectory"'
+ExecStart=bash -x -c 'test "$$PWD" = "/tmp/test-exec_workingdirectory"'
 Type=oneshot
 WorkingDirectory=/tmp///./test-exec_workingdirectory/.
index 4c40fafcf1df0209e3d19a4c1163e30b59f356c2..937b9579880bef82cfcbd6c550669ac6d5a464e4 100644 (file)
@@ -3,6 +3,6 @@
 Description=Test for WorkingDirectory
 
 [Service]
-ExecStart=sh -x -c 'test "$$PWD" = "/tmp/test-exec_workingdirectory"'
+ExecStart=bash -x -c 'test "$$PWD" = "/tmp/test-exec_workingdirectory"'
 Type=oneshot
 WorkingDirectory=/tmp/test-exec_workingdirectory
index 68c48fd7907e96335d4cfa043a59008e34e334ac..49695ef7394da0fc238fbd8b079c1c1a71853276 100755 (executable)
@@ -596,7 +596,7 @@ RULES = [
             not_exp_links   = ["foo3", "foo4", "foo5", "foo6", "foo7", "foo8"],
         ),
         rules = r"""
-        SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c 'echo foo3 foo4 foo5 foo6 foo7 foo8 foo9 | sed  s/foo9/bar9/'", KERNEL=="sda5", SYMLINK+="%c{7}"
+        SUBSYSTEMS=="scsi", PROGRAM=="/bin/bash -c 'echo foo3 foo4 foo5 foo6 foo7 foo8 foo9 | sed  s/foo9/bar9/'", KERNEL=="sda5", SYMLINK+="%c{7}"
         """),
 
     Rules.new(
@@ -618,7 +618,7 @@ RULES = [
             not_exp_links   = ["foo1"],
         ),
         rules = r"""
-        SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c 'printf %%s \"foo1 foo2\" | grep \"foo1 foo2\"'", KERNEL=="sda5", SYMLINK+="%c{2}"
+        SUBSYSTEMS=="scsi", PROGRAM=="/bin/bash -c 'printf %%s \"foo1 foo2\" | grep \"foo1 foo2\"'", KERNEL=="sda5", SYMLINK+="%c{2}"
         """),
 
     Rules.new(
@@ -629,7 +629,7 @@ RULES = [
             not_exp_links   = ["foo1"],
         ),
         rules = r"""
-SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c \"printf %%s 'foo1 foo2' | grep 'foo1 foo2'\"", KERNEL=="sda5", SYMLINK+="%c{2}"
+SUBSYSTEMS=="scsi", PROGRAM=="/bin/bash -c \"printf %%s 'foo1 foo2' | grep 'foo1 foo2'\"", KERNEL=="sda5", SYMLINK+="%c{2}"
         """),
 
     Rules.new(
@@ -640,7 +640,7 @@ SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c \"printf %%s 'foo1 foo2' | grep 'foo1 f
             not_exp_links   = ["foo1", "foo3"],
         ),
         rules = r"""
-        SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c 'printf \"%%s %%s\" \"foo1 foo2\" \"foo3\"| grep \"foo1 foo2\"'", KERNEL=="sda5", SYMLINK+="%c{2}"
+        SUBSYSTEMS=="scsi", PROGRAM=="/bin/bash -c 'printf \"%%s %%s\" \"foo1 foo2\" \"foo3\"| grep \"foo1 foo2\"'", KERNEL=="sda5", SYMLINK+="%c{2}"
         """),
 
     Rules.new(
index 4b8b67bd57d1c0aca4d6b6bf01748a36a7d7fc1f..6f7494ef2f83ec320dc83c087d0abe73891d287e 100755 (executable)
@@ -73,13 +73,13 @@ cat <<EOF >/run/systemd/system/wait2.service
 [Unit]
 Description=Wait for 2 seconds
 [Service]
-ExecStart=sh -ec 'sleep 2'
+ExecStart=bash -ec 'sleep 2'
 EOF
 cat <<EOF >/run/systemd/system/wait5fail.service
 [Unit]
 Description=Wait for 5 seconds and fail
 [Service]
-ExecStart=sh -ec 'sleep 5; false'
+ExecStart=bash -ec 'sleep 5; false'
 EOF
 
 # wait2 succeeds
index 5473da1de8f23e0941414e6867b1606c304b7105..5d2ee3a0492e9a97dfb68db9b702828e937975ad 100755 (executable)
@@ -93,7 +93,7 @@ grep -vq "^_PID=$PID" /tmp/output
 # https://github.com/systemd/systemd/issues/15654
 ID=$(systemd-id128 new)
 printf "This will\nusually fail\nand be truncated\n" >/tmp/expected
-systemd-cat -t "$ID" sh -c 'env echo -n "This will";echo;env echo -n "usually fail";echo;env echo -n "and be truncated";echo;'
+systemd-cat -t "$ID" bash -c 'env echo -n "This will"; echo; env echo -n "usually fail"; echo; env echo -n "and be truncated"; echo;'
 journalctl --sync
 journalctl -b -o cat -t "$ID" >/tmp/output
 diff /tmp/expected /tmp/output
@@ -221,7 +221,7 @@ journalctl --follow --merge | head -n1 | grep .
 rm -f /tmp/issue-26746-log /tmp/issue-26746-cursor
 ID="$(systemd-id128 new)"
 journalctl -t "$ID" --follow --cursor-file=/tmp/issue-26746-cursor | tee /tmp/issue-26746-log &
-systemd-cat -t "$ID" sh -c 'echo hogehoge'
+systemd-cat -t "$ID" bash -c 'echo hogehoge'
 # shellcheck disable=SC2016
 timeout 10 bash -c 'until [[ -f /tmp/issue-26746-log && "$(cat /tmp/issue-26746-log)" =~ hogehoge ]]; do sleep .5; done'
 pkill -TERM journalctl
index 3fd1287fb23737b3197079e807bbcb0c2a2aac28..68ade8fc41910d270b3e544e3f41293d0316add2 100755 (executable)
@@ -39,8 +39,8 @@ testcase_pid() {
     # MountAPIVFS=yes always bind mounts child mounts of APIVFS filesystems, which means /proc/sys is always read-only
     # so we can't write to it when running in a container.
     if ! systemd-detect-virt --container; then
-        (! systemd-run -p PrivateUsersEx=self -p PrivatePIDs=yes -p MountAPIVFS=yes --wait --pipe -- sh -c 'echo 5 >/proc/sys/kernel/ns_last_pid')
-        systemd-run -p PrivateUsersEx=self -p PrivatePIDs=yes -p MountAPIVFS=yes -p DelegateNamespaces=pid --wait --pipe -- sh -c 'echo 5 >/proc/sys/kernel/ns_last_pid'
+        (! systemd-run -p PrivateUsersEx=self -p PrivatePIDs=yes -p MountAPIVFS=yes --wait --pipe -- bash -c 'echo 5 >/proc/sys/kernel/ns_last_pid')
+        systemd-run -p PrivateUsersEx=self -p PrivatePIDs=yes -p MountAPIVFS=yes -p DelegateNamespaces=pid --wait --pipe -- bash -c 'echo 5 >/proc/sys/kernel/ns_last_pid'
     fi
 }
 
index 2ec7f018e851523cb2725106f5361a0148b34733..d6255e21cdf84a21818612ae85f662cfece9e4ad 100755 (executable)
@@ -356,7 +356,7 @@ systemd-run \
     -p DynamicUser=yes \
     -p EnvironmentFile=-/usr/lib/systemd/systemd-asan-env \
     -p NotifyAccess=all \
-    sh -c 'touch /tmp/a && touch /var/tmp/b && ! test -f /tmp/b && ! test -f /var/tmp/a && systemd-notify --ready && sleep infinity'
+    bash -c 'touch /tmp/a && touch /var/tmp/b && ! test -f /tmp/b && ! test -f /var/tmp/a && systemd-notify --ready && sleep infinity'
 (! ls /tmp/systemd-private-"$(tr -d '-' < /proc/sys/kernel/random/boot_id)"-test-07-dynamic-user-tmp.service-* &>/dev/null)
 (! ls /var/tmp/systemd-private-"$(tr -d '-' < /proc/sys/kernel/random/boot_id)"-test-07-dynamic-user-tmp.service-* &>/dev/null)
 systemctl is-active test-07-dynamic-user-tmp.service
index 0211166ae3c3883b7e581b47546779353be30502..cb602f391c9de55d5fe9b1390985de11c29f7082 100755 (executable)
@@ -5,7 +5,7 @@ set -o pipefail
 
 # Check that timestamps of a Type=notify service are consistent
 
-systemd-run --service-type notify --property NotifyAccess=all --unit notify.service --wait sh -c 'systemd-notify --ready; exit 1' || :
+systemd-run --service-type notify --property NotifyAccess=all --unit notify.service --wait bash -c 'systemd-notify --ready; exit 1' || :
 
 start=$(systemctl show --property=ExecMainStartTimestampMonotonic --value notify.service)
 handoff=$(systemctl show --property=ExecMainHandoffTimestampMonotonic --value notify.service)
index dcfa9b17b0d62c2be70f3ce58cc980d46f128583..33186b727547f5073117353d2734f9ccd2cdcf85 100755 (executable)
@@ -21,9 +21,9 @@ mkdir -p /run/systemd/system
 cat >/run/systemd/system/my.service <<\EOF
 [Service]
 Type=oneshot
-ExecStartPre=sh -c 'test "$TRIGGER_UNIT" = my.timer'
-ExecStartPre=sh -c 'test -n "$TRIGGER_TIMER_REALTIME_USEC"'
-ExecStartPre=sh -c 'test -n "$TRIGGER_TIMER_MONOTONIC_USEC"'
+ExecStartPre=bash -c 'test "$TRIGGER_UNIT" = my.timer'
+ExecStartPre=bash -c 'test -n "$TRIGGER_TIMER_REALTIME_USEC"'
+ExecStartPre=bash -c 'test -n "$TRIGGER_TIMER_MONOTONIC_USEC"'
 ExecStart=echo Timer runs me
 EOF
 
index 8659970a5fe686b2f9dd1580f65593dc5a3f0161..4b2e9507c37228be2977328f8913acacb645eac3 100755 (executable)
@@ -7,5 +7,5 @@ set -o pipefail
 # Issue: https://github.com/systemd/systemd/issues/27953
 
 systemctl start issue27953.service
-timeout 10 sh -c 'while systemctl is-active issue27953.service; do sleep .5; done'
+timeout 10 bash -c 'while systemctl is-active issue27953.service; do sleep .5; done'
 [[ "$(systemctl show -P ExitType issue27953.service)" == main ]]
index c1cb00e071342d0e27c888fbb31f99da93faaed7..afd852ea483495bde7c4518d320ad02200e7967e 100755 (executable)
@@ -28,5 +28,5 @@ systemctl start badbin_assert.socket
 
 socat - ABSTRACT-CONNECT:badbin_assert.socket
 
-timeout 10 sh -c 'while systemctl is-active badbin_assert.service; do sleep .5; done'
+timeout 10 bash -c 'while systemctl is-active badbin_assert.service; do sleep .5; done'
 [[ "$(systemctl show -P ExecMainStatus badbin_assert.service)" == 203 ]]
index e1a4b6479f9898ec6234e94a19054bc98f846782..a4e0b2f1baeaef0752a9e8bbeb98bb63c2daee95 100755 (executable)
@@ -24,7 +24,7 @@ cat >/run/systemd/system/issue-3171@.service <<EOF
 Description=Test service
 [Service]
 StandardInput=socket
-ExecStart=sh -x -c cat
+ExecStart=bash -x -c cat
 EOF
 
 systemctl start issue-3171.socket
index 0220e1b6922dd0fa0ecc87fd5517881569dcd028..d58d6265ec4caf9427b53a3880f83422d86d9177 100755 (executable)
@@ -129,11 +129,11 @@ testcase_delegate_subgroup_control() {
             -p PrivateMounts=yes \
             -p Delegate=yes \
             -p DelegateSubgroup=supervisor \
-            -p ExecStartPost='sh -c "cat /proc/self/cgroup; kill $MAINPID"' \
+            -p ExecStartPost='bash -c "cat /proc/self/cgroup; kill $MAINPID"' \
             --unit delegate-subgroup-control \
             --wait \
             --pipe \
-            sh -c 'echo +pids >/sys/fs/cgroup/cgroup.subtree_control; systemd-notify --ready; sleep infinity'
+            bash -c 'echo +pids >/sys/fs/cgroup/cgroup.subtree_control; systemd-notify --ready; sleep infinity'
     )" "0::/"
 }
 
@@ -150,7 +150,7 @@ testcase_delegate_subgroup_pam() {
         --unit delegate-subgroup-pam \
         --wait \
         --pipe \
-        sh -c 'echo +pids >/sys/fs/cgroup/cgroup.subtree_control'
+        bash -c 'echo +pids >/sys/fs/cgroup/cgroup.subtree_control'
 }
 
 run_testcases
index a17f08bd51f0b621aa6f15ed757c0c7436d60c1a..03ffa91a7025cdb1a209de6b1a7bda6782a1029d 100755 (executable)
@@ -121,7 +121,7 @@ After=basic.target
 
 [Service]
 Type=oneshot
-ExecStart=sh -c 'echo "$EXPECTED_OUTPUT"  > "$guest_output"'
+ExecStart=bash -c 'echo "$EXPECTED_OUTPUT"  > "$guest_output"'
 ExecStartPost=systemctl --no-block exit 0
 TimeoutStopSec=15s
 
index 7ae23558dca92e63bb924ed73884005b2f6d81ab..50a8c142dbf092c36e26abbcf7c8f76fbec010b8 100755 (executable)
@@ -13,7 +13,7 @@ at_exit() {
     set +e
 
     machinectl status long-running &>/dev/null && machinectl kill --signal=KILL long-running
-    mountpoint -q /var/lib/machines && timeout 30 sh -c "until umount /var/lib/machines; do sleep .5; done"
+    mountpoint -q /var/lib/machines && timeout 30 bash -c "until umount /var/lib/machines; do sleep .5; done"
     [[ -n "${NSPAWN_FRAGMENT:-}" ]] && rm -f "/etc/systemd/nspawn/$NSPAWN_FRAGMENT" "/var/lib/machines/$NSPAWN_FRAGMENT"
     rm -f /run/systemd/nspawn/*.nspawn
 }
index bae3e2e085c509605ccc4782c2627f5940a39283..877482c0f1fb88205d114b71767172b55d80c114 100755 (executable)
@@ -305,7 +305,7 @@ cat >"$OCI/config.json" <<EOF
     "hooks" : {
         "prestart" : [
             {
-                "path" : "/bin/sh",
+                "path" : "/bin/bash",
                 "args" : [
                     "-xec",
                     "echo \$PRESTART_FOO >/prestart"
@@ -325,7 +325,7 @@ cat >"$OCI/config.json" <<EOF
         ],
         "poststart" : [
             {
-                "path" : "/bin/sh",
+                "path" : "/bin/bash",
                 "args" : [
                     "touch",
                     "/poststart"
@@ -334,7 +334,7 @@ cat >"$OCI/config.json" <<EOF
         ],
         "poststop" : [
             {
-                "path" : "/bin/sh",
+                "path" : "/bin/bash",
                 "args" : [
                     "touch",
                     "/poststop"
@@ -436,7 +436,7 @@ INVALID_SNIPPETS=(
     '"linux" : { "readonlyPaths" : [ "/foo", 1 ] }'
     '"linux" : { "readonlyPaths" : [ "/foo", "bar" ] }'
     # Invalid hooks
-    '"hooks" : { "prestart" : [ { "path" : "/bin/sh", "timeout" : 0 } ] }'
+    '"hooks" : { "prestart" : [ { "path" : "/bin/bash", "timeout" : 0 } ] }'
     # Invalid annotations
     '"annotations" : { "" : "bar" }'
     '"annotations" : { "foo" : 1 }'
@@ -453,7 +453,7 @@ for snippet in "${INVALID_SNIPPETS[@]}"; do
     $snippet
 }
 EOF
-    (! systemd-nspawn --oci-bundle="$OCI" sh -c 'echo hello')
+    (! systemd-nspawn --oci-bundle="$OCI" bash -c 'echo hello')
 done
 
 # Invalid OCI bundle version
@@ -465,4 +465,4 @@ cat >"$OCI/config.json" <<EOF
     }
 }
 EOF
-(! systemd-nspawn --oci-bundle="$OCI" sh -c 'echo hello')
+(! systemd-nspawn --oci-bundle="$OCI" bash -c 'echo hello')
index 5709ec50d706bacbe127169b37b7d05974bae7cd..a14c53154cc202b94465107a36358bb458788225 100755 (executable)
@@ -11,7 +11,7 @@ at_exit() {
     set +e
 
     machinectl kill --signal=KILL nss-mymachines-{noip,singleip,manyips}
-    mountpoint -q /var/lib/machines && timeout 30 sh -c "until umount /var/lib/machines; do sleep .5; done"
+    mountpoint -q /var/lib/machines && timeout 30 bash -c "until umount /var/lib/machines; do sleep .5; done"
     rm -f /run/systemd/nspawn/*.nspawn
 }
 
index 93fc0b78f6061782a052e96526c20d4f24dcdbeb..9f5c77e4e856a474b6abc25ed27d9eaefa1d6bc6 100755 (executable)
@@ -70,21 +70,21 @@ runtime_max_sec=5
 systemd-run \
     --property=RuntimeMaxSec=${runtime_max_sec}s \
     -u runtime-max-sec-test-1.service \
-    sh -c "while true; do sleep 1; done"
+    bash -c "while true; do sleep 1; done"
 wait_for_timeout runtime-max-sec-test-1.service $((runtime_max_sec + 2))
 
 systemd-run \
     --property=RuntimeMaxSec=${runtime_max_sec}s \
     --scope \
     -u runtime-max-sec-test-2.scope \
-    sh -c "while true; do sleep 1; done" &
+    bash -c "while true; do sleep 1; done" &
 wait_for_timeout runtime-max-sec-test-2.scope $((runtime_max_sec + 2))
 
 # These ensure that RuntimeMaxSec is honored for scope and service
 # units if the value is changed and then the manager is reloaded.
 systemd-run \
     -u runtime-max-sec-test-3.service \
-    sh -c "while true; do sleep 1; done"
+    bash -c "while true; do sleep 1; done"
 mkdir -p /etc/systemd/system/runtime-max-sec-test-3.service.d/
 cat >/etc/systemd/system/runtime-max-sec-test-3.service.d/override.conf <<EOF
 [Service]
@@ -96,7 +96,7 @@ wait_for_timeout runtime-max-sec-test-3.service $((runtime_max_sec + 2))
 systemd-run \
     --scope \
     -u runtime-max-sec-test-4.scope \
-    sh -c "while true; do sleep 1; done" &
+    bash -c "while true; do sleep 1; done" &
 
 # Wait until the unit is running to avoid race with creating the override.
 until systemctl is-active runtime-max-sec-test-4.scope; do
index f20af1a1418525080532d400310c7bce01d32537..228550b76bb2887e7a4f395391e45b78c9c45671 100755 (executable)
@@ -17,7 +17,7 @@ systemd-run --unit=exec1.service --wait -p StandardOutput=tty -p StandardError=t
 test -f /run/exec1
 
 (! systemd-run --unit=exec2.service --wait -p StandardOutput=tty -p StandardError=tty -p Type=exec \
-   -p ExecStopPost='touch /run/exec2' sh -c 'sleep 1; false')
+   -p ExecStopPost='touch /run/exec2' bash -c 'sleep 1; false')
 test -f /run/exec2
 
 cat >/tmp/forking1.sh <<EOF
index ec01e990be65e1e314cc374f18a791b111ef6c4e..409882306ea73f49e79c403d4f36978c0e35ada7 100755 (executable)
@@ -9,7 +9,7 @@ systemd-run --wait --unit=TEST-23-UNIT-FILE-standard-output-one \
             -p StandardOutput=file:/tmp/stdout \
             -p StandardError=file:/tmp/stderr \
             -p Type=exec \
-            sh -c 'echo x ; echo y >&2'
+            bash -c 'echo x ; echo y >&2'
 cmp /tmp/stdout <<EOF
 x
 EOF
@@ -21,7 +21,7 @@ systemd-run --wait --unit=TEST-23-UNIT-FILE-standard-output-two \
             -p StandardOutput=file:/tmp/stdout \
             -p StandardError=file:/tmp/stderr \
             -p Type=exec \
-            sh -c 'echo z ; echo a >&2'
+            bash -c 'echo z ; echo a >&2'
 cmp /tmp/stdout <<EOF
 z
 EOF
@@ -33,7 +33,7 @@ systemd-run --wait --unit=TEST-23-UNIT-FILE-standard-output-three \
             -p StandardOutput=append:/tmp/stdout \
             -p StandardError=append:/tmp/stderr \
             -p Type=exec \
-            sh -c 'echo b ; echo c >&2'
+            bash -c 'echo b ; echo c >&2'
 cmp /tmp/stdout <<EOF
 z
 b
@@ -47,7 +47,7 @@ systemd-run --wait --unit=TEST-23-UNIT-FILE-standard-output-four \
             -p StandardOutput=truncate:/tmp/stdout \
             -p StandardError=truncate:/tmp/stderr \
             -p Type=exec \
-            sh -c 'echo a ; echo b >&2'
+            bash -c 'echo a ; echo b >&2'
 cmp /tmp/stdout <<EOF
 a
 EOF
index f2b3adb0d25b27d9e6812356d13b55803fe30f3a..64de27f55cc2c51175a479b31f6d980e38c18c52 100755 (executable)
@@ -56,8 +56,8 @@ test "$(readlink "$HOME"/.local/state/foo)" = ../../.config/foo
 # Check that this will work safely a second time
 systemd-run --user -p StateDirectory=foo -p ConfigurationDirectory=foo --wait true
 
-( ! systemd-run --user -p StateDirectory=foo::ro --wait sh -c "echo foo > $HOME/.local/state/foo/baz")
-( ! systemd-run --user -p StateDirectory=foo:bar:ro --wait sh -c "echo foo > $HOME/.local/state/foo/baz")
+( ! systemd-run --user -p StateDirectory=foo::ro --wait bash -c "echo foo > $HOME/.local/state/foo/baz")
+( ! systemd-run --user -p StateDirectory=foo:bar:ro --wait bash -c "echo foo > $HOME/.local/state/foo/baz")
 ( ! test -f "$HOME"/.local/state/foo/baz)
 test -L "$HOME"/.local/state/bar
 
index e89c012dd37778f905082c98fb9baacf668237cd..601e44098d376513c280019fc2e561f6a15d1ed9 100755 (executable)
@@ -23,7 +23,7 @@ test_directory() {
     (! systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"=zzz test -f "${path}"/zzz/test-missing)
     systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"="www::ro www:ro:ro" test -d "${path}"/www
     systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"="www::ro www:ro:ro" test -L "${path}"/ro
-    (! systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"="www::ro www:ro:ro" sh -c "echo foo > ${path}/www/test-missing")
+    (! systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"="www::ro www:ro:ro" bash -c "echo foo > ${path}/www/test-missing")
 
     test -d "${path}"/zzz
     test ! -L "${path}"/zzz
@@ -50,7 +50,7 @@ test_directory() {
     (! systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=1 -p "${directory}"=zzz test -f "${path}"/zzz/test-missing)
     systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=1 -p "${directory}"="www::ro www:ro:ro" test -d "${path}"/www
     systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=1 -p "${directory}"="www::ro www:ro:ro" test -L "${path}"/ro
-    (! systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=1 -p "${directory}"="www::ro www:ro:ro" sh -c "echo foo > ${path}/www/test-missing")
+    (! systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=1 -p "${directory}"="www::ro www:ro:ro" bash -c "echo foo > ${path}/www/test-missing")
 
     test -L "${path}"/zzz
     test -d "${path}"/private/zzz
@@ -76,7 +76,7 @@ test_directory() {
     (! systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"=zzz test -f "${path}"/zzz/test-missing)
     systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"="www::ro www:ro:ro" test -d "${path}"/www
     systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"="www::ro www:ro:ro" test -L "${path}"/ro
-    (! systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"="www::ro www:ro:ro" sh -c "echo foo > ${path}/www/test-missing")
+    (! systemd-run --wait -p RuntimeDirectoryPreserve=yes -p DynamicUser=0 -p "${directory}"="www::ro www:ro:ro" bash -c "echo foo > ${path}/www/test-missing")
 
     test -d "${path}"/zzz
     test ! -L "${path}"/zzz
@@ -106,7 +106,7 @@ ExecStart=test -f ${path}/x:yz/test
 ExecStart=test -f ${path}/zzz/test
 ExecStart=test -d ${path}/www
 ExecStart=test -L ${path}/ro
-ExecStart=sh -c "! test -w ${path}/www"
+ExecStart=bash -c "! test -w ${path}/www"
 EOF
     systemctl daemon-reload
     systemctl start --wait testservice-34.service
index b28df65fe57e27bca129e83c5eb74863b113f0f4..b15d62d4f91dddb96b98744a112d87d2dbd13fc9 100755 (executable)
@@ -84,12 +84,12 @@ runas testuser systemd-run --wait --user --unit=test-caps \
 
 runas testuser systemd-run --wait --user --unit=test-devices \
     -p PrivateDevices=yes -p PrivateIPC=yes \
-    sh -c "ls -1 /dev/ | wc -l | grep -q -F 18"
+    bash -c "ls -1 /dev/ | wc -l | grep -q -F 18"
 
 # Same check as test/test-execute/exec-privatenetwork-yes.service
 runas testuser systemd-run --wait --user --unit=test-network \
     -p PrivateNetwork=yes \
-    sh -x -c '! ip link | grep -E "^[0-9]+: " | grep -Ev ": (lo|(erspan|gre|gretap|ip_vti|ip6_vti|ip6gre|ip6tnl|sit|tunl)0@.*):"'
+    bash -x -c '! ip link | grep -E "^[0-9]+: " | grep -Ev ": (lo|(erspan|gre|gretap|ip_vti|ip6_vti|ip6gre|ip6tnl|sit|tunl)0@.*):"'
 
 (! runas testuser systemd-run --wait --user --unit=test-hostname \
     -p ProtectHostname=yes \
@@ -101,11 +101,11 @@ runas testuser systemd-run --wait --user --unit=test-network \
 
 (! runas testuser systemd-run --wait --user --unit=test-kernel-tunable \
     -p ProtectKernelTunables=yes \
-    sh -c "echo 0 >/proc/sys/user/max_user_namespaces")
+    bash -c "echo 0 >/proc/sys/user/max_user_namespaces")
 
 (! runas testuser systemd-run --wait --user --unit=test-kernel-mod \
     -p ProtectKernelModules=yes \
-    sh -c "modprobe -r overlay && modprobe overlay")
+    bash -c "modprobe -r overlay && modprobe overlay")
 
 if sysctl kernel.dmesg_restrict=0; then
     (! runas testuser systemd-run --wait --user --unit=test-kernel-log \
index 15a53b18f75af7ee808af720ffbfae5cacf964c5..8eee967d7c6bd2b3ff0555edafb2fa991ab341b6 100755 (executable)
@@ -687,20 +687,20 @@ run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest cp -a
 run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest ln -s /home/srub Areas/srub
 run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest ln -s /root Areas/root
 
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest sh -c 'echo $HOME')" = "/home/subareatest"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest sh -c 'echo x$XDG_AREA')" = "x"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest sh -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb sh -c 'echo $HOME')" = "/home/subareatest/Areas/furb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb sh -c 'echo $XDG_AREA')" = "furb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb sh -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/furb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest bash -c 'echo $HOME')" = "/home/subareatest"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest bash -c 'echo x$XDG_AREA')" = "x"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest bash -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb bash -c 'echo $HOME')" = "/home/subareatest/Areas/furb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb bash -c 'echo $XDG_AREA')" = "furb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb bash -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/furb"
 
 PASSWORD=quux homectl update subareatest --default-area=molb
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest sh -c 'echo $HOME')" = "/home/subareatest/Areas/molb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest sh -c 'echo $XDG_AREA')" = "molb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest sh -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/molb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb sh -c 'echo $HOME')" = "/home/subareatest/Areas/furb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb sh -c 'echo $XDG_AREA')" = "furb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb sh -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/furb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest bash -c 'echo $HOME')" = "/home/subareatest/Areas/molb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest bash -c 'echo $XDG_AREA')" = "molb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest bash -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/molb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb bash -c 'echo $HOME')" = "/home/subareatest/Areas/furb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb bash -c 'echo $XDG_AREA')" = "furb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb bash -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/furb"
 
 # Install a PK rule that allows 'subareatest' user to invoke run0 without password, just for testing
 cat >/usr/share/polkit-1/rules.d/subareatest.rules <<'EOF'
@@ -713,24 +713,24 @@ polkit.addRule(function(action, subject) {
 EOF
 
 # Test "recursive" operation
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb sh -c 'echo $HOME')" = "/home/subareatest/Areas/molb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb sh -c 'echo $XDG_AREA')" = "molb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb sh -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/molb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb sh -c 'echo $HOME')" = "/home/subareatest/Areas/furb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb sh -c 'echo $XDG_AREA')" = "furb"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb sh -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/furb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb bash -c 'echo $HOME')" = "/home/subareatest/Areas/molb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb bash -c 'echo $XDG_AREA')" = "molb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb bash -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/molb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb bash -c 'echo $HOME')" = "/home/subareatest/Areas/furb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb bash -c 'echo $XDG_AREA')" = "furb"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=molb run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=furb bash -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/furb"
 
 # Test symlinked area
 mkdir -p /home/srub
 chown subareatest:subareatest /home/srub
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=srub sh -c 'echo $HOME')" = "/home/srub"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=srub sh -c 'echo $XDG_AREA')" = "srub"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=srub sh -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/srub"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=srub bash -c 'echo $HOME')" = "/home/srub"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=srub bash -c 'echo $XDG_AREA')" = "srub"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=srub bash -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)/Areas/srub"
 
 # Verify that login into an area not owned by target user will be redirected to main area
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=root sh -c 'echo $HOME')" = "/home/subareatest"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=root sh -c 'echo x$XDG_AREA')" = "x"
-test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=root sh -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=root bash -c 'echo $HOME')" = "/home/subareatest"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=root bash -c 'echo x$XDG_AREA')" = "x"
+test "$(run0 --property=SetCredential=pam.authtok.systemd-run0:quux -u subareatest --area=root bash -c 'echo $XDG_RUNTIME_DIR')" = "/run/user/$(id -u subareatest)"
 
 systemctl stop user@"$(id -u subareatest)".service
 
index 6ac4263dff77facecd95e3f104706bb63b2c353e..bf45489545e53a6be1df7dfb034530ea0ccaf81e 100755 (executable)
@@ -363,7 +363,7 @@ Type=notify
 RemainAfterExit=yes
 MountAPIVFS=yes
 PrivateTmp=yes
-ExecStart=sh -c ' \\
+ExecStart=bash -c ' \\
     systemd-notify --ready; \\
     while [ ! -f /tmp/img/usr/lib/os-release ] || ! grep -q -F MARKER /tmp/img/usr/lib/os-release; do \\
         sleep 0.1; \\
index a70cf6df0fa9f9af59c0b49c559ecf110b37c494..5985cbdb799b3340171210bd569f30cf8be5d76d 100755 (executable)
@@ -76,7 +76,7 @@ if [ "$VERITY_SIG_SUPPORTED" -eq 1 ]; then
     systemd-run -M testuser@ --user --pipe --wait \
         --property RootImage="$MINIMAL_IMAGE.raw" \
         --property ExtensionImages=/tmp/app0.raw \
-        sh -c "test -e \"/dev/mapper/${MINIMAL_IMAGE_ROOTHASH}-verity\" && test -e \"/dev/mapper/$(</tmp/app0.roothash)-verity\""
+        bash -c "test -e \"/dev/mapper/${MINIMAL_IMAGE_ROOTHASH}-verity\" && test -e \"/dev/mapper/$(</tmp/app0.roothash)-verity\""
 
     # Without a signature this should not work, as mountfsd should reject it, even if we explicitly ask to
     # trust it
@@ -84,12 +84,12 @@ if [ "$VERITY_SIG_SUPPORTED" -eq 1 ]; then
     (! systemd-run -M testuser@ --user --pipe --wait \
         --property RootImage="$MINIMAL_IMAGE.raw" \
         --property ExtensionImages=/tmp/app0.raw \
-        sh -c "test -e \"/dev/mapper/${MINIMAL_IMAGE_ROOTHASH}-verity\" && test -e \"/dev/mapper/$(</tmp/app0.roothash)-verity\"")
+        bash -c "test -e \"/dev/mapper/${MINIMAL_IMAGE_ROOTHASH}-verity\" && test -e \"/dev/mapper/$(</tmp/app0.roothash)-verity\"")
     (! systemd-run -M testuser@ --user --pipe --wait \
         --property RootImage="$MINIMAL_IMAGE.raw" \
         --property ExtensionImages=/tmp/app0.raw \
         --property ExtensionImagePolicy=root=verity+signed+absent:usr=verity+signed+absent \
-        sh -c "test -e \"/dev/mapper/${MINIMAL_IMAGE_ROOTHASH}-verity\" && test -e \"/dev/mapper/$(</tmp/app0.roothash)-verity\"")
+        bash -c "test -e \"/dev/mapper/${MINIMAL_IMAGE_ROOTHASH}-verity\" && test -e \"/dev/mapper/$(</tmp/app0.roothash)-verity\"")
     mv /tmp/app0.roothash.p7s.bak /tmp/app0.roothash.p7s
 fi
 
index f368d216531e222fdb2501fa9f9626301869e63d..929796751d8b8539899d26b786e0fbae62c21626 100755 (executable)
@@ -1146,7 +1146,7 @@ Description=Test unit for systemd-analyze unit-shell
 [Service]
 Type=notify
 NotifyAccess=all
-ExecStart=sh -c "echo 'Hello from test unit' >/tmp/testfile; systemd-notify --ready; sleep infinity"
+ExecStart=bash -c "echo 'Hello from test unit' >/tmp/testfile; systemd-notify --ready; sleep infinity"
 PrivateTmp=disconnected
 EOF
 # Start the service
index f0f4db397d0c5ab74fa8b2b7ebc40e0582aedf60..1d94cb0a1c874446fc10820a10e4e31295033496 100644 (file)
@@ -22,7 +22,7 @@ ConditionPathExists=|/.autorelabel
 SuccessAction=reboot
 
 [Service]
-ExecStart=sh -xec 'echo 0 >/sys/fs/selinux/enforce; fixfiles -f -F relabel; rm /.autorelabel;'
+ExecStart=bash -xec 'echo 0 >/sys/fs/selinux/enforce; fixfiles -f -F relabel; rm /.autorelabel;'
 Type=oneshot
 TimeoutSec=infinity