# $NetBSD: rc.conf.emuimage,v 1.1 2021/07/24 16:13:44 jmcneill 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.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 } 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