source: trunk/DEBIAN/postinst @ 79

Last change on this file since 79 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
Line 
1#!/bin/sh
2#
3# SVN Info:
4#       $Id: postinst 70 2006-11-14 11:25:00Z bas $
5#       $URL: trunk/DEBIAN/postinst $
6
7DAEMON=beo_pxeconfigd
8PORT=6611
9
10PXE_TEST=`grep $DAEMON /etc/services`
11
12if [ ! -z "$PXE_TEST" ]; then
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
18if [ -d /etc/xinetd.d ] && [ ! -r /etc/xinetd.d/$DAEMON ]
19then
20    cat <<EOF >/etc/xinetd.d/$DAEMON
21service $DAEMON
22{
23        disable         = no
24        socket_type     = stream
25        protocol        = tcp
26        user            = root
27        group           = sys
28        wait            = no
29        server          = /usr/sbin/$DAEMON
30}
31EOF
32
33    /etc/init.d/xinetd reload
34
35elif [ -x /etc/init.d/inetd ]
36then
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.