mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 11:06:21 +00:00
rootfs: use command vs which, avoid "1" file creation
Replace "which" with "command", that's a bash built-in and should not generate any stderr messages. This also fixex the spurious creating of "1" file in the repo root because of a typo in stderr redirect. Fixes: #286 Signed-off-by: Marco Vedovati <mvedovati@suse.com>
This commit is contained in:
parent
31b9a23da0
commit
9a8f1688d5
@ -337,7 +337,7 @@ if [ -n "${USE_DOCKER}" ] ; then
|
||||
docker_run_args+=" $(docker_extra_args $distro)"
|
||||
|
||||
# Relabel volumes so SELinux allows access (see docker-run(1))
|
||||
if which selinuxenabled 2&>1 >/dev/null && selinuxenabled ; then
|
||||
if command -v selinuxenabled > /dev/null && selinuxenabled ; then
|
||||
for volume_dir in "${script_dir}" \
|
||||
"${ROOTFS_DIR}" \
|
||||
"${script_dir}/../scripts" \
|
||||
|
Loading…
Reference in New Issue
Block a user