Re: Telnet from Linux to SCO OpenServer 5.0.6
From: Brian K. White (brian_at_aljex.com)
Date: 04/30/03
- Next message: Brian K. White: "Re: Telnet from Linux to SCO OpenServer 5.0.6"
- Previous message: Ran Hooper: "Re: Intel SHG2 Server Board and SCO 5.0.7 or 5.0.6"
- In reply to: Ian Wilson: "Re: Telnet from Linux to SCO OpenServer 5.0.6"
- Next in thread: pierreforget: "Re: Telnet from Linux to SCO OpenServer 5.0.6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 30 Apr 2003 00:04:40 -0400
"Ian Wilson" <scobloke2@infotop.co.uk> wrote in message
news:b8le3m$l35$1@titan.btinternet.com...
> pierreforget wrote:
>
> <stuff about mapchan removed>
>
> >
> > Now, if I want to keep this permanent only for this Linux station, how
> > can I do this? All the stations or terminals get on with the same
login,
> > so if I modify the login, they other ones will be screwed up, if I
> > understand right.
>
> What are the values of the TERM variable? When I login at a Linux
> console and telnet to a SCO OSR505 box then I get TERM=linux (which
> OSR505 complains about since I haven't imported a terminfo entry)
>
> You can use TERM in an if statement in the .login or .profile (depending
> on login shell) to conditionally execute the appropriate commands.
>
> > All these machines or terminals have a fixed IP address. Will the same
> > machine always logon to the same ttyp?
>
> No, ttyp numbers are allocated on a first come first served basis. You
> may be able to find the client IP-address. Many Unixes (but not OSR505)
> show your client hostname/IP-address in the who command (e.g. who -u on
> Linux). Probably theres some way on OSR505 to take the PID from who -u
> and use another command to link that to an IP-address. A bit of shell
> scripting will do the trick I expect.
who -umx
better yet:
------snip------
#!/bin/ksh
#
# tellip - "Tell IP"
# prints the IP or Hostname that the user is connecting from.
# mostly used in other scripts to determine non-static addresses.
#
# can be run on SCO, Linux, FreeBSD
#
# Brian K White - brian@aljex.com - Aljex Software
# facetwin screws up "who" so try to use facetwin variable instead.
[ -n "${FACETWINIPADDR}" ] && { echo "${FACETWINIPADDR}" ; exit ; }
# "who" tries to show hostname but chops long names, try to use ssh
variable.
[ -n "${SSH_CLIENT}" ] && { echo "${SSH_CLIENT}" |awk '{print $1}' ; exit
; }
case `uname -s` in
Linux) who -m |cut -d\( -f2 |cut -d\) -f1 ;;
FreeBSD) who |cut -d\( -f2 |cut -d\) -f1 ;;
SCO_SV) who -umx | awk '{ print $6 }' ;;
esac
------snip------
>
> > Unless I create another login specifically for this Linux machine?
Which
> > would include the reference to the right mapchan?
>
> If all else fails. Checking the TERM variable looks the best way to me.
>
> --
> Ian Wilson.
>
- Next message: Brian K. White: "Re: Telnet from Linux to SCO OpenServer 5.0.6"
- Previous message: Ran Hooper: "Re: Intel SHG2 Server Board and SCO 5.0.7 or 5.0.6"
- In reply to: Ian Wilson: "Re: Telnet from Linux to SCO OpenServer 5.0.6"
- Next in thread: pierreforget: "Re: Telnet from Linux to SCO OpenServer 5.0.6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|