# $NetBSD: rc.conf.emuimage,v 1.2.2.1 2023/10/02 13:26:04 martin Exp $ is_ec2() { val=NO # Look for the string "amazon" in one of these sysctl nodes for node in machdep.dmi.system-vendor \ machdep.dmi.system-version \ machdep.dmi.bios-version \ machdep.dmi.system-product \ machdep.xen.version ; do if /sbin/sysctl -q $node; then nodeval="$(/sbin/sysctl -n $node | tr '[A-Z]' '[a-z]')" case "$nodeval" in *amazon*) val=YES ;; # OpenStack is not EC2 but it does have a metadata service. *openstack*) val=YES ;; esac fi done printf $val } certctl_init=YES resize_disklabel=YES resize_root=YES resize_root_flags="-p" resize_root_postcmd="/sbin/reboot -n" dhcpcd=YES sshd=YES ec2_init=$(is_ec2) if checkyesno ec2_init; then dhcpcd_flags="$dhcpcd_flags -w" fi