This file is indexed.

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

# This script is shared by almost all Unix distributions, it's a good idea to call it.

if [ -r /usr/share/dtc-xen/dtc-xen-parse-param ]; then
       . /usr/share/dtc-xen/dtc-xen-parse-param
else
       echo "dtc-xen_domUconf_standard: Fatal Error: Cannot read file /usr/share/dtc-xen/dtc-xen-parse-param. Exiting ..." && exit 1
fi

if [ "x$VPS_PATH" = "x" ]; then
       echo "dtc-xen_domUconf_standard: Fatal Error: VPS_PATH is not defined or empty. Exiting ..." && exit 1
fi

ETC=${VPS_PATH}/etc

if [ "${XEN_DOMU_HDD_DEV_TYPE}" = "xvd" ] ; then
	part_dev=xvda
	swap_dev=xvdb
else
	part_dev=sda1
	swap_dev=sda2
fi

# Setup the fstab
echo "/dev/${part_dev}	/	ext3	errors=remount-ro	0 0
proc		/proc	proc	defaults		0 0
/dev/${swap_dev}	none	swap	sw			0 0
none		/dev/pts devpts	defaults		0 0
" >${ETC}/fstab

# Tweaks the /etc/inittab to use the console device instead of tty1
if [ -f ${ETC}/inittab ] ; then
	sed -i "s/tty1/console/" ${ETC}/inittab
fi
# This one is for Ubuntu, yet it's not enough, since it's still not
# displaying at boot time (it does at shutdown though...)
if [ -f ${ETC}/init/tty1.conf ] ; then
	sed -i "s/tty1/console/" ${ETC}/init/tty1.conf
fi

# Setup hostname and hosts
echo "${VPS_FQDN}" >${ETC}/hostname
echo "127.0.0.1	localhost.localdomain localhost
${FIRST_IP} ${VPS_FQDN} ${VPS_DOMAIN}

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
" >${ETC}/hosts

# Setup the devices
mkdir -p ${VPS_PATH}/dev/
echo "Making VPS devices with MAKEDEV generic, this WILL take a while..."
OLDPWDDIR=`pwd`
cd ${VPS_PATH}/dev
/sbin/MAKEDEV generic
cd ${OLDPWDDIR}

# Fix the /dev/ptmx and /dev/pts device and folder
rm -rf ${VPS_PATH}/dev/ptmx ${VPS_PATH}/dev/pts
mknod ${VPS_PATH}/dev/ptmx c 5 2
chmod 666 ${VPS_PATH}/dev/ptmx
mkdir ${VPS_PATH}/dev/pts

# If we run on a non-debian non-64 bits system, disable the tls folder
FOUNDED_ARCH=`uname -m`
if [ $FOUNDED_ARCH = "i386" -o $FOUNDED_ARCH = "i486" -o $FOUNDED_ARCH = "i586" -o $FOUNDED_ARCH = "i686" ] ; then
	if ! [ -f ${VPS_PATH}/etc/debian_version ] ; then
		if [ -d "${VPS_PATH}/lib/tls" ] ; then
			echo "Disabling lib/tls"
			mv ${VPS_PATH}/lib/tls ${VPS_PATH}/lib/tls.disabled
		fi
	fi
fi

# Setup the kernel
echo "Installing kernel and modules..."
if [ ! -e ${VPS_PATH}/lib/modules ]; then
	$MKDIR -p ${VPS_PATH}/lib/modules
fi
echo "cp -auxf ${KMOD_PATH} ${VPS_PATH}/lib/modules"
cp -auxf ${KMOD_PATH} ${VPS_PATH}/lib/modules
cp -L ${KERNELPATH} ${VPS_PATH}/boot
if [ ! -e ${VPS_PATH}/boot/vmlinuz ] ; then
	ln -s ${KERNELPATH} ${VPS_PATH}/boot/vmlinuz
fi
echo "chroot ${VPS_PATH} /sbin/depmod -a ${KERNEL_RELEASE}"
chroot ${VPS_PATH} /sbin/depmod -a ${KERNEL_RELEASE}

# Copy an eventual /etc/dtc-xen/authorized_keys2 file
if [ -f /etc/dtc-xen/authorized_keys2 ] ; then
	if [ ! -d "${VPS_PATH}/root/.ssh" ] ; then
		mkdir -p "${VPS_PATH}/root/.ssh"
		chmod 700 "${VPS_PATH}/root/.ssh"
	fi
	if [ -d "${VPS_PATH}/root/.ssh" -a ! -e "${VPS_PATH}/root/.ssh/authorized_keys2" ] ; then
		cp /etc/dtc-xen/authorized_keys2 "${VPS_PATH}/root/.ssh/authorized_keys2"
		chmod 600 "${VPS_PATH}/root/.ssh/authorized_keys2"
	fi
	if [ -d "${VPS_PATH}/root/.ssh" -a ! -e "${VPS_PATH}/root/.ssh/authorized_keys" ] ; then
		cp /etc/dtc-xen/authorized_keys2 "${VPS_PATH}/root/.ssh/authorized_keys"
		chmod 600 "${VPS_PATH}/root/.ssh/authorized_keys"
	fi
fi

# Customize the /root/.bashrc script
sed "s/VPS_HOSTNAME/${VPS_FQDN}/" /etc/dtc-xen/bashrc >${VPS_PATH}/root/.bashrc

if [ ! -z "${LOCALE}" ] ; then
	LOCALESET="${LOCALE}"
else
	LOCALESET="en_US"
fi

if [ "${DISTRO}" = "debian" ] ; then
	if [ -f ${VPS_PATH}/etc/locale.gen ] ; then
		echo "Setting up Debian locale to en_US.UTF-8"
		TMP_FILE=`mktemp -t DTC_SET_LOCALE.XXXXXX` || exit 1
		grep -v "${LOCALESET}.UTF-8" ${VPS_PATH}/etc/locale.gen >${TMP_FILE}
		cat <${TMP_FILE} >${VPS_PATH}/etc/locale.gen
		rm ${TMP_FILE}
		echo "${LOCALESET}.UTF-8 UTF-8" >>${VPS_PATH}/etc/locale.gen
		chroot ${VPS_PATH} localedef -i ${LOCALESET} -c -f UTF-8 -A /usr/share/locale/locale.alias ${LOCALESET}.UTF-8
		chroot ${VPS_PATH} locale-gen
	fi
fi

exit 0