Hello Barry:
I had a chance to try your script last evening. I had to make some minor
modifications to when I started dev-con (as the system would hang) to get your
build file too work on my system (see below). I am manually starting telnetd
versus using inetd.
When I manually start “telnetd -debug” I get a login prompt from the telnet
client, but immediately the QNX host closes the connection. Here are the logs.
From syslog the telnetd process generates a log message that
- setsocketopt (SO_KEEPALIVE): Operation not supported and then terminates
- going down on signal 18
The windows client:
login: root
No home directory.
Logging in with home = “/”.
login: /bin/sh:
Connection to host lost.
Do you see anything that I am missing? telnetd works fine on my development
platform.
Regards,
–Jeff Strickrott
====== the modified build file
[virtual=x86,bios +compress] .bootstrap={
startup-bios -s 64k
PATH=/proc/boot procnto
}
[+script] startup-script = {
Start up some consoles
devc-con -n2 &
reopen /dev/con1
display_msg “Minimal telnet image on a PC compatible BIOS system”
seedres
display_msg “Starting slogger”
slogger &
waitfor /dev/slog
display_msg “Starting PCI BIOS”
pipe &
pci-bios &
waitfor /dev/pci
put in your actual IP,netmask and gateway
display_msg “Starting Network Driver”
io-net -dne2000 -pttcpip if=en0:192.168.0.200:255.255.255.0
default=192.168.0.1
waitfor /dev/socket
display_msg “Starting pty server”
devc-pty &
waitfor /dev/ttyp0
These env variables inherited by all the programs which follow
SYSNAME=nto
TERM=qansi
HOME=/
Start some extra shells on other consoles
display_msg “Starting Console”
devc-con -n2 &
reopen /dev/con2
[pri=25 +session] sh &
reopen /dev/con1
[+session] sh &
}
file links
Programs require the runtime linker (ldqnx.so) to be at a fixed location
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
Cheat and make the /temp point to the shared memory area…
[type=link] /tmp=/dev/shmem # tmp points to shared memory
Redirect console messages for syslog
[type=link] /dev/console=/dev/con1
inetd requires telnetd to be at a fixed location
[type=link] /usr/sbin/telnetd=/proc/boot/telnetd
I had problems with this, if link defined then telnetd could not find
termdef as it was looking in /proc/boot versus the bin directory
[type=link] /bin=/proc/boot
binary files to include in image
libc.so
libsocket.so
npm-ttcpip.so
devn-ne2000.so
[data=copy] # All executables that can be restarted go below.
Use the “public domain korn shell” as the default shell “sh”
sh = ksh
Include files for telnet capability
/etc/hosts=/etc/hosts
/etc/termcap=/etc/termcap
/bin/login=/bin/login
/bin/termdef=/bin/termdef
/etc/passwd=/etc/passwd
/etc/group=/etc/group
/etc/shadow=/etc/shadow, I have no shadow file
/ect/shells=/etc/shells
/usr/lib/terminfo = /usr/lib/terminfo
/etc/inetd.conf = /etc/inetd.conf
/etc/services = /etc/services
Include a console driver
devc-con
Include pci server
pci-bios
seedres
Other executables
io-net
pipe
devc-pty
inetd
ftpd
telnetd
pdebug
ksh
ping
ls
more
hostname
ifconfig
route
slay
ps
telnet
ftp
slogger
sloginfo
=========
OS Support wrote:
I suspect the problem is the missing the terminfo files. The
following build file allows you to telnet to the system.
Regards,
Barry F.
[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot procnto
}
[+script] startup-script = {
Start up some consoles
devc-con -n4 &
reopen /dev/con1
display_msg Minimal telnet image on a PC compatible BIOS system
Start the pci server
seedres
pci-bios &
waitfor /dev/pci
Start network driver and tcpip
io-net -dne2000 -pttcpip if=en0:10.12.1.44 &
waitfor /dev/io-net
Start inetd
inetd -d &
Some common servers
devc-pty &
These env variables inherited by all the programs which follow
SYSNAME=nto
TERM=qansi
Start some extra shells on other consoles
reopen /dev/con2
[+session] sh &
reopen /dev/con3
[+session] sh &
Start a high priority shell just in case…
reopen /dev/con4
[pri=25 +session] sh &
Start the main shell
reopen /dev/con1
[+session] sh
}
Cheat and make the /temp point to the shared memory area…
[type=link] /tmp=/dev/shmem
Redirect console messages for syslog
[type=link] /dev/console=/dev/con1
Programs require the runtime linker (ldqnx.so) to be at a fixed location
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
inetd requires telnetd to be at a fixed location
[type=link] /usr/sbin/telnetd=/proc/boot/telnetd
[type=link] /bin=/proc/boot
We use the “c” shared lib (which also contains the runtime linker)
libc.so
Other libs
npm-ttcpip.so
devn-el900.so
libsocket.so.2
The files above this line can be shared by mutiple processes
[data=c]
Executables must currently be below this line
Include a console driver
devc-con
Include pci server
pci-bios
seedres
Use the “public domain korn shell” as the default shell “sh”
sh=ksh
Include files for telnet capability
/etc/passwd = /etc/passwd
/etc/shadow = /etc/shadow
/etc/services = /etc/services
/etc/inetd.conf = /etc/inetd.conf
/usr/lib/terminfo = /usr/lib/terminfo
Other executables
devc-pty
ls
cat
pidin
io-net
inetd
ping
telnetd
telnet
login
Jeff Strickrott <> jstric01@cs.fiu.edu> > wrote in message
news:> 3F451FE1.E5A0BE8C@cs.fiu.edu> …
Hi All:
I have been trying to bring up a telnetd and ftpd server on a PC a test
platform. I am running RTP 6.1 NC (so that I can play with mkifs) and
booting my image from floppy.
I originally started off with a buildfile example from the deeply
embedded section of the Help file. I have included the modified version
below.
Problem: When I start telnetd (i.e., telnetd -debug -D report) manually
from a shell on the test platform I get the message “going down on
signal 18” from the slog file. I disabled inetd to narrow the problem
down. What am I missing in my buildfile? Any suggestions?
Thanks in advance for the help.
Regards,
–Jeff Strickrott
====== Buildfile
Svr Builfile
Aim: To make a network-enabled debug server using telnet, ftp to
pdebug
Target: x86,bios
[virtual=x86,bios +compress] .bootstrap={
startup-bios -s 64k
PATH=/proc/boot LD_LIBRARY_PATH=/proc/boot:/usr/lib procnto
}
[+script] startup-script = {
display_msg Welcome to QNX on a PC-compatible BIOS system
seedres
display_msg “Starting slogger”
slogger &
waitfor /dev/slog
display_msg “Starting PCI BIOS”
pipe &
pci-bios &
waitfor /dev/pci
put in your actual IP,netmask and gateway
display_msg “Starting Network Driver”
io-net -dne2000 -ptcpip
waitfor /dev/io-net/en0
waitfor /dev/socket
ifconfig en0 192.168.0.200 netmask 255.255.255.0
route add default 192.168.0.1
display_msg “Starting inetd”
inetd &
pdebug needs devc-pty and esh
devc-pty &
waitfor /dev/ttyp0
display_msg “Starting Console”
devc-con -n1 &
reopen /dev/con1
[+session] HOME=/ TERM=qansi-m ksh &
[+session] esh &
}
file links
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
[type=link] /tmp=/dev/shmem # tmp points to shared memory
binary files to include in image
libc.so
libsocket.so
npm-tcpip.so
devn-ne2000.so
pci-bios
seedres
devc-con
io-net
pipe
devc-pty
inetd
ftpd
telnetd
pdebug
esh
ksh
ping
ls
more
hostname
ifconfig
route
/etc/hosts=/etc/hosts
/etc/termcap=/etc/termcap
/bin/login=/bin/login
/bin/termdef=/bin/termdef
/etc/passwd=/etc/passwd
/etc/group=/etc/group
/etc/shadow=/etc/shadow
/ect/shells=/etc/shells
slay
ps
telnet
ftp
slogger
sloginfo
Data files are created in the named directory.
/etc/hosts = {
127.0.0.1 localhost
192.168.0.200 Qdebug
192.168.0.1 scrunch
192.168.0.25 Q1
#}
/etc/services = {
ftp 21/tcp
telnet 23/tcp
pdebug 8000/tcp
}
/etc/inetd.conf = {
ftp stream tcp nowait root /bin/fdtpd fdtpd
telnet stream tcp nowait root /bin/telnetd telnetd
pdebug stream tcp nowait root /bin/pdebug pdebug -
}
/etc/resolv.conf = {
nameserver 131.94.128.2
nameserver 131.94.64.4
}
====== Trace of debug from MS Windows Telent client
td: send do TERMINAL TYPE
td: send do TSPEED
td: send do XDISPLOC
td: send do OLD-ENVIRON
td: ttloop
td: netflush 118 chars
td: ttloop read 6 chars
td: recv will TERMINAL TYPE
td: recv will NAWS
td: send do NAWS
td: ttloop
td: netflush 107 chars
td: ttloop read 9 chars
td: recv wont TSPEED
td: recv wont XDISPLOC
td: recv wont OLD-ENVIRON
td: ttloop
td: netflush 116 chars
td: ttloop read 12 chars
td: recv will NAWS
td: netflush 46 chars
td: recv suboption NAWS 0 80 (8
td: netflush 45 chars
td: ttloop
td: netflush 12 chars
td: ttloop read 10 chars
td: netflush 26 chars
td: recv suboption TERMINAL-TYP
td: ttloop
td: netflush 62 chars
td: ttloop read 11 chars
td: netflush 26 chars
td: recv suboption TERMINAL-TYP
td: ttloop
td: netflush 63 chars
td: ttloop read 10 chars
td: netflush 26 chars
==> the the terminal stops at this point (no login prompt) and will drop
the conection when I hit return.
Connection to host lost.
C:\WINNT\system32
[/quote]
>