Last change
on this file since 44 was
44,
checked in by bastiaans, 20 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
|
Rev | Line | |
---|
[40] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | DAEMON=beo_pxeconfigd |
---|
| 4 | PORT=6611 |
---|
| 5 | |
---|
| 6 | PXE_TEST=`grep $DAEMON /etc/services` |
---|
| 7 | |
---|
[44] | 8 | if [ ! -z "$PXE_TEST" ]; then |
---|
[40] | 9 | echo "WARNING: $DAEMON already in /etc/services" |
---|
| 10 | else |
---|
| 11 | echo -e "$DAEMON\t$PORT/tcp\t\t\t# pxe config daemon\n" >> /etc/services |
---|
| 12 | fi |
---|
| 13 | |
---|
[44] | 14 | if [ -d /etc/xinetd.d ] && [ ! -r /etc/xinetd.d/pxe ] |
---|
| 15 | then |
---|
| 16 | cat <<EOF >/etc/xinetd.d/pxe |
---|
| 17 | service 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 | } |
---|
| 27 | EOF |
---|
[40] | 28 | |
---|
[44] | 29 | echo -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 |
---|
| 31 | fi |
---|
| 32 | |
---|
| 33 | if [ -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 |
---|
| 37 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.