home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / Networking / SambaManager / SambaManager.pre_delete < prev    next >
Encoding:
Text File  |  1998-04-02  |  831 b   |  33 lines

  1. #!/bin/sh
  2. #
  3. # SambaManager.pre_delete <installer path> <installed path>
  4. #
  5. if /bin/sed '/^netbios-/d' /etc/inetd.conf >/tmp/inetd.conf
  6. then
  7.     if /bin/mv -f /tmp/inetd.conf /etc/inetd.conf
  8.     then
  9. #     kill any running daemons
  10.         if [ -f /tmp/smbd.pid ]
  11.         then
  12.             /bin/kill -9 `/bin/cat /tmp/smbd.pid`
  13.             /bin/rm -f /tmp/smbd.pid
  14.         fi
  15.         if [ -f /tmp/nmbd.pid ]
  16.         then
  17.             /bin/kill -9 `/bin/cat /tmp/nmbd.pid`
  18.             /bin/rm -f /tmp/nmbd.pid
  19.         fi
  20. #     send a SIGHUP to inetd.conf
  21.         /bin/kill -1 `/bin/ps ax | /bin/grep inetd | /bin/grep -v grep | /bin/awk '{ print $1 }'`
  22.         echo "OK. /etc/inetd.conf cleaned."
  23.         /bin/rm -f /usr/local/smbpasswd /users/local/smbpasswd
  24.     else
  25.         echo "FAILED. Could not edit /etc/inetd.conf."
  26.         /bin/rm /tmp/inetd.conf
  27.     fi
  28. else
  29.     echo "FAILED. Could not edit /etc/inetd.conf."
  30.     /bin/rm /tmp/inetd.conf
  31. fi
  32. exit 0
  33.