This patch is part of our packaging policy.
As we have usually two kernel installed on a single server, we need to
install two instances of the ofa_kernel.
The install used to be quite a mess as the second installation (install
on the second kernel) conflict with the first one on the configuration
files, and the differents scripts.
Therefore, we split the ofa_kernel into 2 packages in the spec file (a
bit like redhat) with ofa_kernel containing the modules and
ofa_kernel_scripts containing the udev files, configurating the
modprobe.conf and so on...
A problem remained with the /etc/infiniband/openib.conf as it is
dependant from the ofa_kernel installed (which modules it was compiled
with) but couldn't be directly put in the same package as it would
conflict when doing an install from another kernel.
Thus, we have made this match so openib tries first to load
/etc/infiniband/openib_`uname -r`.conf and fallback to the regular
/etc/infiniband/openib.conf if the previous one doesn't exists.
Therefore, by modifying the spec file, we are able to install the
openibd config file as part of the ofa_kernel (and not
ofa_kernel_scripts) without any conflicts, and keeping openibd
compatible with regular ofa_kernel packaging.
This is definitely a patch made for our needs, but the base idea to
split the kernel module and the scripts is quite good, so I'm sharing it !
Nicolas
Signed-off-by: Nicolas Morey-Chaisemartin
<[EMAIL PROTECTED]>
---
ofed_scripts/openibd | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/ofed_scripts/openibd b/ofed_scripts/openibd
index 482067d..856ade2 100755
--- a/ofed_scripts/openibd
+++ b/ofed_scripts/openibd
@@ -30,12 +30,17 @@
# $Id: openibd 9139 2006-08-29 14:03:38Z vlad $
#
-# config: /etc/infiniband/openib.conf
-CONFIG="/etc/infiniband/openib.conf"
+# config: /etc/infiniband/openib_`uname -r`.conf
+CONFIG="/etc/infiniband/openib_`uname -r`.conf"
if [ ! -f $CONFIG ]; then
- echo No InfiniBand configuration found
- exit 0
+ CONFIG="/etc/infiniband/openib.conf"
+ if [ ! -f $CONFIG ]; then
+ echo No InfiniBand configuration found
+ exit 0
+ else
+ echo "Using default configuration file"
+ fi
fi
. $CONFIG
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general