Updated all source globalconfig with file-check operation
authorGeorge Milescu <george.milescu@gmail.com>
Fri, 6 Aug 2010 16:30:00 +0000 (18:30 +0200)
committerGeorge Milescu <george.milescu@gmail.com>
Fri, 6 Aug 2010 16:30:00 +0000 (18:30 +0200)
Signed-off-by: George Milescu <george.milescu@gmail.com>
23 files changed:
ControlScripts/clients/hrk/start_hrk_leecher.sh
ControlScripts/clients/hrk/start_hrk_seeder.sh
ControlScripts/clients/tribler/start_tribler_doe.sh
ControlScripts/clients/tribler/start_tribler_gui.sh
ControlScripts/clients/tribler/start_tribler_leecher.sh
ControlScripts/clients/tribler/start_tribler_proxy.sh
ControlScripts/clients/tribler/start_tribler_seeder.sh
ControlScripts/detect_complete_client.sh
ControlScripts/parse_client_log.sh
ControlScripts/run_campaign.sh
ControlScripts/run_scenario.sh
ControlScripts/schedule_client.sh
ControlScripts/start_tracker.sh
ControlScripts/stop_client.sh
Utils/grep_search.sh
Utils/show_version.sh
Utils/sync_cluster.sh
Utils/sync_cluster_containers.sh
Utils/sync_kth.sh
Utils/sync_single_cluster_container.sh
Utils/sync_single_cluster_container_scripts.sh
Utils/sync_swarm.cs.pub.ro.sh
Utils/sync_vm.sh

index 221bad0..a891afb 100755 (executable)
@@ -9,8 +9,13 @@
 #    libtorrent-rasterbar location
 #  * at the end deletes the downloaded data
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../../../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+else
+       source ../../../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file (TORRENT_FILE)
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index 5e1e3b9..f36e0a2 100755 (executable)
@@ -9,8 +9,13 @@
 #    libtorrent-rasterbar location
 #  * at the end deletes the downloaded data
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../../../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+else
+       source ../../../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file (TORRENT_FILE)
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index bcb3711..51ab1d5 100755 (executable)
@@ -8,8 +8,13 @@
 #  * starts a tribler cmd-line instance with the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder
 #  * at the end deletes the downloaded data
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../../../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+else
+       source ../../../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file (TORRENT_FILE)
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index d2b1b6f..eb06688 100755 (executable)
@@ -7,8 +7,13 @@
 #  * changes current working directory to proxymode
 #  * starts a GUI tribler instance
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../../../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+else
+       source ../../../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index 3581e53..c0cee87 100755 (executable)
@@ -8,8 +8,13 @@
 #  * starts a tribler cmd-line instance with the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder
 #  * at the end deletes the downloaded data
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../../../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+else
+       source ../../../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file (TORRENT_FILE)
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index af475d4..301510e 100755 (executable)
@@ -16,8 +16,13 @@ if [ ! $# -eq 1 ]; then
        exit 1
 fi
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../../../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+else
+       source ../../../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index c885f13..b8e5f3f 100755 (executable)
@@ -7,8 +7,13 @@
 #  * changes current working directory to proxyservice-m32
 #  * starts a command line BT client seeding the supplied .torrent file. The .torrent file must be located in the TorrentsAndData folder
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../../../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../../../ConfigFiles/globalconfig does not exist."
+else
+       source ../../../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file (TORRENT_FILE)
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index 64ce19f..294200b 100755 (executable)
@@ -16,8 +16,13 @@ if test $# -ne 1; then
        exit 1
 fi
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file (CLIENT_TYPE)
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index dbad40e..228b2ce 100755 (executable)
@@ -16,8 +16,13 @@ if test $# -ne 3; then
        exit 1
 fi
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 # Read client mappings configuration file
 source ../ConfigFiles/client_script_mappings
index 5fa25e6..676e9ed 100755 (executable)
@@ -17,8 +17,13 @@ if [ ! $# -eq 1 ]; then
        exit 1
 fi
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 # Read arguments
 CAMPAIGN_FILE=$1
index ba18cd3..6bbb014 100755 (executable)
@@ -37,8 +37,13 @@ if [ ! $# -eq 3 ]; then
        exit 1
 fi
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 # Read arguments
 ACTION=$1
index ac23869..59ac82a 100755 (executable)
 # use _DEBUG="off" to turn off debug printing
 _DEBUG="on"
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index 65dc392..2f2173a 100755 (executable)
@@ -7,8 +7,13 @@
 #  * changes current working directory to BitTornado-CVS
 #  * starts a tracker listening on port 6969
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index 733aeb8..eab657e 100755 (executable)
 # use _DEBUG="off" to turn off debug printing
 _DEBUG="on"
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 # Read scenarion configuration file (CLIENT_TYPE)
 source ../ClientWorkingFolders/TmpLogs/scenario_config
index fb497ef..333bc71 100755 (executable)
 # ./grep_search.sh "text"
 
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 cd $TRIBLER_REL_PATH
 
index cbb8eac..2769d05 100755 (executable)
@@ -7,8 +7,13 @@
 #  * changes current working directory to proxyservice-m32
 #  * starts a tribler cmd-line instance to display the current version
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 export PYTHONPATH=$PYTHONPATH:.
 
index dca8da3..3e67e7d 100755 (executable)
@@ -3,8 +3,13 @@
 # Copyright: George Milescu 2010 - george.milescu@gmail.com
 #
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-01.grid.pub.ro:/home/p2p/george/P2P-Next
 rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-03.grid.pub.ro:/home/p2p/george/P2P-Next
index f24d787..ecda9d9 100755 (executable)
@@ -3,8 +3,13 @@
 # Copyright: George Milescu 2010 - george.milescu@gmail.com
 #
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 for host in p2p-next-01.grid.pub.ro p2p-next-03.grid.pub.ro p2p-next-04.grid.pub.ro p2p-next-05.grid.pub.ro p2p-next-06.grid.pub.ro p2p-next-07.grid.pub.ro p2p-next-08.grid.pub.ro p2p-next-09.grid.pub.ro p2p-next-10.grid.pub.ro; do
        for port in 10122 10222 10322 10422 10522 10622 10722 10822 10922 11022; do
index 520883d..eb34a3b 100755 (executable)
@@ -3,7 +3,12 @@
 # Copyright: George Milescu 2010 - george.milescu@gmail.com
 #
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 rsync -avP --del $P2P_NEXT_REL_PATH george@p2p-next.xen.ssvl.kth.se:/home/george/P2P-Next
index 3d9ba40..6197d72 100755 (executable)
@@ -8,8 +8,13 @@ if test $# -ne 2; then
        exit 1
 fi
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 host=$1
 port=$2
index 597775f..c167310 100755 (executable)
@@ -8,8 +8,13 @@ if test $# -ne 2; then
        exit 1
 fi
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 host=$1
 port=$2
index c465d39..698aff7 100755 (executable)
@@ -3,7 +3,12 @@
 # Copyright: George Milescu 2010 - george.milescu@gmail.com
 #
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 rsync -avP --del $P2P_NEXT_REL_PATH george@swarm.cs.pub.ro:/home/george/P2P-Next
index 00c09e3..81d4478 100755 (executable)
@@ -3,8 +3,13 @@
 # Copyright: George Milescu 2010 - george.milescu@gmail.com
 #
 
-# Read the global configuration variables
-source ../ConfigFiles/globalconfig
+# Read the global configuration file
+# Check if the global configuration file exists
+if [ ! -e ../ConfigFiles/globalconfig ]; then
+       echo "Warning: The global config file ../ConfigFiles/globalconfig does not exist."
+else
+       source ../ConfigFiles/globalconfig
+fi
 
 rsync -avP --del $P2P_NEXT_REL_PATH george@tracker.local:/home/george/P2P-Next
 rsync -avP --del $P2P_NEXT_REL_PATH george@coordinator.local:/home/george/P2P-Next