Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

I was able to accomplish the goal, non-interactively sending plugin-built statements (like dropAllPacketsRpc on) to the OSGi console, via a different mechanism.

Giving the -start or -start [port_num] flag to makes OSGi listen for connections to the shell via telnet (defaults to port 2400), instead of dropping the user into a shell. You can then echo arbitrary commands to a telnet session:

    # Give dropAllPackets command via telnet to OSGi
    # This is a bit of a hack, but it's the only method I know of
    # See:
    if ! command -v telnet &>/dev/null; then
        sudo yum install -y telnet
    echo "dropAllPacketsRpc on" | telnet $OSGI_PORT