mirror of
https://github.com/dynup/kpatch
synced 2025-04-17 12:35:21 +00:00
kpatch: make kpatch load & unload work on more distros with less code ;-D
This commit is contained in:
parent
24fba4f773
commit
0098bd0036
@ -98,11 +98,11 @@ load_module () {
|
|||||||
else
|
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"
|
insmod "$COREMOD" || die "failed to load core module"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "loading patch module: $1"
|
echo "loading patch module: $1"
|
||||||
/usr/sbin/insmod "$1" "$2"
|
insmod "$1" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
unload_module () {
|
unload_module () {
|
||||||
@ -120,7 +120,7 @@ unload_module () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "unloading patch module: $PATCH"
|
echo "unloading patch module: $PATCH"
|
||||||
/usr/sbin/rmmod "$(basename $1)"
|
rmmod "$(basename $1)"
|
||||||
}
|
}
|
||||||
|
|
||||||
unload_disabled_modules() {
|
unload_disabled_modules() {
|
||||||
|
Loading…
Reference in New Issue
Block a user