83952a5baa
This is useful for adding extra packages to the build of an AMI. For example: env VM_EXTRA_PACKAGES="zsh" make -C release ec2ami Approved by: gjb MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
30 lines
878 B
Bash
30 lines
878 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# Set to a list of packages to install.
|
|
# Example:
|
|
#export VM_EXTRA_PACKAGES="www/apache24"
|
|
export VM_EXTRA_PACKAGES="${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
|
|
}
|