/usr/share/tcos/hooks-addons/99tcos is in initramfs-tools-tcos 0.89.86.
This file is owned by root:root, with mode 0o644.
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 | # save generated date and version into tcos.conf
if [ -f /etc/tcos/version.conf ]; then
cat /etc/tcos/version.conf >> ${DESTDIR}/conf/tcos.conf
fi
# load forced settings for derivatives
if [ -d $CONFDIR/conf.d/ ]; then
for file in $CONFDIR/conf.d/tcos*conf; do
[ -e $file ] && cat $file >> ${DESTDIR}/conf/tcos.conf
done
fi
tcos_date=$(LANG=C LC_ALL=C date)
echo "# date of image" >> ${DESTDIR}/conf/tcos.conf
echo "TCOS_DATE=\"${tcos_date}\"" >> ${DESTDIR}/conf/tcos.conf
echo "" >> ${DESTDIR}/conf/tcos.conf
# export some vars
echo "" >> ${DESTDIR}/conf/tcos.conf
echo "# some environment vars" >> ${DESTDIR}/conf/tcos.conf
echo "export XAUTHORITY=/root/.Xauthority" >> ${DESTDIR}/conf/tcos.conf
echo "export HOME=/root" >> ${DESTDIR}/conf/tcos.conf
echo "export DISPLAY=:0" >> ${DESTDIR}/conf/tcos.conf
echo "export PATH=/bin:/sbin:/usr/bin:/usr/sbin" >> ${DESTDIR}/conf/tcos.conf
# set aufs if kernel is greater than 2.6.26
echo "$TCOS_KERNEL" | awk -F"-" '{print $1}' | awk -F"." '{if($3>26) print "TCOS_UNIONFS=aufs"; else print "TCOS_UNIONFS=unionfs"}' >> ${DESTDIR}/conf/tcos.conf
cat << EOF > $DESTDIR/etc/issue
TCOS $TCOS_VERSION \n \l
EOF
# reduce /dev tmpfs size to 5Mb
if [ -e $DESTDIR/init ]; then
sed -i '/tmpfs_size/s/"10M"/"5M"/g' $DESTDIR/init
fi
if [ -e $DESTDIR/etc/udev/udev.conf ]; then
sed -i '/tmpfs_size/s/"10M"/"5M"/g' $DESTDIR/etc/udev/udev.conf
fi
|