mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
521 B

  1. #!/bin/bash
  2. if any_installed "dgamelaunch_telnetd" ; then
  3. echo "Adding dgamelaunch to /etc/inetd.conf"
  4. grep -q dgamelaunch /etc/inetd.conf || cat >>/etc/inetd.conf<<EOF
  5. #telnet stream tcp nowait root.root /usr/sbin/tcpd /usr/sbin/in.telnetd -h -L /usr/sbin/dgamelaunch_telnetd
  6. EOF
  7. fi
  8. if any_removed "dgamelaunch_telnetd" ; then
  9. echo "Removing dgamelaunch from /etc/inetd.conf"
  10. cp /etc/inetd.conf{,.bak}
  11. tmp="`mktemp`"
  12. rm -f $tmp
  13. grep -v "dgamelaunch_telnetd" /etc/inetd.conf >$tmp
  14. cat $tmp > /etc/inetd.conf
  15. fi