This file is indexed.

config is in am-utils 6.2+rc20110530-3.2ubuntu1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
#!/bin/sh -e

# Import debconf library...
. /usr/share/debconf/confmodule

# Any amd configuration present ?
if test -d /etc/amd
then
    db_get am-utils/import-amd-conf-done
    if test "$RET" = false
    then
	# Ask about importing amd configuration
	db_input high am-utils/import-amd-conf || test $? = 30
	db_go

	db_get am-utils/import-amd-conf
	if test "$RET" = true
	then
	    # Attempt importing defaults...
	    if test -f /etc/amd/config.disabled-by-am-utils
	    then
		# Import general config
		. /etc/amd/config.disabled-by-am-utils
		if test "$LOGFILE" != syslog
		then
		    db_input medium am-utils/log-to-file
		    db_go
		fi
		if test "x$NISMAP" != x
		then
		    db_set am-utils/use-nis true
		    db_set am-utils/nis-master-map "$NISMAP"
		    if test "x$NISKEY" != x
		    then
			db_set am-utils/nis-master-map-key-style config
			db_set am-utils/nis-key "$NISKEY"
		    else
			db_set am-utils/nis-master-map-key-style onekey
		    fi
		else
		    db_set am-utils/use-nis false
		    # Try to locate various maps
		    if test -f /etc/amd/amd.master
		    then
			success=true
			passwdmap=false
			netmap=false
			maps=""
			set -- `cat /etc/amd/amd.master`
			while [ $# != 0 ]
			do
			    case "$1" in
				-[nprv])
				    shift
				    ;;
				-[acdkltwxyCD])
				    shift
				    if test $# = 0
				    then
					success=false
					break
				    fi
				    shift
				    ;;
				*)
				    break
				    ;;
			    esac
			done
			if $success
			then
			    while [ $# != 0 ]
			    do
				arg="$1"
				shift
				# Special cases
				if [ "$arg" = home ] || [ "$arg" = /home ] \
				&& [ "$1" = /etc/passwd ]
				then
				    shift
				    passwdmap=true
				    continue
				fi
				if [ "$arg" = /net ] && [ "$1" = /etc/amd/amd.net ]
				then
				    shift
				    netmap=true
				    continue
				fi

				case "$arg" in
				    /*)
					if test $# = 0
					then
					    success=false
					    break
					fi
					loc="$1"
					shift
					case "$loc" in
					    /etc/amd/*)
						newloc="`echo $loc | sed -e \
							 s!amd!am-utils!`"
						if test -f "$loc"
						then
						    cp "$loc" "$newloc"
						    loc="$newloc"
						else
						    success=false
						    break
						fi
						;;
					esac
					maps="$maps $arg $loc"
					while true
					do
					    case "$1" in
						-*)
						    maps="$maps $1"
						    shift
						    ;;
						*)
						    break
						    ;;
					    esac
					done
					;;
				    *)
					success=false
					break
					;;
				esac
			    done
			fi
			if $success
			then
			    if $netmap
			    then
				db_set am-utils/map-net true
			    else
				db_set am-utils/map-net false
			    fi
			    if $passwdmap
			    then
				db_set am-utils/map-home true
			    else
				db_set am-utils/map-home false
			    fi
			    db_set am-utils/map-others "$maps"
			else
			    db_input high am-utils/import-amd-failed
			fi
		    fi
		fi
	    fi
	fi
	db_set am-utils/import-amd-conf-done true
    fi
fi

# Am-utils 5.0.5-1 and earlier had am-utils/nis-multi-key
if db_get am-utils/nis-multi-key
then
    case "$RET" in
	true)
	    db_set am-utils/nis-master-map-key-style config
	    ;;
	false)
	    db_set am-utils/nis-master-map-key-style onekey
	    ;;
	*)
	    echo "$0: unknown value for nis-multi-key: $RET"
	    exit 1
    esac
    db_unregister am-utils/nis-multi-key
fi

# Configuration
db_input high am-utils/use-nis || test $? = 30
db_go

db_get am-utils/use-nis
if test "$RET" = true
then
    # NIS config

    # Ask master map name
    db_input high am-utils/nis-master-map || test $? = 30
    db_go

    # Which kind of mast map...
    db_input high am-utils/nis-master-map-key-style || test $? = 30
    db_go

    db_get am-utils/nis-master-map-key-style
    case "$RET" in
        config)
    	# We use configurations as keys

    	# Ask key name
    	db_input high am-utils/nis-key || test $? = 30
    	db_go
    	;;
        custom)
    	# Custom string...
    	db_input high am-utils/nis-custom || test $? = 30
    	db_go
    	;;
    esac
else
    # No-NIS config

    # net map
    db_input medium am-utils/map-net || test $? = 30
    db_go

    # passwd map
    db_input low am-utils/map-home || test $? = 30
    db_go

    # other maps
    db_input low am-utils/map-others || test $? = 30
    db_go
fi

db_input low am-utils/clustername || test $? = 30
db_go

db_stop

# Done
exit 0