Unpack the Netkit-telnet archive and install it by running:
./configure
cd telnetd
make
make install
Create a new file /etc/inetd.conf containing:
# Begin /etc/inetd.conf
telnet stream tcp nowait root /usr/sbin/in.telnetd
# End /etc/inetd.conf
Create a new file /etc/init.d/inetd containing:
#!/bin/sh
# Begin /etc/init.d/inetd
check_status()
{
if [ $? = 0 ]
then
echo "OK"
else
echo "FAILED"
fi
}
case "$1" in
start)
echo -n "Starting Internet Server daemon..."
start-stop-daemon -S -q -o -x /usr/sbin/inetd
check_status
;;
stop)
echo -n "Stopping Internet Server daemon..."
start-stop-daemon -K -q -o -p /var/run/inetd.pid
check_status
;;
reload)
echo -n "Reloading Internet Server configuration file..."
start-stop-daemon -K -q -s 1 -p /var/run/inetd.pid
check_status
;;
restart)
echo -n "Stopping Internet Server daemon..."
start-stop-daemon -K -q -o -p /var/run/inetd.pid
check_status
sleep 1
echo -n "Starting Internet Server daemon..."
start-stop-daemon -S -q -o -x /usr/sbin/inetd
check_status
;;
*)
echo "Usage: $0 {start|stop|reload|restart}"
;;
esac
# End /etc/init.d/inetd
Set the proper permissions by running:
chmod 755 /etc/init.d/inetd
Create the proper symlinks by running:
cd /etc/rc2.d
ln -s ../init.d/inetd S40inetd
cd ../rc0.d
ln -s ../init.d/inetd K40inetd
cd ../rc6.d
ln -s ../init.d/inetd K40inetd