mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 17:12:46 +00:00
02b1ae96c2
r284660: Remove the Azure-local vm_extra_create_disk(), since we no longer need qemu-img to convert the final VHD image to an Azure-compatible format. Although the waagent utility is installed from ports, create the symlink to /usr/sbin, pending investigation on where this is hard-coded, so it can be reported upstream. r284676: Append the hour and minute to the snapshot suffix for EC2 AMIs and Azure VM images. This is particularly helpful for testing to avoid name collisions, but also useful for cases where a necessary rebuild is done before the date changes. Sponsored by: The FreeBSD Foundation
30 lines
857 B
Bash
30 lines
857 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# Set to a list of packages to install.
|
|
# Example:
|
|
#export VM_EXTRA_PACKAGES="www/apache24"
|
|
export VM_EXTRA_PACKAGES="sysutils/azure-agent"
|
|
|
|
# Set to a list of third-party software to enable in rc.conf(5).
|
|
# Example:
|
|
#export VM_RC_LIST="apache24"
|
|
export VM_RC_LIST=
|
|
|
|
vm_extra_pre_umount() {
|
|
chroot ${DESTDIR} ln -s /usr/local/sbin/waagent /usr/sbin/waagent
|
|
chroot ${DESTDIR} /usr/local/sbin/waagent -verbose -install
|
|
yes | chroot ${DESTDIR} /usr/local/sbin/waagent -deprovision
|
|
echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf
|
|
echo 'ifconfig_hn0="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf
|
|
echo 'waagent_enable="YES"' >> ${DESTDIR}/etc/rc.conf
|
|
echo 'console="comconsole vidconsole"' >> ${DESTDIR}/boot/loader.conf
|
|
echo 'comconsole_speed="115200"' >> ${DESTDIR}/boot/loader.conf
|
|
|
|
rm -f ${DESTDIR}/etc/resolv.conf
|
|
|
|
return 0
|
|
}
|