VOL-2854: Add command line option to specify interface name in openolt on which gRPC server will run
          - OLT management interface or inband interface can be given as command line input and gRPC
            server will listen on given interface's IP address
          - If no interface name given gRPC server will listen on "0.0.0.0:9191"

Change-Id: I506fabf7ae81bf4d4ed8f6199107801daff62941
diff --git a/agent/scripts/init.d/openolt b/agent/scripts/init.d/openolt
index 585109d..ef80b24 100755
--- a/agent/scripts/init.d/openolt
+++ b/agent/scripts/init.d/openolt
@@ -19,6 +19,12 @@
 USER="root"
 GROUP="root"
 
+# If OLT is used in inband mode, inband interface name will be copied
+# to /etc/default/openolt file. Here inband interface is passed as argument
+# while running openolt service
+[ -r /etc/default/openolt ] && . /etc/default/openolt
+[ -z "gRPC_interface" ] || APPARGS="--interface $gRPC_interface"
+
 # Include functions 
 set -e
 . /lib/lsb/init-functions