Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

# $NetBSD: rc.conf.emuimage,v 1.2 2022/07/13 18:51:03 hgutch 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
}

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