3 if [ -f /etc/planetlab/plc_config ]; then
4 source /etc/planetlab/plc_config
8 LOGFILE=/home/${PLC_SLICE_PREFIX}_myops/myops.log
10 cd /home/${PLC_SLICE_PREFIX}_myops
12 # TODO: add a timeout to eval, that kills children after X seconds
13 function write_key_command ()
18 write_key_value "$key" "$value"
20 function write_key_value ()
26 echo $key : $value >> $LOGFILE
33 while read key colon command ; do
34 if [[ $colon = ":" ]] ; then
35 write_key_command "$key" "$command" &
36 count=$(( $count + 1 ))
38 if [[ $colon = ":=" ]] ; then
39 eval $key=`eval $command`
40 else if [[ $colon = "()" ]] ; then
41 eval "function $key () $command"
45 done < <( curl --silent http://IPADDR/PlanetLabConf/input.cfg )
47 write_key_value "count" "$count"