File: addinetd

package info (click to toggle)
gnats 3.113-13
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,640 kB
  • ctags: 2,917
  • sloc: ansic: 25,624; tcl: 8,071; sh: 5,362; perl: 3,619; makefile: 3,164; yacc: 820; lisp: 742; sql: 280; sed: 181
file content (26 lines) | stat: -rw-r--r-- 618 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

set -e

###############################################################################
#
# Add an inetd entry for client/server operations
#


if [ "$1" = configure ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 3.111-1; then
  update-inetd --remove "^#?gnats.*/gnatsd"
#  echo "'gnats' entry removed from inetd.conf, to be replaced with 'support'."
fi


if [ "$1" = configure ]; then
  update-inetd --add "#support		stream	tcp	nowait	gnats	/usr/sbin/tcpd	/usr/lib/gnats/gnatsd"
fi


if [ "$1" = configure ] && [ -z "$2" ]; then # configuring firstly
  db_input low gnats/server || true
  db_go
fi