[REFACTOR] remove unnecessary functions declaration
[kernel/swap-modules.git] / uprobe / swap_uprobe.sh
1 #!/bin/sh
2
3 SWAP_UPROBE=swap_uprobe
4
5 # Check for running module in /proc/modules
6 RUNNING=`sed "/${SWAP_UPROBE}/ ! d" /proc/modules`
7
8 if [ "${RUNNING}" = "" ]; then
9     ./bin/insmod.sh ${SWAP_UPROBE}.ko
10     if [ $? -ne 0 ]; then
11             echo "Error: unable to load SWAP UProbe!"
12             exit 1
13     fi
14 else
15         echo "SWAP Uprobe is already running!"
16         exit 1
17 fi