Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/amd64/liveimage/emuimage amd64: liveimage: use RC_CO...
details: https://anonhg.NetBSD.org/src/rev/a70e761e7742
branches: trunk
changeset: 984809:a70e761e7742
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Jul 24 16:13:44 2021 +0000
description:
amd64: liveimage: use RC_CONF_EXTRA instead of rc.conf.d
diffstat:
distrib/amd64/liveimage/emuimage/Makefile | 10 +----
distrib/amd64/liveimage/emuimage/dhcpcd | 3 -
distrib/amd64/liveimage/emuimage/ec2_init | 31 -------------------
distrib/amd64/liveimage/emuimage/rc.conf.emuimage | 36 +++++++++++++++++++++++
distrib/amd64/liveimage/emuimage/resize_disklabel | 3 -
distrib/amd64/liveimage/emuimage/resize_root | 5 ---
distrib/amd64/liveimage/emuimage/spec.emuimage | 7 +---
distrib/amd64/liveimage/emuimage/sshd | 3 -
8 files changed, 40 insertions(+), 58 deletions(-)
diffs (143 lines):
diff -r 838b241437d6 -r a70e761e7742 distrib/amd64/liveimage/emuimage/Makefile
--- a/distrib/amd64/liveimage/emuimage/Makefile Sat Jul 24 15:56:05 2021 +0000
+++ b/distrib/amd64/liveimage/emuimage/Makefile Sat Jul 24 16:13:44 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2020/08/05 01:35:18 jmcneill Exp $
+# $NetBSD: Makefile,v 1.9 2021/07/24 16:13:44 jmcneill Exp $
LIVEIMGBASE= NetBSD-${DISTRIBVER}-amd64-live # gives ${IMGBASE}.img
@@ -10,13 +10,9 @@
FILESDIR!= cd ${.CURDIR}/../../../utils/embedded/files ; pwd
SPEC_EXTRA= ${.CURDIR}/spec.emuimage
+RC_CONF_EXTRA= ${.CURDIR}/rc.conf.emuimage
IMGFILE_EXTRA= \
${FILESDIR}/ec2_init etc/rc.d/ec2_init \
- ${FILESDIR}/resize_disklabel etc/rc.d/resize_disklabel \
- ${.CURDIR}/dhcpcd etc/rc.conf.d/dhcpcd \
- ${.CURDIR}/ec2_init etc/rc.conf.d/ec2_init \
- ${.CURDIR}/resize_disklabel etc/rc.conf.d/resize_disklabel \
- ${.CURDIR}/resize_root etc/rc.conf.d/resize_root \
- ${.CURDIR}/sshd etc/rc.conf.d/sshd
+ ${FILESDIR}/resize_disklabel etc/rc.d/resize_disklabel
.include "${.CURDIR}/../Makefile.liveimage"
diff -r 838b241437d6 -r a70e761e7742 distrib/amd64/liveimage/emuimage/dhcpcd
--- a/distrib/amd64/liveimage/emuimage/dhcpcd Sat Jul 24 15:56:05 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-# $NetBSD: dhcpcd,v 1.1 2020/08/05 01:35:18 jmcneill Exp $
-
-dhcpcd=YES
diff -r 838b241437d6 -r a70e761e7742 distrib/amd64/liveimage/emuimage/ec2_init
--- a/distrib/amd64/liveimage/emuimage/ec2_init Sat Jul 24 15:56:05 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-# $NetBSD: ec2_init,v 1.4 2021/07/20 19:27:51 rhialto 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
-}
-
-# Don't override /etc/rc.conf
-if [ -z "$ec2_init" ]
-then
- ec2_init=$(is_ec2)
-fi
-
diff -r 838b241437d6 -r a70e761e7742 distrib/amd64/liveimage/emuimage/rc.conf.emuimage
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/amd64/liveimage/emuimage/rc.conf.emuimage Sat Jul 24 16:13:44 2021 +0000
@@ -0,0 +1,36 @@
+# $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
diff -r 838b241437d6 -r a70e761e7742 distrib/amd64/liveimage/emuimage/resize_disklabel
--- a/distrib/amd64/liveimage/emuimage/resize_disklabel Sat Jul 24 15:56:05 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-# $NetBSD: resize_disklabel,v 1.1 2020/08/05 01:35:18 jmcneill Exp $
-
-resize_disklabel=YES
diff -r 838b241437d6 -r a70e761e7742 distrib/amd64/liveimage/emuimage/resize_root
--- a/distrib/amd64/liveimage/emuimage/resize_root Sat Jul 24 15:56:05 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-# $NetBSD: resize_root,v 1.1 2020/08/05 01:35:18 jmcneill Exp $
-
-resize_root=YES
-resize_root_flags="-p"
-resize_root_postcmd="/sbin/reboot -n"
diff -r 838b241437d6 -r a70e761e7742 distrib/amd64/liveimage/emuimage/spec.emuimage
--- a/distrib/amd64/liveimage/emuimage/spec.emuimage Sat Jul 24 15:56:05 2021 +0000
+++ b/distrib/amd64/liveimage/emuimage/spec.emuimage Sat Jul 24 16:13:44 2021 +0000
@@ -1,8 +1,3 @@
-# $NetBSD: spec.emuimage,v 1.1 2020/08/05 01:35:18 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_disklabel 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.emuimage,v 1.2 2021/07/24 16:13:44 jmcneill Exp $
./etc/rc.d/ec2_init type=file mode=0555 uname=root gname=wheel
./etc/rc.d/resize_disklabel type=file mode=0555 uname=root gname=wheel
diff -r 838b241437d6 -r a70e761e7742 distrib/amd64/liveimage/emuimage/sshd
--- a/distrib/amd64/liveimage/emuimage/sshd Sat Jul 24 15:56:05 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-# $NetBSD: sshd,v 1.1 2020/08/05 01:35:18 jmcneill Exp $
-
-sshd=YES
Home |
Main Index |
Thread Index |
Old Index