Skip to content

Commit

Permalink
This patch splits the "clean" script into two parts -- one for lifene…
Browse files Browse the repository at this point in the history
…t-core, and the other for lifenet applications.

This is done for maintaining consistency with the start and stop scripts.
Updated the README to indicate this change.

--
ashwin@thelifenetwork.org
  • Loading branch information
ashwin committed Mar 23, 2012
1 parent c76a7ea commit 7aafe35
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 127 deletions.
41 changes: 24 additions & 17 deletions README
Expand Up @@ -23,34 +23,41 @@ Last updated - 27 Jun 2011
1. Description of code 1. Description of code
---------------------- ----------------------


LifeNet --> applications/ - this directory contains 7 applications (Sniffer, Injector, Network visualization, Communicator, File Transfer, ArpUpdater, PathTraceLogger) LifeNet --> applications/ - this directory contains 7 applications (Sniffer, Injector, Network visualization, Communicator, File Transfer, ArpUpdater, PathTraceLogger)
--> config/ - this directory contains configuration information that is generated during installation --> config/ - this directory contains configuration information that is generated during installation
--> firewall/ - this directory contains iptables scripts for automated gateway configuration --> firewall/ - this directory contains iptables scripts for automated gateway configuration
--> src/ - this directory contains the code for LifeNet Kernel Module --> src/ - this directory contains the code for LifeNet Kernel Module
--> scripts/ - this directory contains executable scripts that are used to start and stop LifeNet and its applications --> scripts/ - this directory contains executable scripts that are used to start and stop LifeNet and its applications
--> openwrt/ - this directory contains the source and configuration files required for compilation on and installation on OpenWRT platform --> openwrt/ - this directory contains the source and configuration files required for compilation on and installation on OpenWRT platform
--> configure - this executable script is used for configuring LifeNet before compilation and installation --> configure
--> compile - this executable script is used for configuring LifeNet before compilation and installation
- this executable script is used for compiling LifeNet after configuration and before installation --> compile
--> compile_optional_apps - this executable script is used for compiling LifeNet after configuration and before installation
- this optional executable script is used for compiling additional LifeNet applications --> compile_optional_apps
--> install - this optional executable script is used for compiling additional LifeNet applications
- this executable script is used to install LifeNet after configuration and compilation --> install
--> install_optional_apps - this executable script is used to install LifeNet after configuration and compilation
- this optional executable script is used to install additional LifeNet applications --> install_optional_apps

- this optional executable script is used to install additional LifeNet applications
--> clean
- This script clears the build artifacts of the core Lifenet code
--> clean_additional_apps
- This script clears the build artifacts of the additional Lifenet applications' code
---------------- ----------------
2. Compatibility 2. Compatibility
---------------- ----------------


LifeNet supports and has been fully tested on the following operating systems: LifeNet supports and has been fully tested on the following operating systems:


- Ubuntu Linux distributions including and after 8.04 - Ubuntu Linux distributions including and after 8.04
*NOTE: We have not tested Lifenet on latest Ubuntu versions running a 3.0+ kernel.

- Kubuntu Linux distributions including and after 8.04 - Kubuntu Linux distributions including and after 8.04
*NOTE: We have not tested Lifenet on latest Kubuntu versions running a 3.0+ kernel.


LifeNet can also work on other Linux distributions. However, the developers haven't yet fully tested LifeNet onto Linux distros other than those mentioned above. Please feel free to try it out on other Linux distributions that you may have and email your feedback to any of the following with 'LifeNet feedback' as your email subject: LifeNet can also work on other Linux distributions. However, the developers haven't yet fully tested LifeNet onto Linux distros other than those mentioned above. Please feel free to try it out on other Linux distributions that you may have and email your feedback to any of the following with 'LifeNet feedback' as your email subject:
- hrushi@gatech.edu - hrushi@gatech.edu
- ashwin1985@gmail.com - ashwin.p@gatech.edu
- vempala@cc.gatech.edu - vempala@cc.gatech.edu


--------------------- ---------------------
Expand Down
131 changes: 21 additions & 110 deletions clean
Expand Up @@ -63,124 +63,35 @@ export MYMANET_ALPHA
export MYMANET_BETA export MYMANET_BETA
export MYMANET_STORE_PATH export MYMANET_STORE_PATH


#HAS_KERNEL_SUPPORT=`uname -r | grep -i "2.6.3" | wc -l`
#if [ "$HAS_KERNEL_SUPPORT" -eq "1" ]; then

# echo "do nothing"
# MYMANET_KERNEL_VERSION_6_30_PLUS=1
# export MYMANET_KERNEL_VERSION_6_30_PLUS
#exit

#else
# MYMANET_KERNEL_VERSION_6_30_PLUS=0
# export MYMANET_KERNEL_VERSION_6_30_PLUS

#fi


#echo "Kernel 6.3 plus? = $MYMANET_KERNEL_VERSION_6_30_PLUS"


#echo -e "Completed\n"

rm -rf ./*~ rm -rf ./*~


rm -rf ./config/* rm -rf ./config/*


cd src cd src
if [ $? == 0 ]; then
make clean
cd ..
fi


#echo -e "\nCompiling LifeNet kernel module...\n" if [ "$MYMANET_STORE_PATH" -eq "1" ]; then

#sleep 2

make clean
#kern_version=`uname -r`
#echo "Your kernel version is : $kern_version"
#v1=$(echo $kern_version | sed -e 's![^0-9]\+! & !g' -e 's![\.\-]!!g')
#echo $v1
#set -- $v1; v1comp=$2; v2comp=$3; shift; v1=$*


#if [ $v1comp -lt "6" -o $v1comp -eq "6" -a $v2comp -lt "24" ]; then
# echo "Seems like you are having an older kernel - version (2.$v1comp.$v2comp). Setting compilation flag to NEW_KERNEL=0"
# NEW_KERNEL_TRUE=0
#else
# echo "Seems like you are having a new kernel - version (2.$v1comp.$v2comp). Setting compilation flag to NEW_KERNEL=1"
# NEW_KERNEL_TRUE=1
#fi

#make NEW_KERNEL=$NEW_KERNEL_TRUE MYMANET_ALPHA=$MYMANET_ALPHA MYMANET_BETA=$MYMANET_BETA MYMANET_KERNEL_VERSION_6_30_PLUS=$MYMANET_KERNEL_VERSION_6_30_PLUS MYMANET_STORE_PATH=$MYMANET_STORE_PATH

cd ..

#echo -e "\nCompilation successful!!"

#echo -e "\nCompiling Applications...\n"

#if [ "$MYMANET_STORE_PATH" -eq "1" ]; then

cd applications/PathTraceLogger cd applications/PathTraceLogger
make clean if [ $? == 0 ]; then
rm -rf dist/ build/ make clean
#make rm -rf dist/ build/
cd ./../../ cd ./../../

fi
#fi fi

#cd applications/LifeNet
#make clean
#rm -rf dist/ build/
#make
#cd ./../../

cd applications/CommandListener
make clean
rm -rf dist/ build
#ant jar
cd ./../../

cd applications/LifeNetSMS
ant clean
#ant jar
cd ./../../

cd applications/DisplayGnst
make clean
rm -rf dist/ build/
#make
cd ./../../

cd applications/ArpUpdater
make clean
rm -rf dist/ build/
#make
cd ./../../


cd applications/Inject cd applications/Inject
make clean if [ $? == 0 ]; then
rm -rf dist/ build/ make clean
#make rm -rf dist/ build/
cd ./../../ cd ./../../
fi


cd applications/Sniff cd applications/Sniff
make clean if [ $? == 0 ]; then
rm -rf dist/ build/ make clean
#make rm -rf dist/ build/
cd ../../ cd ../../

fi
cd applications/LifeNetFTP
ant clean
#ant jar
cd ../../

cd applications/MyMANET-chat
ant clean
#ant jar
cd ../../

cd applications/NetVisualize
ant clean
#ant jar
cd ../../

#echo -e "\nIf no errors are seen, please run installation script -> sudo ./install\n\n"
49 changes: 49 additions & 0 deletions clean_additional_apps
@@ -0,0 +1,49 @@
#!/bin/bash
clear


cd applications/CommandListener
if [ $? == 0 ]; then
make clean
rm -rf dist/ build
cd ./../../
fi

cd applications/LifeNetSMS
if [ $? == 0 ]; then
ant clean
cd ./../../
fi

cd applications/DisplayGnst
if [ $? == 0 ]; then
make clean
rm -rf dist/ build/
cd ./../../
fi

cd applications/ArpUpdater
if [ $? == 0 ]; then
make clean
rm -rf dist/ build/
cd ./../../
fi

cd applications/LifeNetFTP
if [ $? == 0 ]; then
ant clean
cd ../../
fi

cd applications/MyMANET-chat
if [ $? == 0 ]; then
ant clean
cd ../../
fi

cd applications/NetVisualize
if [ $? == 0 ]; then
ant clean
cd ../../
fi

0 comments on commit 7aafe35

Please sign in to comment.