diff --git a/distrib/evbarm/liveimage/armimage/Makefile b/distrib/evbarm/liveimage/armimage/Makefile index 479fde2a68d7..420bf9daa805 100644 --- a/distrib/evbarm/liveimage/armimage/Makefile +++ b/distrib/evbarm/liveimage/armimage/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2021/07/23 21:53:34 jmcneill Exp $ +# $NetBSD: Makefile,v 1.2 2021/07/24 14:00:08 jmcneill Exp $ LIVEIMGBASE= NetBSD-${DISTRIBVER}-${MACHINE_ARCH}-live # gives ${IMGBASE}.img @@ -10,13 +10,9 @@ IMAGEHOSTNAME= netbsd FILESDIR!= cd ${.CURDIR}/../../../utils/embedded/files ; pwd SPEC_EXTRA= ${.CURDIR}/spec.armimage +RC_CONF_EXTRA= ${.CURDIR}/rc.conf.armimage IMGFILE_EXTRA= \ ${FILESDIR}/ec2_init etc/rc.d/ec2_init \ - ${FILESDIR}/resize_gpt etc/rc.d/resize_gpt \ - ${.CURDIR}/dhcpcd etc/rc.conf.d/dhcpcd \ - ${.CURDIR}/ec2_init etc/rc.conf.d/ec2_init \ - ${.CURDIR}/resize_gpt etc/rc.conf.d/resize_gpt \ - ${.CURDIR}/resize_root etc/rc.conf.d/resize_root \ - ${.CURDIR}/sshd etc/rc.conf.d/sshd + ${FILESDIR}/resize_gpt etc/rc.d/resize_gpt .include "${.CURDIR}/../Makefile.liveimage" diff --git a/distrib/evbarm/liveimage/armimage/dhcpcd b/distrib/evbarm/liveimage/armimage/dhcpcd deleted file mode 100644 index 4032e284cc01..000000000000 --- a/distrib/evbarm/liveimage/armimage/dhcpcd +++ /dev/null @@ -1,3 +0,0 @@ -# $NetBSD: dhcpcd,v 1.1 2021/07/23 21:53:34 jmcneill Exp $ - -dhcpcd=YES diff --git a/distrib/evbarm/liveimage/armimage/ec2_init b/distrib/evbarm/liveimage/armimage/rc.conf.armimage similarity index 65% rename from distrib/evbarm/liveimage/armimage/ec2_init rename to distrib/evbarm/liveimage/armimage/rc.conf.armimage index 2dfdc23760e8..b8ecfca185cf 100644 --- a/distrib/evbarm/liveimage/armimage/ec2_init +++ b/distrib/evbarm/liveimage/armimage/rc.conf.armimage @@ -1,4 +1,4 @@ -# $NetBSD: ec2_init,v 1.1 2021/07/23 21:53:34 jmcneill Exp $ +# $NetBSD: rc.conf.armimage,v 1.1 2021/07/24 14:00:08 jmcneill Exp $ is_ec2() { val=NO @@ -23,9 +23,14 @@ is_ec2() { printf $val } -# Don't override /etc/rc.conf -if [ -z "$ec2_init" ] -then - ec2_init=$(is_ec2) -fi +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 diff --git a/distrib/evbarm/liveimage/armimage/resize_gpt b/distrib/evbarm/liveimage/armimage/resize_gpt deleted file mode 100644 index 0151473065e0..000000000000 --- a/distrib/evbarm/liveimage/armimage/resize_gpt +++ /dev/null @@ -1,3 +0,0 @@ -# $NetBSD: resize_gpt,v 1.1 2021/07/23 21:53:34 jmcneill Exp $ - -resize_gpt=YES diff --git a/distrib/evbarm/liveimage/armimage/resize_root b/distrib/evbarm/liveimage/armimage/resize_root deleted file mode 100644 index 917664de704f..000000000000 --- a/distrib/evbarm/liveimage/armimage/resize_root +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: resize_root,v 1.1 2021/07/23 21:53:34 jmcneill Exp $ - -resize_root=YES -resize_root_flags="-p" -resize_root_postcmd="/sbin/reboot -n" diff --git a/distrib/evbarm/liveimage/armimage/spec.armimage b/distrib/evbarm/liveimage/armimage/spec.armimage index c7e7cd4df0f0..dc55f5c351a4 100644 --- a/distrib/evbarm/liveimage/armimage/spec.armimage +++ b/distrib/evbarm/liveimage/armimage/spec.armimage @@ -1,8 +1,3 @@ -# $NetBSD: spec.armimage,v 1.1 2021/07/23 21:53:34 jmcneill Exp $ -./etc/rc.conf.d/dhcpcd type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/ec2_init type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/resize_gpt type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/resize_root type=file mode=0644 uname=root gname=wheel -./etc/rc.conf.d/sshd type=file mode=0644 uname=root gname=wheel +# $NetBSD: spec.armimage,v 1.2 2021/07/24 14:00:08 jmcneill Exp $ ./etc/rc.d/ec2_init type=file mode=0555 uname=root gname=wheel ./etc/rc.d/resize_gpt type=file mode=0555 uname=root gname=wheel diff --git a/distrib/evbarm/liveimage/armimage/sshd b/distrib/evbarm/liveimage/armimage/sshd deleted file mode 100644 index 040f644f627e..000000000000 --- a/distrib/evbarm/liveimage/armimage/sshd +++ /dev/null @@ -1,3 +0,0 @@ -# $NetBSD: sshd,v 1.1 2021/07/23 21:53:34 jmcneill Exp $ - -sshd=YES