-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kernel args for rdma mode to complement the modprobe file
Signed-off-by: Sebastian Sch <[email protected]>
- Loading branch information
Showing
16 changed files
with
540 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
command=$1 | ||
shift | ||
declare -a kargs=( "$@" ) | ||
ret=0 | ||
args=$(chroot /host/ cat /proc/cmdline) | ||
|
||
if chroot /host/ test -f /run/ostree-booted ; then | ||
for t in "${kargs[@]}";do | ||
if [[ $command == "add" ]];then | ||
if [[ $args != *${t}* ]];then | ||
if chroot /host/ rpm-ostree kargs | grep -vq ${t}; then | ||
chroot /host/ rpm-ostree kargs --append ${t} > /dev/null 2>&1 | ||
fi | ||
let ret++ | ||
fi | ||
fi | ||
if [[ $command == "remove" ]];then | ||
if [[ $args == *${t}* ]];then | ||
if chroot /host/ rpm-ostree kargs | grep -q ${t}; then | ||
chroot /host/ rpm-ostree kargs --delete ${t} > /dev/null 2>&1 | ||
fi | ||
let ret++ | ||
fi | ||
fi | ||
done | ||
else | ||
chroot /host/ which grubby > /dev/null 2>&1 | ||
# if grubby is not there, let's tell it | ||
if [ $? -ne 0 ]; then | ||
exit 127 | ||
fi | ||
for t in "${kargs[@]}";do | ||
if [[ $command == "add" ]];then | ||
if [[ $args != *${t}* ]];then | ||
if chroot /host/ grubby --info=DEFAULT | grep args | grep -vq ${t}; then | ||
chroot /host/ grubby --update-kernel=DEFAULT --args=${t} > /dev/null 2>&1 | ||
fi | ||
let ret++ | ||
fi | ||
fi | ||
if [[ $command == "remove" ]];then | ||
if [[ $args == *${t}* ]];then | ||
if chroot /host/ grubby --info=DEFAULT | grep args | grep -q ${t}; then | ||
chroot /host/ grubby --update-kernel=DEFAULT --remove-args=${t} > /dev/null 2>&1 | ||
fi | ||
let ret++ | ||
fi | ||
fi | ||
done | ||
fi | ||
|
||
echo $ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.