These were forgotten during the METALOGization process earlier. Reviewed by: markj MFC after: immediately (for 15.0-RC2) Differential Revision: https://reviews.freebsd.org/D53795 (cherry picked from commit 86c63597f2dc7f89268d13a00c0dc7a74cca51d0)
39 lines
1 KiB
Bash
39 lines
1 KiB
Bash
#!/bin/sh
|
|
|
|
# Should be enough for base image, image can be resized in needed
|
|
export VMSIZE=5g
|
|
|
|
# 1M config drive should be enough in most cases
|
|
export CONFIG_DRIVE=YES
|
|
export CONFIG_DRIVE_SIZE=1M
|
|
|
|
# Packages to install into the image we're creating.
|
|
# * firstboot-freebsd-update, to install security updates at first boot.
|
|
export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} firstboot-freebsd-update"
|
|
|
|
# Set to a list of third-party software to enable in rc.conf(5).
|
|
export VM_RC_LIST="${VM_RC_LIST} firstboot_freebsd_update growfs sshd nuageinit"
|
|
|
|
vm_extra_pre_umount() {
|
|
cat << EOF >> ${DESTDIR}/etc/rc.conf
|
|
dumpdev="AUTO"
|
|
ifconfig_DEFAULT="SYNCDHCP accept_rtadv"
|
|
# RSA host keys are obsolete and also very slow to generate
|
|
sshd_rsa_enable="NO"
|
|
EOF
|
|
|
|
cat << EOF >> ${DESTDIR}/boot/loader.conf
|
|
autoboot_delay="-1"
|
|
beastie_disable="YES"
|
|
loader_logo="none"
|
|
console="comconsole,vidconsole"
|
|
EOF
|
|
metalog_add_data ./boot/loader.conf
|
|
|
|
cat << EOF >> ${DESTDIR}/etc/ssh/sshd_config
|
|
PasswordAuthentication yes
|
|
UsePAM no
|
|
EOF
|
|
|
|
return 0
|
|
}
|