#!/bin/sh

case "$1" in
    start)

	# Start inetd or telnetd
	if [ -x /usr/sbin/telnetd ]; then
	  port="`registry networking telnet_server|grep '^[0-9][0-9]*$'`"
	  if [ -n "$port" ]; then
	      echo "Starting telnetd on ${port}..."
	      /usr/sbin/telnetd -p $port -l /sbin/loginsh
	      echo "done"
	  fi
	fi
	;;
    stop)
	# do nothing
	;;
    *)
	echo "Usage: $0 {start|stop}"
	exit 1
	;;
esac
