summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2014-11-21 02:30:37 +0000
committergjb <gjb@FreeBSD.org>2014-11-21 02:30:37 +0000
commit5074f8a73ef15d33d0e142de9376bc34ec07dbdf (patch)
tree095848fbc0b45e0fd18c4ed38d78e4dae959d827 /release
parent8b1726e8cc096e375dec775efc8fec7ce1e3dc84 (diff)
downloadFreeBSD-src-5074f8a73ef15d33d0e142de9376bc34ec07dbdf.zip
FreeBSD-src-5074f8a73ef15d33d0e142de9376bc34ec07dbdf.tar.gz
Revert r274773, after I *specifically* objected to this change
numerous times. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release')
-rw-r--r--release/tools/azure.conf5
-rw-r--r--release/tools/openstack.conf5
-rw-r--r--release/tools/vmimage.subr21
3 files changed, 19 insertions, 12 deletions
diff --git a/release/tools/azure.conf b/release/tools/azure.conf
index 46b678c..3e4a486 100644
--- a/release/tools/azure.conf
+++ b/release/tools/azure.conf
@@ -5,7 +5,7 @@
# Set to a list of packages to install.
# Example:
-#export VM_EXTRA_PACKAGES="www/apache24 ports-mgmt/pkg"
+#export VM_EXTRA_PACKAGES="www/apache24"
export VM_EXTRA_PACKAGES=
# Set to a list of third-party software to enable in rc.conf(5).
@@ -17,6 +17,7 @@ vm_extra_install_base() {
fetch -o ${DESTDIR}/usr/sbin/waagent \
http://people.freebsd.org/~gjb/waagent
chmod +x ${DESTDIR}/usr/sbin/waagent
+ rm -f ${DESTDIR}/etc/resolv.conf
return 0
}
@@ -32,6 +33,8 @@ vm_extra_pre_umount() {
echo 'console="comconsole vidconsole"' >> ${DESTDIR}/boot/loader.conf
echo 'comconsole_speed="115200"' >> ${DESTDIR}/boot/loader.conf
+ rm -f ${DESTDIR}/etc/resolv.conf
+
return 0
}
diff --git a/release/tools/openstack.conf b/release/tools/openstack.conf
index ed88ae2..3e0e857 100644
--- a/release/tools/openstack.conf
+++ b/release/tools/openstack.conf
@@ -4,7 +4,7 @@
#
# Set to a list of packages to install.
-export VM_EXTRA_PACKAGES="net/cloud-init ports-mgmt/pkg"
+export VM_EXTRA_PACKAGES="net/cloud-init"
# Set to a list of third-party software to enable in rc.conf(5).
export VM_RC_LIST="cloudinit"
@@ -13,6 +13,7 @@ vm_extra_install_base() {
fetch -o ${DESTDIR}/usr/sbin/waagent \
http://people.freebsd.org/~gjb/waagent
chmod +x ${DESTDIR}/usr/sbin/waagent
+ rm -f ${DESTDIR}/etc/resolv.conf
return 0
}
@@ -21,5 +22,7 @@ vm_extra_pre_umount() {
echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf
echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf
+ rm -f ${DESTDIR}/etc/resolv.conf
+
return 0
}
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 63e3906..c780572 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -90,6 +90,8 @@ vm_install_base() {
chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart
umount ${DESTDIR}/dev
+ cp /etc/resolv.conf ${DESTDIR}/etc/resolv.conf
+
return 0
}
@@ -112,18 +114,15 @@ vm_extra_enable_services() {
}
vm_extra_install_packages() {
+ mkdir -p ${DESTDIR}/dev
+ mount -t devfs devfs ${DESTDIR}/dev
+ chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \
+ /usr/sbin/pkg bootstrap -y
if [ ! -z "${VM_EXTRA_PACKAGES}" ]; then
- PKGSDIR=`mktemp -d`
- ABI=`/usr/sbin/pkg -c ${DESTDIR} config abi`
- /usr/sbin/pkg -o ABI=${ABI} fetch -o ${PKGSDIR} -d -y ${VM_EXTRA_PACKAGES}
- for PKG in ${PKGSDIR}/All/*; do
- /usr/sbin/pkg -c ${DESTDIR} add -M - < ${PKG}
- done
- rm -r ${PKGSDIR}
- if [ -z "${NOREPOSQLITE}" ]; then
- cp /var/db/pkg/repo-FreeBSD.sqlite ${DESTDIR}/var/db/pkg
- fi
+ chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \
+ /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES}
fi
+ umount ${DESTDIR}/dev
return 0
}
@@ -139,6 +138,8 @@ vm_extra_pre_umount() {
# Prototype. When overridden, installs additional ports within the
# virtual machine environment.
+ rm -f ${DESTDIR}/etc/resolv.conf
+
return 0
}
OpenPOWER on IntegriCloud