2 # Set to a list of packages to install.
3 export VM_EXTRA_PACKAGES="
23 sysutils/firstboot-freebsd-update
24 sysutils/firstboot-pkgs
29 # Should be enough for base image, image can be resized in needed
32 # Set to a list of third-party software to enable in rc.conf(5).
36 firstboot_freebsd_update
43 vm_extra_pre_umount() {
44 cat <<-'EOF' >> ${DESTDIR}/etc/rc.conf
49 cat <<-'EOF' >> ${DESTDIR}/boot/loader.conf
55 opensolaris_load="YES"
60 cat <<-'EOF' >> ${DESTDIR}/etc/ssh/sshd_config
61 # S11 Configure the SSH service to prevent password-based login
62 PermitRootLogin prohibit-password
63 PasswordAuthentication no
64 KbdInteractiveAuthentication no
65 PermitEmptyPasswords no
69 # S14 Root user login must be disabled on serial-over-ssh console
70 pw -R ${DESTDIR} usermod root -w no
71 # OCI requirements override the default FreeBSD cloud-init settings
72 cat <<-'EOF' >> ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_oci.cfg
79 gecos: "OCI Default User"
81 sudo: ["ALL=(ALL) NOPASSWD:ALL"]
84 renderers: ['freebsd']
87 # Use Oracle Cloud Infrastructure NTP server
88 sed -i '' -E -e 's/^pool.*iburst/server 169.254.169.254 iburst/' \
89 ${DESTDIR}/etc/ntp.conf
91 touch ${DESTDIR}/firstboot
93 if ! [ -z "${QEMUSTATIC}" ]; then
94 rm -f ${DESTDIR}/${EMULATOR}
96 rm -f ${DESTDIR}/etc/resolv.conf