source: trunk/pxeconfig/DEBIAN/postinst @ 44

Last change on this file since 44 was 44, checked in by bastiaans, 18 years ago

DEBIAN/postinst:

Support toegevoegd voor xinetd

DEBIAN/postrm:

Support toegevoegd voor xinetd

Changelog:

Versie en change toegevoegd

  • Property svn:executable set to *
File size: 963 bytes
Line 
1#!/bin/sh
2
3DAEMON=beo_pxeconfigd
4PORT=6611
5
6PXE_TEST=`grep $DAEMON /etc/services`
7
8if [ ! -z "$PXE_TEST" ]; then
9  echo "WARNING: $DAEMON already in /etc/services"
10else
11  echo -e "$DAEMON\t$PORT/tcp\t\t\t# pxe config daemon\n" >> /etc/services
12fi
13
14if [ -d /etc/xinetd.d ] && [ ! -r /etc/xinetd.d/pxe ]
15  then
16    cat <<EOF >/etc/xinetd.d/pxe
17service beo_pxeconfigd
18{
19        disable         = no
20        socket_type     = stream
21        protocol        = tcp
22        user            = root
23        group           = sys
24        wait            = no
25        server          = /usr/sbin/beo_pxeconfigd
26}
27EOF
28
29echo -e "service $DAEMON\n{\n\tdisable\t\t= no\n\tsocket_type\t= stream\n\tprotocol\t= tcp\n\tuser\t\t= root\n\tgroup\t\t= sys\n\twait\t\t= no\n\tserver\t\t= /usr/sbin/beo_pxeconfigd\n}" > /etc/xinetd.d/pxe
30    /etc/init.d/xinetd reload
31fi
32
33if [ -r /etc/inetd.conf ]
34  then
35    update-inetd --add "$DAEMON\tstream\ttcp\tnowait\troot.sys\t/usr/sbin/tcpd\t/usr/sbin/$DAEMON"
36    /etc/init.d/inetd reload
37fi
Note: See TracBrowser for help on using the repository browser.