Skip to content

Commit

Permalink
suse: fix dracut support
Browse files Browse the repository at this point in the history
[ Upstream commit d22ad7c ]

SUSE dracut does not support /etc/dracut.conf.d but /usr/lib/dracut/modules.d
Replace redhat script by a simpler one that reuses the standard
udev/systemd scripts

Cc: [email protected] #v15
Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]>
  • Loading branch information
nmorey committed Jun 3, 2019
1 parent 5ca65de commit 9ef81fe
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
31 changes: 31 additions & 0 deletions suse/module-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

check() {
[ -n "$hostonly" -a -c /sys/class/infiniband_verbs/uverbs0 ] && return 0
[ -n "$hostonly" ] && return 255
return 0
}

depends() {
return 0
}

install() {
inst /etc/rdma/mlx4.conf
inst /etc/rdma/modules/infiniband.conf
inst /etc/rdma/modules/iwarp.conf
inst /etc/rdma/modules/opa.conf
inst /etc/rdma/modules/rdma.conf
inst /etc/rdma/modules/roce.conf
inst /usr/lib/mlx4-setup.sh
inst_multiple lspci setpci awk sleep
inst_rules 70-persistent-ipoib.rules 75-rdma-description.rules 90-rdma-hw-modules.rules 90-rdma-ulp-modules.rules
inst_multiple -o \
$systemdsystemunitdir/rdma-hw.target \
$systemdsystemunitdir/[email protected]
}

installkernel() {
hostonly='' instmods =drivers/infiniband =drivers/net/ethernet/mellanox =drivers/net/ethernet/chelsio =drivers/net/ethernet/cisco =drivers/net/ethernet/emulex =drivers/target
hostonly='' instmods crc-t10dif crct10dif_common
}
5 changes: 2 additions & 3 deletions suse/rdma-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ cd build
cd ..
mkdir -p %{buildroot}/%{_sysconfdir}/rdma

%global dracutlibdir %%{_sysconfdir}/dracut.conf.d
%global dracutlibdir %%{_libexecdir}/dracut/
%global sysmodprobedir %%{_sysconfdir}/modprobe.d

mkdir -p %{buildroot}%{_libexecdir}/udev/rules.d
Expand All @@ -414,8 +414,7 @@ chmod 0644 %{buildroot}%{sysmodprobedir}/50-libmlx4.conf
install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setup.sh

# Dracut file for IB support during boot
sed 's%/usr/libexec%/usr/lib%g' redhat/rdma.modules-setup.sh > %{buildroot}%{dracutlibdir}/modules.d/05rdma/module-setup.sh
chmod 0755 %{buildroot}%{dracutlibdir}/modules.d/05rdma/module-setup.sh
install -D -m0644 suse/module-setup.sh %{buildroot}%{dracutlibdir}/modules.d/05rdma/module-setup.sh

# ibacm
cd build
Expand Down

0 comments on commit 9ef81fe

Please sign in to comment.