source: trunk/DEBIAN/postinst @ 68

Last change on this file since 68 was 68, checked in by bas, 16 years ago

postinst:

  • Fixed an error in the postinst script for debian

Added keywords:

  • control, postinst and postrm
  • Property svn:executable set to *
  • Property svn:keywords set to Id URL
File size: 774 bytes
Line 
1#!/bin/sh
2#
3# SVN Info:
4#       $Id: postinst 68 2006-11-14 11:13:26Z 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 [ -r /etc/inetd.conf ]
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.