svn commit: r325491 - in stable: 10/release/tools 11/release/tools
Glen Barber
gjb at FreeBSD.org
Mon Nov 6 18:07:25 UTC 2017
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/11/release/tools/vmimage.subr
Directory Properties:
stable/11/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/10/release/tools/vmimage.subr
Directory Properties:
stable/10/ (props changed)
Modified: stable/11/release/tools/vmimage.subr
==============================================================================
--- stable/11/release/tools/vmimage.subr Mon Nov 6 17:59:04 2017 (r325490)
+++ stable/11/release/tools/vmimage.subr Mon Nov 6 18:07:23 2017 (r325491)
@@ -140,6 +140,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
More information about the svn-src-stable-11
mailing list