mirror of
https://github.com/opnsense/src.git
synced 2026-02-16 00:58:21 -05:00
- Add the firstboot-freebsd-update package, as long as we do not have pkgbase, this is needed - Support SLAAC by default to complement DHCPv4 (use SYNCDHP instead) Signed-off-by: Jose Luis Duran <jlduran@gmail.com> (cherry picked from commit 120740221fd4a4577e63e6c279f9873cabe449d0)
39 lines
955 B
Bash
39 lines
955 B
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"
|
|
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
|
|
PasswordAuthentication yes
|
|
UsePAM no
|
|
EOF
|
|
|
|
touch ${DESTDIR}/firstboot
|
|
|
|
return 0
|
|
}
|