On 9/9/10 8:00 PM, Wunden Tobias wrote:
Hi Richard,

thanks for that quick and generally helpful answer, this was exactly what I was 
looking for! However, implementing your idea, I ran into various issues, all of 
them being related to the start-stop-daemon being picky about the correct 
quoting.

I first tried to add what you had suggested to my other RUN_OPTS, but then the java vm 
would not be created and complained about an unknown option "-c". After trying 
every possible way of quoting the arguments to -Dgosh.args, and finding that others on 
the web had dealt with that problem as well withouth success, I ended up doing this:

--exec "${RUN_CMD}" -- -Dgosh.args="--noshutdown -c noop=true" ${RUN_OPTS}

which is not nice but is working. Just sending this out so that others can save 
the hour of investigative work that I just spent :-)

Maybe there is another way of passing in arguments to the shell at startup time?

You can add system properties to the conf/system.properties file...any properties in this file will be set as system properties. In the future, you should be able to add them to conf/config.properties, but currently there is a bug/limitation in Gogo and it only looks in system properties for its configuration properties.

At least it might be worthwhile considering *one* option that will tell Felix 
and the rest of the gang to work in non-interactive mode rather than trying to 
trick the gogo shell into it. But I will frankly admit that I don't fully 
understand the architectural decisions made around the shell, so please forgive 
me if I am asking for obvious nonsense.

The Felix framework knows nothing about the shell. This is a Gogo issue. The framework just loads the bundles you tell it to.

Still, the Gogo shell has to either come up interactive or not...we have to choose one. Either way, you'll need to set a property to get the opposite of the default behavior.

And just because some daemon system is picky about parsing doesn't necessarily mean we are to blame. :-)

-> richard

Again, thanks for your help!

Tobias

On 09.09.2010, at 15:51, Richard S. Hall wrote:

It seems like the Gogo interactive shell is causing you difficulties. When the 
Gogo shell starts up, it expects to either 1) start an interactive session or 
2) execute a command. You can avoid (1) by doing (2) and telling it to not 
shutdown the framework, something like this:

    java -Dgosh.args='--noshutdown -c noop=true' -jar bin/felix.jar

Then if you also install the newly released Remote Shell bundle, you can telnet 
into the running framework. In fact, Gogo has a built-in telnet command, so I 
think you could just directly start it like this without the Remote Shell 
bundle:

    java -Dgosh.args='-sc telnetd -p1234 start' -jar bin/felix.jar

Either approach will start Gogo without an interactive session and the ability 
to telnet into it.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to