This file is indexed.

/usr/sbin/isdnconfig is in isdnutils-base 1:3.25+dfsg1-3.3ubuntu2.

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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
#!/bin/sh

# vim:set ts=8 sw=4 shiftround:

# Configuration script for isdn4linux

set -e -C

DEFAULTS=/usr/share/isdn/default
#VBOXEXAMPLES=/usr/share/doc/isdnvboxserver/examples/default

ipppdOK=true
vboxOK=true
if [ ! -x /usr/sbin/ipppd ]; then ipppdOK=false; fi
if [ ! -x /usr/sbin/vboxgetty ]; then vboxOK=false; fi

# version of cp that doesn't mind if source is gzipped
mycp() {
    mycpSRC=$1
    mycpDEST=$2
    mycpTAIL=`expr $mycpDEST : '.*\(.\)'`
    [ x$mycpTAIL = x/ ] && mycpDEST=$mycpDEST`basename $mycpSRC`
    if [ -f $mycpDEST ]
    then
	echo "$mycpDEST already exists, preserving original version."
	return 1
    fi
    if [ -f $mycpSRC ]
    then
	cp $mycpSRC $mycpDEST
    else
	if [ -f $mycpSRC.gz ]
	then
	    zcat $mycpSRC > $mycpDEST
	else
	    echo "isdnutils ERROR! $mycpSRC doesn't exist (tell isdnutils@packages.debian.org)"
	    return 1
	fi
    fi
    return 0
}


search_files() {
    echo "Searching for existing configuration files..."
    devices=""
    for sfA in `ls $PREFIX.* 2>/dev/null`; do
	test -e $sfA && devices="$devices ${sfA#*.}"
    done
    test -z "$devices" && devices=NONE
    echo "Found : $devices"
    echo ""
}

no_create() {
    echo "No file created."
    echo -n "Press [Enter] "
    read dummy
}

create_warning() {
    echo "This file is only an example."
    echo "You have to edit this file for it to work."
    echo -n "Press [Enter] "
    read dummy
}

create_2_warning() {
    echo "These files are only an example."
    echo "You have to edit these files for them to work."
    echo -n "Press [Enter] "
    read dummy
}

config_main() {
    clear
    echo -n "Isdnutils configuration
=======================

1	network devices
2	synchronous ppp daemon"
    if ! $ipppdOK; then echo -n " (disabled, 'ipppd' package not installed)"; fi
    echo -n "
3	modem emulation
4	voice box configuration"
    if ! $vboxOK; then echo -n " (disabled, 'isdnvboxserver' pkg not installed)"; fi
    echo -n "

Q	Quit

Your choice : "
    read choice dummy
    case "$choice" in
	1)	config_net ;;
	2)	if $ipppdOK; then config_ppp; else echo "sorry, disabled!"; sleep 3; fi ;;
	3)	config_modem ;;
	4)	if $vboxOK; then config_vbox; else echo "sorry, disabled!"; sleep 3; fi ;;
	q|Q)	exit 0;;
    esac
}

config_net() {
    clear
    echo "Isdnutils configuration network interfaces"
    echo "======================= ------------------"
    echo ""
    PREFIX=/etc/isdn/device; search_files

    echo "
Devices should be named :
 - rawip interface		isdn0 isdn1 ..."
    if $ipppdOK
    then echo " - synchronous ppp interface	ippp0 ippp1 ..."
    else echo " - synchronous ppp interface	(disabled, ipppd package not installed)"
    fi
    echo -n "
Name for new interface  : "
    read interface dummy
    if test -z "$interface"; then
	no_create
    elif test -c "/dev/$interface"; then
	if ! $ipppdOK && [ `expr "$interface" : ipppd` -eq 5 ]; then
	    echo "Sorry, ipppd package not installed."
	    echo -n "Press [Enter] "
	    read dummy
	elif mycp $DEFAULTS/device.DEVICE /etc/isdn/device.$interface; then
	    echo "Installed new config file /etc/isdn/device.$interface ."
	    create_warning
	fi
    else
	echo "Interface name not found."
	echo -n "Press [Enter] "
	read dummy
    fi
}

config_ppp() {
    clear
    echo "Isdnutils configuration synchronous ppp daemon"
    echo "======================= ----------------------"
    echo ""
    PREFIX=/etc/isdn/ipppd; search_files

    echo  -n "
Normal setup :	one ipppd for all devices: /dev/ippp0 /dev/ippp1 ...
		All ippp* network interfaces are handled by a single ipppd
		process using a single config file.

Special setup :	one ipppd for each device: /dev/ippp0 /dev/ippp1 ...
		Each ippp* network interface is handled by its own ipppd
		process, using a specific config file for each.
		You need to use pppbind on each network interface to select
		which /dev/ippp* device will be used.

Usually only a single ippp interface is used (for connecting to an ISP), so
the above isn't really relevant to most users.

Name for new configuration (ippp0 ippp1 ...) : "
    read device dummy
    if test -z "$device"
    then
	no_create
    else
	if test -c "/dev/$device"
	then
	    done=0
	    if mycp $DEFAULTS/ipppd.DEVICE /etc/isdn/ipppd.$device
	    then
		echo "Installed new config file /etc/isdn/ipppd.$device ."
		done=1
	    fi
#OLD	    if [ -d /etc/ppp/ip-down.d -a ! -e /etc/ppp/ip-down.d/isdnutils ]
#OLD	    then
#OLD		if mycp $IPPPDEXAMPLES/ip-down.d /etc/ppp/ip-down.d/isdnutils
#OLD		then
#OLD		   echo "Installed new config file /etc/ppp/ip-down.d/isdnutils ."
#OLD		   [ -e /etc/ppp/ip-down -a ! -x /etc/ppp/ip-down ] &&
#OLD						chmod +x /etc/ppp/ip-down
#OLD		   if [ $done -eq 0 ]
#OLD		   then	done=1
#OLD		   else	done=2
#OLD		   fi
#OLD		else
#OLD		   echo "Existing /etc/ppp/ip-up.d/isdnutils not overwritten."
#OLD		fi
#OLD	    fi
	    if [ -d /etc/ppp -a ! -e /etc/ppp/auth-up ]
	    then
		if mycp $DEFAULTS/auth-up /etc/ppp/.
		then
		   echo "Installed new config file /etc/ppp/auth-up ."
		   if [ $done -eq 0 ]
		   then	done=1
		   else	done=2
		   fi
		else
		   echo "Existing /etc/ppp/auth-up not overwritten."
		fi
	    fi
	    if [ -d /etc/ppp -a ! -e /etc/ppp/auth-down ]
	    then
		if mycp $DEFAULTS/auth-down /etc/ppp/.
		then
		   echo "Installed new config file /etc/ppp/auth-down ."
		   if [ $done -eq 0 ]
		   then	done=1
		   else	done=2
		   fi
		else
		   echo "Existing /etc/ppp/auth-down not overwritten."
		fi
	    fi
	    chmod +x /etc/ppp/ip-*.d/isdnutils /etc/ppp/auth-* 2> /dev/null || true
	    if [ $done -eq 1 ]
	    then
		create_warning
	    else
		if [ $done -gt 1 ]
		then
		    create_2_warning
		fi
	    fi
	else
	    echo "Interface name not found."
	    echo -n "Press [Enter] "
	    read dummy
	fi
    fi
}

config_modem() {
    if test -e /etc/isdn/iprofd.data
    then
	echo -n '
Isdnutils configuration modem emulation
======================= ---------------

Data File for iprofd (/etc/isdn/iprofd.data) already created.
If iprofd is running, you can save the settings of your modem emulation
with any terminal program (e.g. minicom) with "AT&W".

Press [Enter] '
	read dummy
    else
	touch /etc/isdn/iprofd.data
	clear
	echo "Isdnutils configuration modem emulation"
	echo "======================= ---------------"
	echo -n "
Data File for iprofd (/etc/isdn/iprofd.data) installed.
If iprofd is running, you can save the settings of your modem emulation
with any terminal program (e.g. minicom) with \"AT&W\".

Press [Enter] "
	read dummy
    fi
}

config_vbox() {
    clear
    echo "Isdnutils configuration vbox"
    echo "======================= ----"
    echo ""
    echo "Installing example configuration files ... "
    INSTALL=false
#??#    for FILE in vboxd.conf vboxgetty.conf; do
    for FILE in vboxd.conf; do
#	if test -e /etc/isdn/$FILE
#	then
#	    echo "$FILE	already installed."
#	else
	    if mycp $DEFAULTS/$FILE /etc/isdn/$FILE; then
		echo "$FILE	installed."
		INSTALL=true
	    fi
	    chmod 600 /etc/isdn/vboxd.conf
	    chown root /etc/isdn/vboxd.conf
#	fi
    done
    if $INSTALL
    then
	create_2_warning
	INSTALL=false
    fi
    echo ""
    echo "Note: for a single answering machine it's best to use the debconf setup."
    echo "      run 'dpkg-reconfigure isdnvboxserver' for that."
    echo ""
    echo "You can run several vboxgetty with different MSN's."
    echo "Edit /etc/inittab to start the vboxgetty, and edit "
    echo "/etc/isdn/vboxgetty.conf to assign each MSN to a user."
    echo "Each user needs his own spool directory."

    echo "Searching for existing spool directories..."
    users=
    for A in `ls -d /var/spool/vbox/* 2> /dev/null`; do
	test -e $A && users="$users `basename $A`"
    done
    test -z "$users" && users=NONE
    echo "Found : $users"
    echo ""

    echo "I need the login name of the user (e.g. aj), not the full name."
    echo -n "Create new spool directory for user : "
    read user dummy
    if test -n "$user"
    then
	if getent passwd $user > /dev/null
	then
	    mkdir /var/spool/vbox/$user
	    mkdir /var/spool/vbox/$user/messages
	    mkdir /var/spool/vbox/$user/incoming
	    mycp $DEFAULTS/vbox.conf /var/spool/vbox/$user/ &&
		echo "Installed new config file /var/spool/vbox/$user/vbox.conf"
	    mycp $DEFAULTS/standard.tcl /var/spool/vbox/$user/ &&
		echo "Installed new config file /var/spool/vbox/$user/standard.tcl"
	    mycp $DEFAULTS/beep.msg /var/spool/vbox/$user/messages/ &&
		echo "Installed default sound file /var/spool/vbox/$user/messages/beep.msg"
	    mycp $DEFAULTS/standard.msg /var/spool/vbox/$user/messages/ &&
		echo "Installed default sound file /var/spool/vbox/$user/messages/standard.msg"
	    usergrp=`id -gn $user`
	    chown -Rv $user.$usergrp /var/spool/vbox/$user
	    INSTALL=true
	else
	    echo "User $user doesn't exist."
	fi
    fi
    if $INSTALL
    then
	create_2_warning
    else
	no_create
    fi
}

while true; do
    config_main
done