Last active
March 14, 2017 23:23
-
-
Save kvaps/40eae7531aa014f688fd2806eb934c2c to your computer and use it in GitHub Desktop.
Script for build beegfs-client module for specified kernel
This file contains hidden or 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
| #!/bin/bash | |
| LAST_KERNEL="$(ls -1h /lib/modules | tail -n1)" | |
| KERNEL="${1:-$LAST_KERNEL}" | |
| function finish { | |
| mv /opt/beegfs/src/client/beegfs_client_module_6/build/Makefile{.bak,} | |
| mv /etc/beegfs/beegfs-client-autobuild.conf{.bak,} | |
| } | |
| trap finish EXIT | |
| echo "Using: ${KERNEL}" | |
| cp /etc/beegfs/beegfs-client-autobuild.conf{,.bak} | |
| cp /opt/beegfs/src/client/beegfs_client_module_6/build/Makefile{,.bak} | |
| sed -i \ | |
| -e '/^buildArgs=.*$/ s|$| KDIR="/lib/modules/'${KERNEL}'/build /usr/src/linux-headers-'${KERNEL}'"|g' \ | |
| -e 's|buildEnabled=.*|buildEnabled=true|g' \ | |
| /etc/beegfs/beegfs-client-autobuild.conf | |
| sed -i '/depmod/ s|^|#|g' /opt/beegfs/src/client/beegfs_client_module_6/build/Makefile | |
| /etc/init.d/beegfs-client rebuild | |
| depmod ${KERNEL} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment