Date: Mon, 6 Nov 2017 18:07:23 +0000 (UTC) From: Glen Barber <gjb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r325491 - in stable: 10/release/tools 11/release/tools Message-ID: <201711061807.vA6I7Nh9006060@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gjb Date: Mon Nov 6 18:07:23 2017 New Revision: 325491 URL: https://svnweb.freebsd.org/changeset/base/325491 Log: MFC r325156: Set a default hostname for virtual machine images. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/vmimage.subr Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/tools/vmimage.subr Directory Properties: stable/11/ (props changed) Modified: stable/10/release/tools/vmimage.subr ============================================================================== --- stable/10/release/tools/vmimage.subr Mon Nov 6 17:59:04 2017 (r325490) +++ stable/10/release/tools/vmimage.subr Mon Nov 6 18:07:23 2017 (r325491) @@ -134,6 +134,10 @@ vm_install_base() { >> ${DESTDIR}/etc/fstab fi + local hostname + hostname="$(echo $(uname -o) | tr '[:upper:]' '[:lower:]')" + echo "hostname=\"${hostname}\"" >> ${DESTDIR}/etc/rc.conf + mkdir -p ${DESTDIR}/dev mount -t devfs devfs ${DESTDIR}/dev chroot ${DESTDIR} /usr/bin/newaliases
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711061807.vA6I7Nh9006060>