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-03 18:25:51 +01:00
parent ec04aef442
commit 6e0ed2865e
1 changed files with 1 additions and 1 deletions

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