1ea070051SEmmanuel Vadot#!/bin/sh 2ea070051SEmmanuel Vadot# 3ea070051SEmmanuel Vadot# 4ea070051SEmmanuel Vadot 5ea070051SEmmanuel Vadot# Should be enough for base image, image can be resized in needed 6*fa04db47SGlen Barberexport VMSIZE=5g 7ea070051SEmmanuel Vadot 8ea070051SEmmanuel Vadot# Set to a list of third-party software to enable in rc.conf(5). 9ea070051SEmmanuel Vadotexport VM_RC_LIST="sshd growfs" 10ea070051SEmmanuel Vadot 11ea070051SEmmanuel Vadotvm_extra_pre_umount() { 12ea070051SEmmanuel Vadot cat << EOF >> ${DESTDIR}/etc/rc.conf 13ea070051SEmmanuel Vadotdumpdev="AUTO" 14ea070051SEmmanuel Vadotifconfig_DEFAULT="DHCP" 15ea070051SEmmanuel Vadotsshd_enable="YES" 16ea070051SEmmanuel VadotEOF 17ea070051SEmmanuel Vadot 18ea070051SEmmanuel Vadot cat << EOF >> ${DESTDIR}/boot/loader.conf 19ea070051SEmmanuel Vadotautoboot_delay="-1" 20ea070051SEmmanuel Vadotbeastie_disable="YES" 21ea070051SEmmanuel Vadotloader_logo="none" 22ea070051SEmmanuel Vadotconsole="comconsole,vidconsole" 23ea070051SEmmanuel VadotEOF 24ea070051SEmmanuel Vadot cat <<EOF >> ${DESTDIR}/etc/ssh/sshd_config 25ea070051SEmmanuel VadotPermitRootLogin yes 26ea070051SEmmanuel VadotPasswordAuthentication yes 27ea070051SEmmanuel VadotPermitEmptyPasswords yes 28ea070051SEmmanuel VadotUsePAM no 29ea070051SEmmanuel VadotEOF 30ea070051SEmmanuel Vadot 31ea070051SEmmanuel Vadot touch ${DESTDIR}/firstboot 32ea070051SEmmanuel Vadot 33ea070051SEmmanuel Vadot return 0 34ea070051SEmmanuel Vadot} 35