Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!wyse!bob From: bob@wyse.wyse.com (Bob McGowen x4312 dept208) Newsgroups: comp.unix.questions Subject: Re: Can a script check if my line is dialup? Message-ID: <2776@wyse.wyse.com> Date: 29 Jun 90 15:31:44 GMT References: <1990Jun29.050949.8906@midway.uchicago.edu> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen x4312 dept208) Organization: Wyse Technology Lines: 35 In article <1990Jun29.050949.8906@midway.uchicago.edu> phd_ivo@gsbacd.uchicago.edu writes: >I would like a script to execute a number of alias-es and execute >tset only if I dialup, but not when I login in from my beautiful ------------ Actually, you would want tset to run in all cases. You just need to set it so it recognizes the lines that you have. tset uses the /etc/ttytype file as a database mapping terminal types to tty lines. tset also lets you modify just what it does with this information by using the -m option on its command line. You should log in from the console and type tty to get the name the system uses for login on the console (probably /dev/console but we need to be sure). Then grep for that name in /etc/ttytype. This will tell you the name to use in the tset command line. Assuming that this name were something like Next, you would add the following to the existing tset in your .login (.cshrc, whichever): -m Next:Next You would repeat this for the dialup line or other hardwire lines that you might use. The result should look like: eval `tset -m Next:Next -m dialup:vt100 .......` When you use the console, you will get the Next console termcap entry, when you dial in by modem, you will a vt100 entry, and so on. Check the man page for tset for other things to do with tset. I hope this clears up the problem. Bob McGowan (standard disclaimer, these are my own ...) Product Support, Wyse Technology, San Jose, CA ..!uunet!wyse!bob bob@wyse.com