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