From ead1b58a845050aa601620314efdb2bb390520ad Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Wed, 15 Nov 2023 20:45:43 -0600 Subject: [PATCH] tsbin/mlnx_bf_configure: Support chroot environment When running in chroot exit after configuring switchdev mode. This is to support NIC firmware upgrade during BFB installation. Signed-off-by: Vladimir Sokolovsky --- tsbin/mlnx_bf_configure | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tsbin/mlnx_bf_configure b/tsbin/mlnx_bf_configure index b34b067..3c3cbb8 100755 --- a/tsbin/mlnx_bf_configure +++ b/tsbin/mlnx_bf_configure @@ -346,6 +346,11 @@ do fi done +if [ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ]; then + info "Running in chroot environment. Exiting..." + exit 0 +fi + if [ $RC -ne 0 ]; then error "Exiting due to failures. RC=$RC" exit $RC