Problem on write a menu at ssh2!

From: Theo Ng (theo.ng@polyu.edu.hk)
Date: Tue Apr 09 2002 - 22:48:15 EDT


Dear All,

I try to write a menu on ssh2 such that everyone login will display a menu;
not a prompt. When I finished the menu, I discovered that I can't do
input. It seems that ssh2 bypass the input prompt. I posted before and
one of a kindly man "Graham Wood" told me that I need to enable TTY. I
tried but the result still the same. Still continuous loop at "Invalid
choice" and bypass "read ans".

What I done before:

sshd2_config: same as default, only changed "ForcePTTYAllocation" to "yes"
ssh2_config: same as default, only changed "ForcePTTYAllocation" to "yes"
and "DontReadStdin" to "no"

What I wrote at menu before:

>#!/bin/sh
>/bin/echo "Welcome!
>
>
>1 See today's date
>2 See who's logged in
>q Quit"
>
>/bin/echo "Your choice: \c"
>read ans
>while [ "$ans" != "q" ]
>do
> case "$ans" in
> 1)
> /bin/date
> ;;
> 2)
> /bin/who
> ;;
> q)
> /bin/echo "Goodbye"
> exit 0
> ;;
> *)
> /bin/echo "Invalid choice"
> ;;
> esac
> /bin/echo "Your choice: \c"
> read ans
>done
>exit 0

Please kindly to give some hints such that I can solve such problem. If I
miss some important information, please let me know and I will email
immediately. Thank you so much.

Theo
Technician
PolyU of Hong Kong

_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:11 EDT