X-Git-Url: http://git.onelab.eu/?p=planetlab-umts-tools.git;a=blobdiff_plain;f=umtsd;h=4fbf77363d63e86a40ccedbf7aeb2694d5d91822;hp=8d1dae1e35f698d5525d9ef955ae2b8cd117b0d5;hb=b518901e4533042ccf9ac2aa12e05582d5629ad4;hpb=8799677d58c4b97cad5ae5b31e3bb3716f366b44 diff --git a/umtsd b/umtsd index 8d1dae1..4fbf773 100755 --- a/umtsd +++ b/umtsd @@ -21,17 +21,9 @@ command=`echo ${line%% *}` rest=`echo ${line#* }` case "$command" in - #init) - #logger "Initialitation of the UMTS inteface requested by $sliver" - #init_umts $sliver; - # - #if [[ $? != 0 ]] ; then - # echo "Failed" - #fi - #;; - start) logger "Starting the umts connection for $sliver" + start_umts $sliver; if [[ $? != 0 ]] ; then @@ -52,11 +44,15 @@ case "$command" in add) logger "Request to add a destination by $sliver for the UMTS connection"; + if ! check_sliceip; then + exit 1 + fi + if ! valid_dotted_quad "$rest"; then echo "Failed" else add_destination "$rest" $sliver; - if [[ $? != 0 ]] ; then + if [[ $? == 0 ]] ; then echo "OK" else echo "Failed" @@ -68,6 +64,10 @@ case "$command" in del) logger "Request to del a destination by $sliver for the UMTS connection"; + if ! check_sliceip; then + exit 1 + fi + if ! valid_dotted_quad "$rest"; then echo "Failed" else @@ -97,7 +97,7 @@ case "$command" in esac -#sleep 1 +sleep 1 echo "EOF"