Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (44 sloc) 2.11 KB
#!/bin/sh
#
# $FreeBSD: releng/11.0/release/tools/openstack.conf 277458 2015-01-20
# 23:56:04Z gjb $
#
# Set to a list of packages to install.
export VM_EXTRA_PACKAGES="net/cloud-init
devel/py-pbr devel/py-iso8601 \
net/py-eventlet net/py-netaddr comms/py-serial devel/py-six \
devel/py-babel net/py-oauth net/py-netifaces"
# Set to a list of third-party software to enable in rc.conf(5).
export VM_RC_LIST="cloudinit"
export NOSWAP=YES
vm_extra_pre_umount() {
#env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg
#rm ${DESTDIR}/var/db/pkg/repo-*.sqlite
echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf
# Enable sshd by default
echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf
# Disable DNS lookups by default to make SSH connect quickly
echo 'UseDNS no' >> ${DESTDIR}/etc/ssh/sshd_config
echo 'PermitRootLogin without-password' >>
${DESTDIR}/etc/ssh/sshd_config
# Enable DHCP for the OpenStack instance
echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf
# Disable sendmail
echo 'sendmail_enable="NO"' >> ${DESTDIR}/etc/rc.conf
echo 'sendmail_submit_enable="NO"' >> ${DESTDIR}/etc/rc.conf
echo 'sendmail_outbound_enable="NO"' >> ${DESTDIR}/etc/rc.conf
echo 'sendmail_msp_queue_enable="NO"' >> ${DESTDIR}/etc/rc.conf
# Openstack wants sudo(8) usable by default without a password.
echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> \
${DESTDIR}/usr/local/etc/sudoers.d/cloud-init
rm -f ${DESTDIR}/etc/resolv.conf
# The console is not interactive, so we might as well boot quickly.
echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf
echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf
# Reboot quickly, Don't wait at the panic screen
echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf
echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/etc/sysctl.conf
echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/etc/sysctl.conf
touch ${DESTDIR}/firstboot
return 0
}