[ILUG] Running command after login.
Dave Neary
dave.neary at palamon.ie
Thu Sep 27 14:28:44 IST 2001
Aherne Peter-pahern02 wrote:
>
> Ok, try to reply to both Niall and Dave in this one.
>
> Dave first.
>
> Exactely what I want to do:
>
> Write a script, first thing the script does is check what machine they are
> on, if they are on the right one do something, if not ask them to choose
> from a list of servers, they choose, they get logged onto that machine, now
> I want to run the same script again automagically, this time they will be on
> the right machine so it will pass the server choice thing and work away.
>
> So thats what I want to do in case that gives people any more ideas.
How about the following idea (and this is a rough, off the top of my
head type solution - there's probably heavy lifting left to do here) -
set the script as the .cshrc, and then do this in the .cshrc:
if(We're not on the right server)
serverSelect()
else
doStuff()
serverSelect()
{
# do the menu stuff, get your answer, and then...
rcp .cshrc username at servername:~/.cshrc
rlogin -l username servername
# Maybe it's cheating a bit...
}
Dave.
--
David Neary, E-Mail dave.neary at palamon.ie
Palamon Technologies Ltd. Phone +353-1-634-5059
More information about the ILUG
mailing list