From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1158550-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 2A6AF138350
	for <garchives@archives.gentoo.org>; Fri,  3 Apr 2020 07:48:28 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0BC73E0C24;
	Fri,  3 Apr 2020 07:48:25 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id DEA1CE0C24
	for <gentoo-commits@lists.gentoo.org>; Fri,  3 Apr 2020 07:48:24 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 6A8BC34EDF3
	for <gentoo-commits@lists.gentoo.org>; Fri,  3 Apr 2020 07:48:23 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 69C5C1BF
	for <gentoo-commits@lists.gentoo.org>; Fri,  3 Apr 2020 07:48:19 +0000 (UTC)
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" <mattst88@gentoo.org>
Message-ID: <1585900065.cdc73ec88d9cb199c2376fcc9c49102e0962ceb0.mattst88@gentoo>
Subject: [gentoo-commits] proj/catalyst:master commit in: targets/stage4/, targets/embedded/, targets/netboot2/, targets/livecd-stage2/
X-VCS-Repository: proj/catalyst
X-VCS-Files: targets/embedded/controller.sh targets/livecd-stage2/controller.sh targets/netboot2/controller.sh targets/stage4/controller.sh
X-VCS-Directories: targets/stage4/ targets/embedded/ targets/netboot2/ targets/livecd-stage2/
X-VCS-Committer: mattst88
X-VCS-Committer-Name: Matt Turner
X-VCS-Revision: cdc73ec88d9cb199c2376fcc9c49102e0962ceb0
X-VCS-Branch: master
Date: Fri,  3 Apr 2020 07:48:19 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: ea33a317-19ee-4468-8f51-94738ee74ced
X-Archives-Hash: 70413b636e0c29801a72f74a2ce21e04

commit:     cdc73ec88d9cb199c2376fcc9c49102e0962ceb0
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  3 05:24:14 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr  3 07:47:45 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=cdc73ec8

targets: Use copy_to_chroot() more places

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 targets/embedded/controller.sh      |  8 +++-----
 targets/livecd-stage2/controller.sh |  7 ++-----
 targets/netboot2/controller.sh      | 13 ++++---------
 targets/stage4/controller.sh        |  8 ++++----
 4 files changed, 13 insertions(+), 23 deletions(-)

diff --git a/targets/embedded/controller.sh b/targets/embedded/controller.sh
index 7a2b59ab..7e33ed49 100755
--- a/targets/embedded/controller.sh
+++ b/targets/embedded/controller.sh
@@ -42,11 +42,9 @@ case ${1} in
 	kernel)
 		shift
 		export clst_kname="${1}"
-		# if we have our own linuxrc, copy it in
-		if [ -n "${clst_linuxrc}" ]
-		then
-			cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
-		fi
+
+		[ -n "${clst_linuxrc}" ] && \
+			copy_to_chroot ${clst_linuxrc} /tmp/linuxrc
 		exec_in_chroot ${clst_shdir}/support/kmerge.sh
 		delete_from_chroot /tmp/linuxrc
 	;;

diff --git a/targets/livecd-stage2/controller.sh b/targets/livecd-stage2/controller.sh
index 5ae268f8..f9bc7b7e 100755
--- a/targets/livecd-stage2/controller.sh
+++ b/targets/livecd-stage2/controller.sh
@@ -18,11 +18,8 @@ case $1 in
 		shift
 		export clst_kname="$1"
 
-		# if we have our own linuxrc, copy it in
-		if [ -n "${clst_linuxrc}" ]
-		then
-			cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
-		fi
+		[ -n "${clst_linuxrc}" ] && \
+			copy_to_chroot ${clst_linuxrc} /tmp/linuxrc
 		exec_in_chroot ${clst_shdir}/support/kmerge.sh
 		delete_from_chroot /tmp/linuxrc
 

diff --git a/targets/netboot2/controller.sh b/targets/netboot2/controller.sh
index a5bb498c..89bb149d 100755
--- a/targets/netboot2/controller.sh
+++ b/targets/netboot2/controller.sh
@@ -27,15 +27,10 @@ case ${1} in
 		shift
 		export clst_kname="$1"
 
-		# if we have our own linuxrc, copy it in
-		if [ -n "${clst_linuxrc}" ]
-		then
-			cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
-		fi
-		if [ -n "${clst_busybox_config}" ]
-		then
-			cp ${clst_busybox_config} ${clst_chroot_path}/tmp/busy-config
-		fi
+		[ -n "${clst_linuxrc}" ] && \
+			copy_to_chroot ${clst_linuxrc} /tmp/linuxrc
+		[ -n "${clst_busybox_config}" ] && \
+			copy_to_chroot ${clst_busybox_config} /tmp/busy-config
 
 		exec_in_chroot ${clst_shdir}/support/kmerge.sh
 

diff --git a/targets/stage4/controller.sh b/targets/stage4/controller.sh
index cac1212d..85db8c1b 100755
--- a/targets/stage4/controller.sh
+++ b/targets/stage4/controller.sh
@@ -22,13 +22,13 @@ case $1 in
 	kernel)
 		shift
 		export clst_kname="$1"
+
 		# If we have our own linuxrc, copy it in
-		if [ -n "${clst_linuxrc}" ]
-		then
-			cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
-		fi
+		[ -n "${clst_linuxrc}" ] && \
+			copy_to_chroot ${clst_linuxrc} /tmp/linuxrc
 		exec_in_chroot ${clst_shdir}/support/kmerge.sh
 		delete_from_chroot /tmp/linuxrc
+
 		extract_modules ${clst_chroot_path} ${clst_kname}
 		# Do we need this one?
 #		extract_kernel ${clst_chroot_path}/boot ${clst_kname}