Quote:
Originally Posted by acid_kewpie
telnet? This has nothing whatsoever to do with telnet. How are you using telnet with this? something messy with xinetd? Unless you are actually connecting to a telnet server, then this is not about telnet.
|
first i write this script
then make this service file under the /etc/xinetd.d/filename:
service service-test
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/service-test
port = 5555
}
then add my personal port like 5555 to /etc/services file
then open this port in iptables (firewall)
at last i telnet to my local host to test this service:
telnet 127.0.0.1 5555
then its prompt me to give it two numbers (echo "please enter 2 numbers: ")
but when i type two numbers and push enter button, (script continue) in line echo $(($A+$B)) that error appear, i used set -x and i found the line that gives error, and i know this is because of sum two numbers line.
any suggestion?