ZTS: Use ksh and current environment for user_run

The current user_run often does not work as expected.  Commands are run
in a different shell, with a different environment, and all output is
discarded.

Simplify user_run to retain the current environment, eliminate eval,
and feed the command string into ksh.  Enhance the logging for
user_run so we can see out and err.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11185
This commit is contained in:
Ryan Moeller
2021-03-11 15:01:58 -05:00
committed by Brian Behlendorf
parent e464f7c7cc
commit e0b53a5dbb
2 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -33,6 +33,7 @@ export SYSTEM_FILES_COMMON='arp
du
echo
egrep
env
expr
false
file
@@ -117,7 +118,6 @@ export SYSTEM_FILES_FREEBSD='chflags
compress
diskinfo
dumpon
env
fsck
getextattr
gpart