Re: Login Message

Mike Gogulski (syadasti@seminole.iag.net)
Fri, 10 Nov 1995 11:02:31 -0500 (EST)

Thomas W. Holt Jr. wrote:
>
> Just was sitting here wondering if there were any or if I could suggest,
> variables in the Login Message. It would be really handy to have %P be
> the current port number and maybe %N be the terminal server's name....see
> currently our login message is the same on all the ports on all our
> terminal servers...like this..
> -snip-
> Hollicom Internet Services
> Network Port: kok-ts0-s0
> -snip-
>
> kok-ts0 is the Terminal Servers name and s0 the port.....I searched all
> the docs I could find yesterday to see if I could do something like
>
> Network Port: %N-%P
>
> I figured it would have already been in the ComOS, but apparently it's
> not. Any thoughts?

I use a perl script to construct an expect script when I want to configure
port prompts:

#!/opt/bin/perl

$password = "PASSWD";
$pm = "pm.iag.net";
$pm_port = "8888";

print "#!/opt/bin/expect\n";
print "spawn telnet $pm $pm_port\n";
print "expect ogin:\n";
print "send !root\\r\n";
print "expect word:\n";
print "send $password\\r\n";
$i=0;
while ($i < 30) {
print "expect \">\"\n";
printf("send \"set s%d prompt (pm1-s%d) login: \\r\"\n", $i, $i);
$i++;
}

This spits the expect script out to the standard output, which I then
dump into a file and execute.

I suppose if I learned expect fully, this could be a single program.

Peace,
Mike

-- 
Mike Gogulski                   syadasti@iag.net
Network Administrator  		syadasti@cat.net
Internet Access Group           Altamonte Springs, Florida, USA
+1-407-786-1145 Work            +1-407-672-2340 Other