echo "* Setting up sudo configuration for user vagrant"
echo "vagrant ALL=(ALL) NOPASSWD: ALL" > ${TARGET}/etc/sudoers.d/vagrant
+host="$(cat ${TARGET}/etc/hostname)"
+if ! grep -q "${host}$" "${TARGET}"/etc/hosts ; then
+ echo "* Setting up localhost entry for hostname $host in /etc/hosts"
+ cat >> "${TARGET}"/etc/hosts << EOF
+# Added by grml-debootstrap/provision to make sure host is resolvable for sudo:
+127.0.0.2 ${host}.local $host
+
+EOF
+fi
+
+echo "* Setting up stdin/tty workaround in /root/.profile"
+sed -i "s;^mesg n$;# modified via grml-debootstrap/provision script to work around stdin/tty issue:\ntty -s \&\& mesg n;g" "${TARGET}"/root/.profile
+
if [ -f ${TARGET}/etc/ssh/sshd_config ] && ! grep -q '^UseDNS' ${TARGET}/etc/ssh/sshd_config ; then
echo "* Disabling UseDNS in sshd config"
echo "UseDNS no" >> ${TARGET}/etc/ssh/sshd_config
fi
+echo "* Logging build information to /etc/grml_debootstrap.info"
+echo "System generated by grml-debootstrap/provision on $(date)" > ${TARGET}/etc/grml_debootstrap.info
+
echo "* Cleaning up apt stuff"
chroot ${TARGET} apt-get clean
rm -f ${TARGET}/var/lib/apt/lists/*Packages \