Skip to content

Commit

Permalink
tsbin/mlnx_bf_configure: Support chroot environment
Browse files Browse the repository at this point in the history
When running in chroot exit after configuring switchdev mode.
This is to support NIC firmware upgrade during BFB installation.

Signed-off-by: Vladimir Sokolovsky <[email protected]>
  • Loading branch information
vladsokolovsky committed Nov 16, 2023
1 parent 118d416 commit ead1b58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tsbin/mlnx_bf_configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ead1b58

Please sign in to comment.