xref: /freebsd/release/tools/basic-cloudinit.conf (revision 59f5f100b774de8824fb2fc1a8a11a93bbc2dafd)
1#!/bin/sh
2
3# Should be enough for base image, image can be resized in needed
4export VMSIZE=5g
5
6# 1M config drive should be enough in most cases
7export CONFIG_DRIVE=YES
8export CONFIG_DRIVE_SIZE=1M
9
10# Packages to install into the image we're creating.
11# * firstboot-freebsd-update, to install security updates at first boot.
12export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} firstboot-freebsd-update"
13
14# Set to a list of third-party software to enable in rc.conf(5).
15export VM_RC_LIST="${VM_RC_LIST} firstboot_freebsd_update growfs sshd nuageinit"
16
17vm_extra_pre_umount() {
18	cat << EOF >> ${DESTDIR}/etc/rc.conf
19dumpdev="AUTO"
20ifconfig_DEFAULT="SYNCDHCP accept_rtadv"
21sshd_enable="YES"
22EOF
23
24	cat << EOF >> ${DESTDIR}/boot/loader.conf
25autoboot_delay="-1"
26beastie_disable="YES"
27loader_logo="none"
28console="comconsole,vidconsole"
29EOF
30
31	cat << EOF >> ${DESTDIR}/etc/ssh/sshd_config
32PasswordAuthentication yes
33UsePAM no
34EOF
35
36	touch ${DESTDIR}/firstboot
37
38	return 0
39}
40