Merge pull request #179 from jpoimboe/modprobe-core-module

kpatch: try to modprobe core module
This commit is contained in:
Seth Jennings 2014-05-09 23:24:42 -05:00
commit c34f4c23e0
1 changed files with 7 additions and 3 deletions

View File

@ -98,9 +98,13 @@ core_module_loaded () {
load_module () {
if ! core_module_loaded; then
find_core_module || die "can't find core module"
echo "loading core module: $COREMOD"
/usr/sbin/insmod "$COREMOD" || die "failed to load core module"
if modprobe -q kpatch; then
echo "loaded core module"
else
find_core_module || die "can't find core module"
echo "loading core module: $COREMOD"
/usr/sbin/insmod "$COREMOD" || die "failed to load core module"
fi
fi
echo "loading patch module: $1"
/usr/sbin/insmod "$1" "$2"