Merge branch 'dev' into kernel
[kernel/swap-modules.git] / kprobe / swap_kprobe.sh
1 #!/bin/sh
2
3 SWAP_KPROBE=swap_kprobe
4
5 # Check for running module in /proc/modules
6 RUNNING=`sed "/${SWAP_KPROBE}/ ! d" /proc/modules`
7
8 if [ "${RUNNING}" = "" ]; then
9     ./bin/insmod.sh ${SWAP_KPROBE}.ko
10     if [ $? -ne 0 ]; then
11             echo "Error: unable to load SWAP KProbe!"
12             exit 1
13     fi
14 else
15         echo "SWAP Kprobe is already running!"
16         exit 1
17 fi