r1580 + fixed the SLB gateway to __really__ work
authorDenis Ovsienko <infrastation@yandex.ru>
Mon, 21 Jan 2008 15:16:48 +0000 (15:16 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 21 Jan 2008 15:16:48 +0000 (15:16 +0000)
gateways/slbconfig/main

index e22904ca6e9ba31115496454dbc0aead5af43015..6aed0dc91bff9c0e1752ae8053278df262f05a9d 100755 (executable)
@@ -14,7 +14,7 @@ user=
 cfgfile=
 CONNECTED=0
 MYDIR=`dirname $0`
-source "$MYDIR/../lib.sh"
+. "$MYDIR/../lib.sh"
 
 do_connect()
 {
@@ -33,6 +33,8 @@ do_connect()
                echo "ERR!User $user is not authorized to connect to $endpoint"
                return
        fi
+       CONNECTED=1
+       echo "OK!connected to $endpoint"
 }
 
 do_activate()
@@ -43,10 +45,16 @@ do_activate()
                return
        fi
        if [ ! -x "$MYDIR/install" ]; then
-               echo "ERR!Missing user-supplied installer script $MYDIR/install"
+               echo "ERR!Missing or not executable user-supplied installer script $MYDIR/install"
                return
        fi
-       "$MYDIR/install $endpoint $hw $sw $user $cfgfile"
+       "$MYDIR/install" $endpoint $hw $sw $user $cfgfile
+       ret=$?
+       if [ $ret = 0 ]; then
+               echo "OK!Configuration has been submitted for activation successfully"
+       else
+               echo "ERR!Configuration installer returned code $ret"
+       fi
 }
 
 # main loop