This file is indexed.

config is in dtc-xen 0.5.17-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
 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
#!/bin/sh

set -e

action=$1
version=$2

. /usr/share/debconf/confmodule
db_version 2.0

# Get the values from files if they exist (as the user might have modified
# them). Note that we also source old configuration files for backward
# compatibility purposes, but these old files will be removed by the
# postinst script.
# We source dtc-xen.conf first, to give priority to the old configuration
# files that will anyway be deleted after the first upgrade.
if [ -f /etc/dtc-xen/dtc-xen.conf ] ; then
	. /etc/dtc-xen/dtc-xen.conf
fi
if [ -f /etc/dtc-xen/dtc_create_vps.conf.sh ] ; then
	. /etc/dtc-xen/dtc_create_vps.conf.sh
fi
if [ -f /etc/dtc-xen/soap.conf ] ; then
	. /etc/dtc-xen/soap.conf
fi

# Set the debconf values according to what was saved in the config files
if [ ! -z "${soap_server_dtcxen_user}" ] ; then
	db_set dtc-xen/conf_soap_login ${soap_server_dtcxen_user}
fi
if [ ! -z "${NETMASK}" ] ; then
	db_set dtc-xen/conf_netmask ${NETMASK}
fi
if [ ! -z "${BROADCAST}" ] ; then
	db_set dtc-xen/conf_broadcast ${BROADCAST}
fi
if [ ! -z "${GATEWAY}" ] ; then
	db_set dtc-xen/conf_gateway ${GATEWAY}
fi
if [ ! -z "${LVMNAME}" ] ; then
	db_set dtc-xen/conf_lvm_name ${LVMNAME}
fi
if [ ! -z "${VPS_MOUNTPOINT}" ] ; then
	db_set dtc-xen/conf_vps_mountpoint ${VPS_MOUNTPOINT}
fi
if [ ! -z "${debian_release}" ] ; then
	db_set dtc-xen/conf_debian_release ${debian_release}
fi
if [ ! -z "${debian_repo}" ] ; then
	db_set dtc-xen/conf_debian_repository ${debian_repo}
fi
if [ ! -z "${KERNEL_RELEASE}" ] ; then
	db_set dtc-xen/conf_linux_kernel_name ${KERNEL_RELEASE}
fi

# Try to assign guessed values of the network setup that we find in the dom0
# making the assemption that it's going to be what to be used for the VPSes.
db_get dtc-xen/conf_gateway
if [ -z "${RET}" ] ; then
	GUESSED_GW=`LC_ALL=C route -n | tail -n 1 | awk '{print $2}'`
	if [ ! -z "${GUESSED_GW}" ] ; then
		db_set dtc-xen/conf_gateway ${GUESSED_GW}
	fi
fi
db_get dtc-xen/conf_netmask
if [ -z "${RET}" ] ; then
	GUESSED_MASK=`LC_ALL=C route -n | tail -n 2 | head -n 1 | awk '{print $3}'`
	if [ ! -z "${GUESSED_MASK}" ] ; then
		db_set dtc-xen/conf_netmask ${GUESSED_MASK}
	fi
fi
db_get dtc-xen/conf_broadcast
if [ -z "${RET}" ] ; then
	GUESSED_BRCAST=`LC_ALL=C ipcalc ${GUESSED_NET}/${GUESSED_MASK} | grep Broadcast | awk '{print $2}'`
	if [ ! -z "${GUESSED_BRCAST}" ] ; then
		db_set dtc-xen/conf_broadcast ${GUESSED_BRCAST}
	fi
fi

# Attempt to guess even more: kernel release name and initrd image filename
GUESSED_KERN=`uname -r`
db_get dtc-xen/conf_linux_kernel_name
if [ -z "${RET}" ] ; then
	db_set dtc-xen/conf_linux_kernel_name ${GUESSED_KERN}
fi
db_get dtc-xen/conf_linux_domu_initrd
if [ -z "${RET}" ] ; then
	db_set dtc-xen/conf_linux_domu_initrd initrd.img-${GUESSED_KERN}
fi
# Attempt to find the LVM VG volume
db_get dtc-xen/conf_lvm_name
if [ -z "${RET}" ] ; then
	GUESSED_VGNAME=`vgdisplay -c -A | tail -n 1 | cut -d":" -f1 | awk '{print $1}'`
	db_set dtc-xen/conf_lvm_name ${GUESSED_VGNAME}
fi

db_input low dtc-xen/conf_soap_login || true
db_input high dtc-xen/conf_soap_pass || true
db_input medium dtc-xen/conf_debian_repository || true
db_input medium dtc-xen/conf_debian_release || true
db_input low dtc-xen/conf_netmask || true
db_input low dtc-xen/conf_network || true
db_input low dtc-xen/conf_gateway || true
db_input low dtc-xen/conf_broadcast || true
db_input low dtc-xen/conf_linux_kernel_name || true
db_input low dtc-xen/conf_linux_domu_initrd || true
db_input low dtc-xen/conf_lvm_name || true
db_input low dtc-xen/conf_vps_mountpoint || true
db_input high dtc-xen/conf_info_finish_setup || true
db_go

exit 0;