Merge pull request #87414 from chkno/specify-shell-when-sudoing-to-user-with-unknown-shell
nixos/test-driver: Specify /bin/sh shell when running a bourne shell script as the user
This commit is contained in:
commit
b12c08ca88
@ -369,7 +369,7 @@ class Machine:
|
||||
q = q.replace("'", "\\'")
|
||||
return self.execute(
|
||||
(
|
||||
"su -l {} -c "
|
||||
"su -l {} --shell /bin/sh -c "
|
||||
"$'XDG_RUNTIME_DIR=/run/user/`id -u` "
|
||||
"systemctl --user {}'"
|
||||
).format(user, q)
|
||||
|
Loading…
Reference in New Issue
Block a user