mirror of
https://github.com/dynup/kpatch
synced 2024-12-11 07:54:36 +00:00
Merge pull request #179 from jpoimboe/modprobe-core-module
kpatch: try to modprobe core module
This commit is contained in:
commit
c34f4c23e0
@ -98,10 +98,14 @@ core_module_loaded () {
|
|||||||
|
|
||||||
load_module () {
|
load_module () {
|
||||||
if ! core_module_loaded; then
|
if ! core_module_loaded; then
|
||||||
|
if modprobe -q kpatch; then
|
||||||
|
echo "loaded core module"
|
||||||
|
else
|
||||||
find_core_module || die "can't find core module"
|
find_core_module || die "can't find core module"
|
||||||
echo "loading core module: $COREMOD"
|
echo "loading core module: $COREMOD"
|
||||||
/usr/sbin/insmod "$COREMOD" || die "failed to load core module"
|
/usr/sbin/insmod "$COREMOD" || die "failed to load core module"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
echo "loading patch module: $1"
|
echo "loading patch module: $1"
|
||||||
/usr/sbin/insmod "$1" "$2"
|
/usr/sbin/insmod "$1" "$2"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user