source: trunk/debian/postinst @ 182

Last change on this file since 182 was 182, checked in by bas, 13 years ago

changed echo to /bin/echo, closes #13

  • Property svn:keywords set to Id URL
File size: 665 bytes
RevLine 
[79]1#!/bin/sh
2#
3# Authors: Bas van der Vlies
4#
5# SVN Info:
6#       $Id: postinst 182 2010-10-11 08:35:55Z bas $
[86]7#
[87]8DAEMON=pxeconfigd
9PORT=6611
10
11SHARE_DIR=/usr/share/doc/pxeconfig
12
13PXE_TEST=`grep $DAEMON /etc/services`
14
15if [ ! -z "$PXE_TEST" ]; then
[182]16        /bin/echo "WARNING: $DAEMON already in /etc/services"
[87]17else
[182]18    /bin/echo -e "$DAEMON\t$PORT/tcp\t\t\t# pxe config daemon\n" >> /etc/services
[87]19fi
20
[86]21if [ -d /etc/xinetd.d ]
22then
[87]23        if [ ! -r /etc/xinetd.d/$DAEMON ]
24        then
25                cp $SHARE_DIR/examples/pxeconfigd.xinetd /etc/xinetd.d/$DAEMON
26                /etc/init.d/xinetd reload
27        fi
[86]28else
[87]29        /usr/sbin/update-inetd --group OTHER --add "$DAEMON stream  tcp  nowait  root.sys /usr/sbin/tcpd  /usr/sbin/$DAEMON"
30        /etc/init.d/inetd reload
[86]31fi
Note: See TracBrowser for help on using the repository browser.