#!/bin/sh

echo "enabling telnet in /etc/inetd.conf"
/bin/sed 's/^#telnet/telnet/' </etc/inetd.conf >/tmp/etc_inetd.conf
/bin/chmod 664 /tmp/etc_inetd.conf
/bin/mv /tmp/etc_inetd.conf /etc/inetd.conf

echo "adding pts/[0-6] to /etc/securetty"
cat >/etc/securetty <<EOF
ttyS0
pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
EOF

echo "restarting inetd"
killall -HUP inetd

exit 0