config is in nbd-server 1:3.13-1.
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 | #!/bin/bash
# load the library
. /usr/share/debconf/confmodule
[ -f /etc/nbd-server ] && . /etc/nbd-server
[ -f /etc/nbd-server.oldconf ] && . /etc/nbd-server.oldconf
# clean up on incorrect exit
# XXX not sure what this is supposed to do... is the in-run flag a
# debconf feature, or did I just forget to handle it later on?
trap 'db_fset nbd-server/number in-run false; exit 1' 1 2 15
if [ "$AUTO_GEN"x = "nx" ]
then
db_input critical nbd-server/autogen
db_go
else
i=0
while [ ! -z ${NBD_FILE[$i]} ]
do
i=$(( $i + 1 ))
done
if [ $i -gt 0 ]
then
db_set nbd-server/number $i
fi
db_input medium nbd-server/number
db_go
db_get nbd-server/number
NUMBER=${RET:-0}
db_beginblock
if [ $NUMBER -eq 0 ]
then
# The user didn't see the question, or isn't interested in
# running nbd-server from the initscript.
exit 0
fi
for i in $(seq 0 $(( $NUMBER - 1)) )
do
if [ $i -eq 0 ]
then
unset i
else
db_register nbd-server/filename nbd-server/filename$i
db_register nbd-server/name nbd-server/name$i
fi
db_subst nbd-server/filename$i number $(( $i + 0 ))
db_subst nbd-server/name$i number $(( $i + 0 ))
if [ ! -z ${NBD_FILE[$(( $i + 0 ))]} ]
then
db_set nbd-server/filename$i ${NBD_FILE[$(( $i + 0 ))]}
fi
if [ ! -z ${NBD_NAME[$(( $i + 0 ))]} ]
then
db_set nbd-server/name$i ${NBD_NAME[$(( $i + 0 ))]}
fi
db_beginblock
db_input medium nbd-server/filename$i
db_input medium nbd-server/name$i
db_endblock
done
db_endblock
db_go
fi
|