# 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