source: trunk/DEBIAN/postinst @ 75

Last change on this file since 75 was 70, checked in by bas, 17 years ago

DEBIAN/postinst:

  • Used wrong statement for inetd check
  • Property svn:executable set to *
  • Property svn:keywords set to Id URL
File size: 776 bytes
RevLine 
[40]1#!/bin/sh
[68]2#
3# SVN Info:
4#       $Id: postinst 70 2006-11-14 11:25:00Z bas $
5#       $URL: trunk/DEBIAN/postinst $
[40]6
7DAEMON=beo_pxeconfigd
8PORT=6611
9
10PXE_TEST=`grep $DAEMON /etc/services`
11
[44]12if [ ! -z "$PXE_TEST" ]; then
[40]13  echo "WARNING: $DAEMON already in /etc/services"
14else
15  echo -e "$DAEMON\t$PORT/tcp\t\t\t# pxe config daemon\n" >> /etc/services
16fi
17
[45]18if [ -d /etc/xinetd.d ] && [ ! -r /etc/xinetd.d/$DAEMON ]
[68]19then
[45]20    cat <<EOF >/etc/xinetd.d/$DAEMON
21service $DAEMON
[44]22{
23        disable         = no
24        socket_type     = stream
25        protocol        = tcp
26        user            = root
27        group           = sys
28        wait            = no
[45]29        server          = /usr/sbin/$DAEMON
[44]30}
31EOF
[40]32
[44]33    /etc/init.d/xinetd reload
34
[70]35elif [ -x /etc/init.d/inetd ]
[68]36then
[44]37    update-inetd --add "$DAEMON\tstream\ttcp\tnowait\troot.sys\t/usr/sbin/tcpd\t/usr/sbin/$DAEMON"
38    /etc/init.d/inetd reload
39fi
Note: See TracBrowser for help on using the repository browser.