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