[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Sending a string

kenneth.gullberg kenneth.gullberg@foreningssparbanken.se
Wed, 26 Jan 2005 07:11:01 -0800 (PST)


Is there any way to have conserver send a string rather than a command
when initializing? 

Im trying to get conserver to select a certain domain:

bash-2.05$ telnet xxx-ssc
Trying 192.168.0.86...
Connected to xxx-ssc.
Escape character is '^]'.


System Controller 'xxx-ssc0':

    Type  0  for Platform Shell

    Type  1  for domain A console
    Type  2  for domain B console
    Type  3  for domain C console
    Type  4  for domain D console

    Input: 4<enter>

Connected to Domain D

Domain Shell for Domain D

and from here do ordinary conserver functionality.

I saw this in the manual:

---------------------------------
initcmd command|""

Invoke command as soon as the console is brought up, redirecting the
console to stdin, stdout, and stderr of command. The command is passed
as an argument to ''/bin/sh -ce''. If the null string (''""'') is used,
the command is unset and nothing is invoked.

aswell as:

exec command|""

Assign the string command as the command to access the console.
Conserver will run the command by invoking ''/bin/sh -ce "command"''. If
the null string (''""'') is used or no exec keyword is specified,
conserver will use the command ''/bin/sh -i''. Only consoles of type
''exec'' will use this value.
---------------------------------

I guess I could write an expect script using initcmd to accomplish this,
do you have any other suggestions?

Best Regards
Kenneth Gullberg