#!/bin/sh
#
# SVN Info:
#	$Id: postrm 68 2006-11-14 11:13:26Z bas $
#	$URL: tags/0.6.6/DEBIAN/postrm $
#
DAEMON=beo_pxeconfigd

if [ "$1" = "purge" ]
then
  update-inetd --remove "$DAEMON\tstream\ttcp\tnowait\troot.sys\t/usr/sbin/tcpd\t/usr/sbin/$DAEMON"
  rm /etc/xinetd.d/pxe
  /etc/init.d/inetd reload
  /etc/init.d/xinetd reload

  PXE_TEST=`grep $DAEMON /etc/services`

  if [ ! -z "$PXE_TEST" ]; then
    grep -v "$DAEMON" /etc/services > /tmp/services.tmp
    mv /tmp/services.tmp /etc/services
  else
    echo "WARNING: no $DAEMON in /etc/services to remove"
  fi

fi
