[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: trouble with /sbin/termwrap



* Richard Hirst 

| ######################################################################
| ##	Recognize terminal type.
| ######################################################################
| case `/usr/bin/tty` in
| /dev/tty|/dev/console|/dev/tty[1-9]*)
| 	TERMINAL=console
| 	;;
| /dev/tty[p-za-e]*)
| 	TERMINAL=pseudo
| 	if [ ! -z "$DISPLAY" ]; then
| 		TERMINAL=x
| 	else
| 		case $TERM in
| 		rxvt|xterm*|kterm)	TERMINAL=x;;
| 		esac
| 	fi
| 	;;
| /dev/tty[A-Z]*|/dev/cu*)
| 	TERMINAL=serial
| 	;;
| esac

I think this will break for devfs systems where devfsd hasn't been
started yet.  Using 

/dev/tty|/dev/console|/dev/tty[1-9]*|/dev/vc/*)
	TERMINAL=console
	;;
/dev/tty[p-za-e]*|/dev/pty/*|/dev/pts/*)
	TERMINAL=pseudo
	if [ ! -z "$DISPLAY" ]; then
		TERMINAL=x
	else
		case $TERM in
		rxvt|xterm*|kterm)	TERMINAL=x;;
		esac
	fi
	;;
/dev/tty[A-Z]*|/dev/cu*|/dev/tts/*|/dev/cua/*)
	TERMINAL=serial
	;;
esac

should fix that.

-- 

Tollef Fog Heen
Unix _IS_ user friendly... It's just selective about who its friends are.



Reply to: