head 1.4; access; symbols netbsd-10-0-RELEASE:1.2.2.1 netbsd-10-0-RC6:1.2.2.1 netbsd-10-0-RC5:1.2.2.1 netbsd-10-0-RC4:1.2.2.1 netbsd-10-0-RC3:1.2.2.1 netbsd-10-0-RC2:1.2.2.1 netbsd-10-0-RC1:1.2.2.1 netbsd-10:1.2.0.2 netbsd-10-base:1.2; locks; strict; comment @# @; 1.4 date 2024.04.16.16.13.44; author maya; state Exp; branches; next 1.3; commitid 8IJJt2mC9agKZn6F; 1.3 date 2023.09.27.00.24.12; author riastradh; state Exp; branches; next 1.2; commitid k45BHG3lHtqEflGE; 1.2 date 2022.07.13.18.51.03; author hgutch; state Exp; branches 1.2.2.1; next 1.1; commitid Wgv0dGfD9URSwLLD; 1.1 date 2021.07.24.16.13.44; author jmcneill; state Exp; branches; next ; commitid 36XpynWpd3BF3g2D; 1.2.2.1 date 2023.10.02.13.26.04; author martin; state Exp; branches; next ; commitid 1NCiH2r23TKUp3HE; desc @@ 1.4 log @restore amd64 live image support for resize root after combined mbr/gpt commit we need to resize_gpt now, as it takes precedence over mbr/disklabel this change brings us to behave like the evbarm images. XXX: we don't seem to touch disklabel and MBR, but they exist. Not sure whether that has any negative repercussions, maybe another system might regard MBR as the sole source of truth when GPT also exists. @ text @# $NetBSD: rc.conf.emuimage,v 1.3 2023/09/27 00:24:12 riastradh 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_gpt=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 @ 1.3 log @/etc/rc.d/cerctl_init: New script for certctl rehash in live images. This is very limited -- it does not supplant postinstall to rehash certificates on upgrade; it only runs certctl rehash if /etc/openssl/certs is an empty directory, as you get in live images not created with sysinst. We could also have a more general-purpose way to run postinstall(8) on first boot of an image, but that has a lot more moving parts to think about, so let's start with this limited-scope low-risk approach. PR install/57629 XXX pullup-10 @ text @d1 1 a1 1 # $NetBSD: rc.conf.emuimage,v 1.2 2022/07/13 18:51:03 hgutch Exp $ d28 1 a28 1 resize_disklabel=YES @ 1.2 log @Check for right sysctl node to make live image work OOTB on OpenStack: machdep.dmi.system-product = OpenStack Compute @ text @d1 1 a1 1 # $NetBSD: rc.conf.emuimage,v 1.1 2021/07/24 16:13:44 jmcneill Exp $ d27 1 @ 1.2.2.1 log @Pull up following revision(s) (requested by riastradh in ticket #381): distrib/utils/embedded/conf/evbarm.conf: revision 1.42 distrib/sets/lists/etc/mi: revision 1.273 etc/rc.d/Makefile: revision 1.118 distrib/utils/embedded/conf/usermode.conf: revision 1.7 etc/rc.d/certctl_init: revision 1.1 distrib/evbarm/liveimage/armimage/rc.conf.armimage: revision 1.2 etc/defaults/rc.conf: revision 1.166 distrib/amd64/liveimage/emuimage/rc.conf.emuimage: revision 1.3 distrib/utils/embedded/conf/x86.conf: revision 1.11 distrib/utils/embedded/conf/evbmips.conf: revision 1.4 /etc/rc.d/cerctl_init: New script for certctl rehash in live images. This is very limited -- it does not supplant postinstall to rehash certificates on upgrade; it only runs certctl rehash if /etc/openssl/certs is an empty directory, as you get in live images not created with sysinst. We could also have a more general-purpose way to run postinstall(8) on first boot of an image, but that has a lot more moving parts to think about, so let's start with this limited-scope low-risk approach. PR install/57629 /etc/rc.d/certctl_init: Default off. Otherwise in systems without certctl_init=YES, such as systems installed with sysinst(8) where it's unnecessary because the rehash has already happened at install time, you'll get spurious warnings. @ text @d1 1 a1 1 # $NetBSD: rc.conf.emuimage,v 1.2 2022/07/13 18:51:03 hgutch Exp $ a26 1 certctl_init=YES @ 1.1 log @amd64: liveimage: use RC_CONF_EXTRA instead of rc.conf.d @ text @d1 1 a1 1 # $NetBSD: rc.conf.armimage,v 1.1 2021/07/24 14:00:08 jmcneill Exp $ d9 1 @