2020-11-02 21:10:49 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# Should be enough for base image, image can be resized in needed
|
2021-03-04 13:39:43 +00:00
|
|
|
export VMSIZE=5g
|
2020-11-02 21:10:49 +00:00
|
|
|
|
|
|
|
# Set to a list of third-party software to enable in rc.conf(5).
|
|
|
|
export VM_RC_LIST="sshd growfs"
|
|
|
|
|
|
|
|
vm_extra_pre_umount() {
|
|
|
|
cat << EOF >> ${DESTDIR}/etc/rc.conf
|
|
|
|
dumpdev="AUTO"
|
|
|
|
ifconfig_DEFAULT="DHCP"
|
|
|
|
sshd_enable="YES"
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat << EOF >> ${DESTDIR}/boot/loader.conf
|
|
|
|
autoboot_delay="-1"
|
|
|
|
beastie_disable="YES"
|
|
|
|
loader_logo="none"
|
|
|
|
console="comconsole,vidconsole"
|
|
|
|
EOF
|
|
|
|
cat <<EOF >> ${DESTDIR}/etc/ssh/sshd_config
|
|
|
|
PermitRootLogin yes
|
|
|
|
PasswordAuthentication yes
|
|
|
|
PermitEmptyPasswords yes
|
|
|
|
UsePAM no
|
|
|
|
EOF
|
|
|
|
|
|
|
|
touch ${DESTDIR}/firstboot
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|