From 711a3a8e4023e803ebe446f5be35c17ec2f43105 Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Fri, 22 Mar 2024 11:36:34 -0700 Subject: [PATCH] don't hardcode x86_64 when building symlinks against /usr/src/ofa_kernel --- rhel8/nvidia-driver | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rhel8/nvidia-driver b/rhel8/nvidia-driver index 0105ed58..ddd3d30b 100755 --- a/rhel8/nvidia-driver +++ b/rhel8/nvidia-driver @@ -213,9 +213,9 @@ _create_driver_package() ( # lrwxrwxrwx 1 root root 36 Dec 8 20:10 default -> /etc/alternatives/ofa_kernel_headers # drwxr-xr-x 4 root root 4096 Dec 8 20:14 x86_64 # lrwxrwxrwx 1 root root 44 Dec 9 19:05 5.4.0-90-generic -> /usr/src/ofa_kernel/x86_64/5.4.0-90-generic/ - if [[ -d /run/mellanox/drivers/usr/src/ofa_kernel/x86_64/`uname -r` ]]; then - if [[ ! -e /usr/src/ofa_kernel/`uname -r` ]]; then - ln -s /run/mellanox/drivers/usr/src/ofa_kernel/x86_64/`uname -r` /usr/src/ofa_kernel/ + if [[ -d /run/mellanox/drivers/usr/src/ofa_kernel/$(uname -m)/$(uname -r) ]]; then + if [[ ! -e /usr/src/ofa_kernel/$(uname -r) ]]; then + ln -s /run/mellanox/drivers/usr/src/ofa_kernel/$(uname -m)/$(uname -r) /usr/src/ofa_kernel/ fi fi fi