summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2014-03-31 10:37:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-01 23:37:01 +0100
commit30959dda952b602b75bbd58ef225bbe4558ce440 (patch)
tree076de5444dd447ee2d9cd8c3eb86b73e65194905 /meta
parent7f1495092742a4df74047667a1c61f03169937ec (diff)
downloadpoky-30959dda952b602b75bbd58ef225bbe4558ce440.tar.gz
image.bbclass: add function to disable SSH DNS Lookup for Qemu
This function disables the reverse DNS lookup on QEMU targets to reduce the delay when using static IP address. By disabling DNS lookup we can save a great deal of time during automated testing on the autobuilder (on the order of ~400 seconds per ssh tranaction). This is seen when using the testimage, there is a delay getting logged-in from the server to target. It's enabled for all qemu imgaes by default and can be overridden by setting the SSH_DISABLE_DNS_LOOKUP variable. [YOCTO #5954] (From OE-Core rev: c93eeecb15c4acac9226a3394c93d7e99a809d6b) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/image.bbclass10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 29309f55cb..ea035fe144 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -304,6 +304,16 @@ ssh_allow_empty_password () {
304 fi 304 fi
305} 305}
306 306
307# Disable DNS lookups, the SSH_DISABLE_DNS_LOOKUP can be overridden to allow
308# distros to choose not to take this change
309SSH_DISABLE_DNS_LOOKUP ?= " ssh_disable_dns_lookup ; "
310ROOTFS_POSTPROCESS_COMMAND_append_qemuall = "${SSH_DISABLE_DNS_LOOKUP}"
311ssh_disable_dns_lookup () {
312 if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
313 sed -i -e 's:#UseDNS yes:UseDNS no:' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
314 fi
315}
316
307# Enable postinst logging if debug-tweaks is enabled 317# Enable postinst logging if debug-tweaks is enabled
308postinst_enable_logging () { 318postinst_enable_logging () {
309 mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/default 319 mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/default