- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Inetd script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2004 12:01 AM
07-18-2004 12:01 AM
I'm trying to write a script that uses inetd.
It works fine when it uses stdou and when I telnet it, I get all the output, but for some reason when I'm trying to send something to it (I use read command in the script), it just ignores it.
Are there any samples available how to do it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2004 10:02 PM
07-18-2004 10:02 PM
Re: Inetd script
On my system when I do:
#!/usr/bin/ksh
while read a
do
echo "$a"
done
telnet to that service just echo what I type in
the telnet, so it should work for you too?
# telnet 127.0.0.1 32123
Trying...
Connected to 127.0.0.1.
Escape character is '^]'.
&é&é"é&
&é&é"é&
12345
12345
If there is no endofline charactere, you must use a=$(dd bs=1 count=1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2004 11:20 PM
07-18-2004 11:20 PM
Re: Inetd script
I tried it and I get
"Connection to host lost."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 01:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 01:50 AM
07-19-2004 01:50 AM
Re: Inetd script
If the server started by inetd is a script try this command to get a line:
read line
line="$(echo $line|sed 's/^M//')"
this should get the line properly.
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 01:52 AM
07-19-2004 01:52 AM
Re: Inetd script
enter ^M with the characters CTRL-V CTRL-M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 02:37 AM
07-19-2004 02:37 AM
Re: Inetd script
Here are the lines to add:
/etc/services:
myserv 950/tcp
/etc/inetd.conf:
myserv stream tcp nowait root /tmp/myserv myserv
save th attached script in /tmp/myserv, chmod it 555 and run inetd -c
check /var/adm/syslog/syslog.log, you should see something like new service added
try to telnet the host on port 950, it should ask u a file name, show i and ask again untill u answer END
hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2004 08:03 PM
07-20-2004 08:03 PM