This file is indexed.

/usr/lib/amanda/patch-system is in amanda-client 1:3.3.6-4.1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  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
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#! /bin/bash
#
# patch inetd.conf and services
# originally by Axel Zinser (fifi@hiss.han.de)
#

prefix="/usr"
exec_prefix="${prefix}"
sbindir="/usr/sbin"
amlibexecdir="/usr/lib/amanda"
. "${amlibexecdir}/amanda-sh-lib.sh"

SERVICE_SUFFIX=""

USER="backup"

INETDCONF=/etc/inetd.conf
[ ! -f $INETDCONF ] && INETDCONF=/usr/etc/inetd.conf

SERVICES=/etc/services
[ ! -f $SERVICES ] && SERVICES=/usr/etc/services

ENABLE_AMANDAD=true

case `uname -n` in
"localhost" | "localhost".*)
    ENABLE_INDEX=true
    ENABLE_TAPE=true
    ;;
*)
    ENABLE_INDEX=false
    ENABLE_TAPE=false
    ;;
esac

CLIENT_PORT=10080
KCLIENT_PORT=10081
INDEX_PORT=10082
TAPE_PORT=10083

while [ $# != 0 ]; do
    case "$1" in
    --service-suffix=*)
	SERVICE_SUFFIX=`echo $1 | sed -e 's/[^=]*=//'`;;
    --version-suffix=*)
	SUF=`echo $1 | sed -e 's/[^=]*=//'`;;
    --inetd=*)
        INETDCONF=`echo $1 | sed -e 's/[^=]*=//' -e 's%^$%/dev/null%'`;;
    --services=*)
	SERVICES=`echo $1 | sed -e 's/[^=]*=//' -e 's%^$%/dev/null%'`;;
    --libexecdir=?*)
	libexecdir=`echo $1 | sed -e 's/[^=]*=//'`;;
    --user=?*)
	USER=`echo $1 | sed -e 's/[^=]*=//'`;;
    --enable-client)
	ENABLE_AMANDAD=true;;
    --disable-client)
	ENABLE_AMANDAD=false;;
    --enable-index)
	ENABLE_INDEX=true;;
    --disable-index)
	ENABLE_INDEX=false;;
    --enable-tape)
	ENABLE_TAPE=true;;
    --disable-tape)
	ENABLE_TAPE=false;;
    --client-port=?*)
	CLIENT_PORT=`echo $1 | sed -e 's/[^=]*=//'`;;
    --kclient-port=?*)
	KCLIENT_PORT=`echo $1 | sed -e 's/[^=]*=//'`;;
    --index-port=?*)
	INDEX_PORT=`echo $1 | sed -e 's/[^=]*=//'`;;
    --tape-port=?*)
	TAPE_PORT=`echo $1 | sed -e 's/[^=]*=//'`;;
    --usage | --help | -h)
	echo `_ 'call this script with zero or more of the following arguments:'`
	echo `_ '--version-suffix=<suffix>: deprecated option' ""`
	echo `_ '--service-suffix=<suffix>: append to service names [%s]' "$SERVICE_SUFFIX"`
	echo `_ '--libexecdir=<dirname>: where daemons should be looked for [%s]' "$libexecdir"`
	echo `_ '--inetd=<pathname>: full pathname of inetd.conf [%s]' "$INETDCONF"`
	echo `_ '--services=<pathname>: full pathname of services [%s]' "$SERVICES"`
	echo `_ '\tan empty pathname or /dev/null causes that file to be skipped'`
	echo `_ '--user=<username>: run deamons as this user [%s]' "$USER"`
	echo `_ '--enable/disable-client: enable/disable amandad [%s]' \`$ENABLE_AMANDAD && echo enabled || echo disabled\``
	echo `_ '--enable/disable-index: enable/disable index server [%s]' \`$ENABLE_INDEX && echo enabled || echo disabled\``
	echo `_ '--enable/disable-tape: enable/disable tape server [%s]' \`$ENABLE_TAPE && echo enabled || echo disabled\``
	echo `_ '--client-port=<num>: amandad port number [%s]' "$CLIENT_PORT"`
	echo `_ '--kclient-port=<num>: kamandad port number [%s]' "$KCLIENT_PORT"`
	echo `_ '--index-port=<num>: index server port number [%s]' "$INDEX_PORT"`
	echo `_ '--tape-port=<num>: tape server port number [%s]' "$TAPE_PORT"`
	exec true;;
    *)
	echo `_ '%s: invalid argument %s.  run with -h for usage\n' "$0" "$1"` >&2
	exec false;;
    esac
    shift
done

if [ "$SERVICES" = /dev/null ]; then :
elif [ -f "$SERVICES" ]; then
	TEMP="$SERVICES.new"
	{
	    egrep < "$SERVICES" -v "^(amanda|kamanda|amandaidx|amidxtape)${SERVICE_SUFFIX}[ 	]"
	    echo "amanda${SERVICE_SUFFIX} ${CLIENT_PORT}/udp"
	    echo "amanda${SERVICE_SUFFIX} ${CLIENT_PORT}/tcp"
	    echo "kamanda${SERVICE_SUFFIX} ${KCLIENT_PORT}/udp"
	    echo "amandaidx${SERVICE_SUFFIX} ${INDEX_PORT}/tcp"
	    echo "amidxtape${SERVICE_SUFFIX} ${TAPE_PORT}/tcp"
	} > "$TEMP"
	if diff "$SERVICES" "$TEMP" >/dev/null 2>/dev/null; then
		echo `_ '%s is up to date' "$SERVICES"`
	else
		cp "$TEMP" "$SERVICES" || echo `_ 'cannot patch %s' "$SERVICES"`
	fi
	rm -f "$TEMP"
else
	echo `_ '%s not found!' "$SERVICES"`
fi
if [ "$INETDCONF" = /dev/null ]; then :
elif [ -f "$INETDCONF" ]; then
	err=`_ 'warning: %s/amandad%s does not exist' "$libexecdir" ""`
	$ENABLE_AMANDAD && test ! -f $libexecdir/amandad && echo "$err" >&2
	err=`_ 'warning: %s/amindexd%s does not exist' "$libexecdir" ""`
	$ENABLE_INDEX && test ! -f $libexecdir/amindexd && echo "$err" >&2
	err=`_ 'warning: %s/amidxtaped%s does not exist' "$libexecdir" ""`
	$ENABLE_TAPE && test ! -f $libexecdir/amidxtaped && echo "$err" >&2
	TEMP="$INETDCONF.new"
	{
	    egrep < "$INETDCONF" -v "^(amanda|amandaidx|amidxtape)${SERVICE_SUFFIX}[ 	]"
	    $ENABLE_AMANDAD && echo "amanda${SERVICE_SUFFIX}    dgram  udp wait   $USER $libexecdir/amandad    amandad"
	    $ENABLE_INDEX && echo "amandaidx${SERVICE_SUFFIX} stream tcp nowait $USER $libexecdir/amindexd   amindexd"
	    $ENABLE_TAPE && echo "amidxtape${SERVICE_SUFFIX} stream tcp nowait $USER $libexecdir/amidxtaped amidxtaped"
	} > "$TEMP"
	if diff "$INETDCONF" "$TEMP" >/dev/null 2>/dev/null; then
		fmt="%s is up to date\n"
		printf $fmt $INETDCONF
	else
		fmt="cannot patch %s\n"
		cp "$TEMP" "$INETDCONF" || printf $fmt $INETDCONF
	fi
	rm -f "$TEMP"
else
	fmt="%s not found!\n"
	printf $fmt $INETDCONF
fi