mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 23:32:52 -04:00
For images that don't require QEMU, support NO_ROOT. This entails: - Passing NO_ROOT down to mk-vmimage.sh (which sets it for installworld, etc) - Handling etcupdate bootstrapping - Adding assorted config file METALOG entries - Running makefs in the right directory and adding -D for dups The main gap in basic NO_ROOT support is package installation. Each image type must also be updated to add METALOG entries for any files it adds. Reviewed by: emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D49320
36 lines
664 B
Bash
36 lines
664 B
Bash
#!/bin/sh
|
|
#
|
|
#
|
|
|
|
# Should be enough for base image, image can be resized in needed
|
|
export VMSIZE=5g
|
|
|
|
# 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
|
|
metalog_add_data ./boot/loader.conf
|
|
|
|
cat <<EOF >> ${DESTDIR}/etc/ssh/sshd_config
|
|
PermitRootLogin yes
|
|
PasswordAuthentication yes
|
|
PermitEmptyPasswords yes
|
|
UsePAM no
|
|
EOF
|
|
|
|
touch_firstboot
|
|
|
|
return 0
|
|
}
|