Mailing List Archive

Varying the initcmd for a console
Hi,

Is it possible to override the initcmd specified for a console
in the conserver.cf file, so that varying scripts can be run as
required when the console is opened without having to force a
re-read of the whole conserver.cf config file ?

Thanks

Andy Pearce



_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: Varying the initcmd for a console [ In reply to ]
On Fri, Oct 16, 2009 at 09:19:11AM +0200, Pearce Andy wrote:
> Is it possible to override the initcmd specified for a console
> in the conserver.cf file, so that varying scripts can be run as
> required when the console is opened without having to force a
> re-read of the whole conserver.cf config file ?

What do you mean? Varying in time?

I run a little script from my conserver.cf to open IPMI consoles; it
reads usernames/passwords from a file and launches ipmitool.

Andras
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
RE: Varying the initcmd for a console [ In reply to ]
Hi Andras,

As I understand it the conserver is started with a configuration file
conserver.cf that defines a set of consoles for various machines, output
from these machines is then logged. The conserver.cf that is read when
conserver starts can also specified a script that is to be run when the
console command is used to connect to the machine via the initcmd
option.

What I would like to do is to be able to specify, in some way,the script

that is executed when I make the console command, i.e. something like

console ... "determine-free-disk-space.sh"

[above syntax obviously rubbish, but that's the idea ]

I was wondering if the initcmd could be changed via the per-user-config
file that can be specified, but didn't appear so.

Andy

> -----Original Message-----
> From: users-bounces@conserver.com
> [mailto:users-bounces@conserver.com] On Behalf Of
> Andras.Horvath@cern.ch
> Sent: Friday, October 16, 2009 9:43 AM
> To: users@conserver.com
> Subject: Re: Varying the initcmd for a console
>
>
> On Fri, Oct 16, 2009 at 09:19:11AM +0200, Pearce Andy wrote:
> > Is it possible to override the initcmd specified for a
> console in the
> > conserver.cf file, so that varying scripts can be run as
> required when
> > the console is opened without having to force a re-read of
> the whole
> > conserver.cf config file ?
>
> What do you mean? Varying in time?
>
> I run a little script from my conserver.cf to open IPMI
> consoles; it reads usernames/passwords from a file and
> launches ipmitool.
>
> Andras
> _______________________________________________
> users mailing list
> users@conserver.com https://www.conserver.com/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: Varying the initcmd for a console [ In reply to ]
On Fri, Oct 16, 2009 at 10:03:10AM +0200, Pearce Andy wrote:
>
> As I understand it the conserver is started with a configuration file
> conserver.cf that defines a set of consoles for various machines, output
> from these machines is then logged. The conserver.cf that is read when
> conserver starts can also specified a script that is to be run when the
> console command is used to connect to the machine via the initcmd
> option.

ahh, sorry, misunderstood your question (I'm aware of that feature but I
do not use it.)

> I was wondering if the initcmd could be changed via the per-user-config
> file that can be specified, but didn't appear so.

Interesting. I don't know a direct solution.

As a workaround, I'd script around 'console' with 'expect' :) to provide
different functionality as user-accessible scripts.

Andras
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: Varying the initcmd for a console [ In reply to ]
Andras.Horvath@cern.ch wrote:

> As a workaround, I'd script around 'console' with 'expect' :) to provide
> different functionality as user-accessible scripts.

That's where I'd start. OTOH, I don't remember if 'console' emits sensible
error/exit status. (Don't have an installation I can check at the moment.)

z!
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users