[FIX] correct handling of do_munmap()
[kernel/swap-modules.git] / driver / swap_driver_new.sh
1 #!/bin/sh
2
3 MODULE_NAME=swap_driver_new
4
5 # Check for running module in /proc/modules
6 RUNNING=`sed "/${MODULE_NAME}/ ! d" /proc/modules`
7
8 if [ "${RUNNING}" = "" ]; then
9     ./bin/insmod.sh ${MODULE_NAME}.ko
10     if [ $? -ne 0 ]; then
11             echo "Error: unable to load ${MODULE_NAME} module!"
12             exit 1
13     fi
14 else
15         echo "${MODULE_NAME} module is already running!"
16         exit 1
17 fi