test: hardcode shell to use

let's make sure we always invoke our commands through /bin/sh, since
on some distros su will use /bin/nologin (or whatever is listed in
/etc/passwd) as shell otherwise and we don#t want that.
This commit is contained in:
Lennart Poettering
2020-01-06 15:21:19 +01:00
parent 14b6e6b6f3
commit 519b2e5212
+1 -1
View File
@@ -7,7 +7,7 @@ systemd-analyze log-level debug
runas() {
declare userid=$1
shift
su "$userid" -c 'XDG_RUNTIME_DIR=/run/user/$UID "$@"' -- sh "$@"
su "$userid" -s /bin/sh -c 'XDG_RUNTIME_DIR=/run/user/$UID exec "$@"' -- sh "$@"
}
runas nobody systemctl --user --wait is-system-running