From: Andreas U. <unt...@ma...> - 2005-07-05 14:54:12
|
Hello, I want to execute the shell command "echo `hostname -f` > /tmp/foo.txt" with the new shellscript component. Executing this command with os.runshell works, but with the schellscript components I'm running into trouble. The below descripton does not work, in fact I get a file "/tmp/foo.txt],". with the content MARK - done HOST oplabox03.cern.ch:rootProcess:test:shell [[echo oplabox03.cern.ch 2005/07/05 16:40:12:163 CEST] Exit code#: 0 BTW, I have to define my own bash shell as the BashExec component defined in org/smartfrog/services/shellscript/components.sf has "/etc/bash" as cmd. This is not available on my machine; I think it would be better to define cmd as "/bin/bash" which should be available on standard Linux machines. Here's the component description. Do you know why it does not work ? #include "org/smartfrog/services/shellscript/components.sf" localShellExec extends ShellExec { cmd ["/bin/bash"]; echoErrorCmd "$?"; } localShell extends Shell { exec extends localShellExec; } sfConfig extends Compound { shell extends localShell; doScript extends Script { shell LAZY ATTRIB shell; startScript ["echo `hostname -f` > /tmp/foo.txt"]; autoTerminate true; } } Thank you very much for your help. Best regards, Andreas |