File: init

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 (41 lines) | stat: -rw-r--r-- 997 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
#
# Gnats installation script -- written by Brian White <bcwhite@pobox.com>
# (This was my very first attempt at learning perl... please forgive me!)
#
# Forgiving -- rewritten to bash :-) by Milan Zamazal <pdm@debian.org>.

set -e

###############################################################################
#
# Common initialization for install scripts
#

. /usr/share/debconf/confmodule

PACKAGE=

SITE=$(hostname -f)
SITE=${SITE%.*}
SITE=${SITE##*.}

GNATSID=41
GNATSGID=41
MAILFILE="/etc/aliases"
PASSWDFILE="/etc/passwd"
GNATSDIR="/usr/lib/gnats"
GNATSDBPAR="/var/lib/gnats"
GNATSDBDIR="$GNATSDBPAR/gnats-db"
GNATSHOME="$GNATSDBDIR"
GNATSSITE="$GNATSDBDIR/$SITE"
CONFIGFILE="$GNATSDBDIR/gnats-adm/config"
GNATSENTRY="gnats:x:$GNATSID:$GNATSGID:Gnats Bug-Reporting System:$GNATSHOME:/bin/sh"

###############################################################################
#
# Utility functions
#

# Call arguments and never return error
function protect () { "$@" || true; }