From a8923c743a367f838ad9c047c9af5035fa577c10 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Thu, 13 Mar 2014 09:59:42 -0500
Subject: [PATCH] cleanup: distro -> deb_distribution conversion

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 RootStock-NG.sh          |  2 +-
 beagleboard.org_image.sh | 16 +++++++++-------
 eewiki_barefs_image.sh   | 18 ++++++++++--------
 eewiki_base_image.sh     | 18 ++++++++++--------
 generic_image.sh         | 22 +++++++++++-----------
 rcn-ee_image.sh          | 18 ++++++++++--------
 rcn-ee_test_image.sh     | 18 ++++++++++--------
 releases.sh              |  2 +-
 scripts/chroot.sh        | 38 ++++++++++++++++++++------------------
 scripts/debootstrap.sh   |  8 ++++----
 10 files changed, 86 insertions(+), 74 deletions(-)

diff --git a/RootStock-NG.sh b/RootStock-NG.sh
index b2cb6ea24..67d8acfb8 100755
--- a/RootStock-NG.sh
+++ b/RootStock-NG.sh
@@ -66,7 +66,7 @@ run_project () {
 		tempdir="${tempdir}"
 		export_filename="${export_filename}"
 
-		distro="${distro}"
+		deb_distribution="${deb_distribution}"
 		release="${release}"
 		dpkg_arch="${dpkg_arch}"
 
diff --git a/beagleboard.org_image.sh b/beagleboard.org_image.sh
index d524394a0..ac69e1e9c 100755
--- a/beagleboard.org_image.sh
+++ b/beagleboard.org_image.sh
@@ -79,16 +79,16 @@ minimal_armel () {
 	case "${release}" in
 	wheezy)
 		#http://www.debian.org/releases/wheezy/
-		export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	quantal)
-		export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	saucy)
-		export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	*)
-		export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	esac
 
@@ -101,7 +101,7 @@ minimal_armel () {
 		tempdir="${tempdir}"
 		export_filename="${export_filename}"
 
-		distro="${distro}"
+		deb_distribution="${deb_distribution}"
 		release="${release}"
 		dpkg_arch="${dpkg_arch}"
 		time="${time}"
@@ -285,8 +285,9 @@ pkg_list () {
 }
 
 is_ubuntu () {
+	deb_distribution="ubuntu"
+
 	rfs_hostname="beaglebone"
-	distro="ubuntu"
 	rfs_username="ubuntu"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
@@ -298,8 +299,9 @@ is_ubuntu () {
 }
 
 is_debian () {
+	deb_distribution="debian"
+
 	rfs_hostname="beaglebone"
-	distro="debian"
 	rfs_username="debian"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
diff --git a/eewiki_barefs_image.sh b/eewiki_barefs_image.sh
index 8e78d7cd5..ed76947ef 100755
--- a/eewiki_barefs_image.sh
+++ b/eewiki_barefs_image.sh
@@ -40,16 +40,16 @@ minimal_armel () {
 	case "${release}" in
 	wheezy)
 		#http://www.debian.org/releases/wheezy/
-		export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	quantal)
-		export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	saucy)
-		export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	*)
-		export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	esac
 
@@ -59,7 +59,7 @@ minimal_armel () {
 		tempdir="${tempdir}"
 		export_filename="${export_filename}"
 
-		distro="${distro}"
+		deb_distribution="${deb_distribution}"
 		release="${release}"
 		dpkg_arch="${dpkg_arch}"
 		time="${time}"
@@ -134,7 +134,7 @@ production () {
 	if [ -f ${DIR}/release ] ; then
 		if [ "x${SYST}" = "x${RELEASE_HOST}" ] ; then
 			if [ -d /mnt/farm/testing/pending/ ] ; then
-				cp -v arm*.tar /mnt/farm/images/
+				cp -v arm*.tar /mnt/farm/images/ || true
 				actual_dir="/mnt/farm/testing/pending"
 			fi
 		fi
@@ -175,8 +175,9 @@ pkg_list () {
 }
 
 is_ubuntu () {
+	deb_distribution="ubuntu"
+
 	rfs_hostname="arm"
-	distro="ubuntu"
 	rfs_username="ubuntu"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
@@ -188,8 +189,9 @@ is_ubuntu () {
 }
 
 is_debian () {
+	deb_distribution="debian"
+
 	rfs_hostname="arm"
-	distro="debian"
 	rfs_username="debian"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
diff --git a/eewiki_base_image.sh b/eewiki_base_image.sh
index 54335ec0e..69cbf5a60 100755
--- a/eewiki_base_image.sh
+++ b/eewiki_base_image.sh
@@ -41,16 +41,16 @@ minimal_armel () {
 	case "${release}" in
 	wheezy)
 		#http://www.debian.org/releases/wheezy/
-		export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	quantal)
-		export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	saucy)
-		export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	*)
-		export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	esac
 
@@ -60,7 +60,7 @@ minimal_armel () {
 		tempdir="${tempdir}"
 		export_filename="${export_filename}"
 
-		distro="${distro}"
+		deb_distribution="${deb_distribution}"
 		release="${release}"
 		dpkg_arch="${dpkg_arch}"
 		time="${time}"
@@ -135,7 +135,7 @@ production () {
 	if [ -f ${DIR}/release ] ; then
 		if [ "x${SYST}" = "x${RELEASE_HOST}" ] ; then
 			if [ -d /mnt/farm/testing/pending/ ] ; then
-				cp -v arm*.tar /mnt/farm/images/
+				cp -v arm*.tar /mnt/farm/images/ || true
 				actual_dir="/mnt/farm/testing/pending"
 			fi
 		fi
@@ -178,8 +178,9 @@ pkg_list () {
 }
 
 is_ubuntu () {
+	deb_distribution="ubuntu"
+
 	rfs_hostname="arm"
-	distro="ubuntu"
 	rfs_username="ubuntu"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
@@ -191,8 +192,9 @@ is_ubuntu () {
 }
 
 is_debian () {
+	deb_distribution="debian"
+
 	rfs_hostname="arm"
-	distro="debian"
 	rfs_username="debian"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
diff --git a/generic_image.sh b/generic_image.sh
index dd9b0f2fc..ca2b00d9b 100755
--- a/generic_image.sh
+++ b/generic_image.sh
@@ -45,7 +45,7 @@ run_rootstock () {
 		tempdir="${tempdir}"
 		export_filename="${export_filename}"
 
-		distro="${distro}"
+		deb_distribution="${deb_distribution}"
 		release="${release}"
 		dpkg_arch="${dpkg_arch}"
 		time="${time}"
@@ -83,18 +83,18 @@ if [ -f ${DIR}/circuitco.host ] ; then
 	. ${DIR}/host/circuitco-host.sh
 fi
 
-if [ ! "${distro}" ] ; then
-	##Selects which base distro
-	distro="debian"
-	#distro="ubuntu"
+if [ ! "${deb_distribution}" ] ; then
+	##Selects which base deb_distribution
+	deb_distribution="debian"
+	#deb_distribution="ubuntu"
 fi
 if [ ! "${release}" ] ; then
-	if [ "x${distro}" = "xdebian" ] ; then
+	if [ "x${deb_distribution}" = "xdebian" ] ; then
 		release="wheezy"
 		#release="jessie"
 		#release="sid"
 	fi
-	if [ "x${distro}" = "xubuntu" ] ; then
+	if [ "x${deb_distribution}" = "xubuntu" ] ; then
 		#release="precise"
 		#release="quantal"
 		#release="raring"
@@ -104,11 +104,11 @@ if [ ! "${release}" ] ; then
 fi
 if [ ! "${dpkg_arch}" ] ; then
 	##Selects which base archtecture
-	if [ "x${distro}" = "xdebian" ] ; then
+	if [ "x${deb_distribution}" = "xdebian" ] ; then
 		dpkg_arch="armhf"
 		#dpkg_arch="armel"
 	fi
-	if [ "x${distro}" = "xubuntu" ] ; then
+	if [ "x${deb_distribution}" = "xubuntu" ] ; then
 		dpkg_arch="armhf"
 	fi
 fi
@@ -118,10 +118,10 @@ if [ ! "${image_name}" ] ; then
 fi
 if [ ! "${export_filename}" ] ; then
 	##Generic file name
-	export_filename="${distro}-${release}-${image_name}-${dpkg_arch}-${time}"
+	export_filename="${deb_distribution}-${release}-${image_name}-${dpkg_arch}-${time}"
 fi
 rfs_hostname=${rfs_hostname:-"arm"}
-rfs_username=${rfs_username:-"${distro}"}
+rfs_username=${rfs_username:-"${deb_distribution}"}
 rfs_password=${rfs_password:-"temppwd"}
 rfs_fullname=${rfs_fullname:-"Demo User"}
 
diff --git a/rcn-ee_image.sh b/rcn-ee_image.sh
index 0e67fbdb5..5098b039e 100755
--- a/rcn-ee_image.sh
+++ b/rcn-ee_image.sh
@@ -44,16 +44,16 @@ minimal_armel () {
 	case "${release}" in
 	wheezy)
 		#http://www.debian.org/releases/wheezy/
-		export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	quantal)
-		export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	saucy)
-		export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	*)
-		export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	esac
 
@@ -69,7 +69,7 @@ minimal_armel () {
 		tempdir="${tempdir}"
 		export_filename="${export_filename}"
 
-		distro="${distro}"
+		deb_distribution="${deb_distribution}"
 		release="${release}"
 		dpkg_arch="${dpkg_arch}"
 		time="${time}"
@@ -149,7 +149,7 @@ production () {
 	if [ -f ${DIR}/release ] ; then
 		if [ "x${SYST}" = "x${RELEASE_HOST}" ] ; then
 			if [ -d /mnt/farm/testing/pending/ ] ; then
-				cp -v arm*.tar /mnt/farm/images/
+				cp -v arm*.tar /mnt/farm/images/ || true
 				actual_dir="/mnt/farm/testing/pending"
 			fi
 		fi
@@ -240,8 +240,9 @@ pkg_list () {
 }
 
 is_ubuntu () {
+	deb_distribution="ubuntu"
+
 	rfs_hostname="arm"
-	distro="ubuntu"
 	rfs_username="ubuntu"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
@@ -253,8 +254,9 @@ is_ubuntu () {
 }
 
 is_debian () {
+	deb_distribution="debian"
+
 	rfs_hostname="arm"
-	distro="debian"
 	rfs_username="debian"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
diff --git a/rcn-ee_test_image.sh b/rcn-ee_test_image.sh
index 2a1270283..1649e9b01 100755
--- a/rcn-ee_test_image.sh
+++ b/rcn-ee_test_image.sh
@@ -44,16 +44,16 @@ minimal_armel () {
 	case "${release}" in
 	wheezy)
 		#http://www.debian.org/releases/wheezy/
-		export_filename="${distro}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${wheezy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	quantal)
-		export_filename="${distro}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${quantal_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	saucy)
-		export_filename="${distro}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${saucy_release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	*)
-		export_filename="${distro}-${release}-${image_type}-${dpkg_arch}-${time}"
+		export_filename="${deb_distribution}-${release}-${image_type}-${dpkg_arch}-${time}"
 		;;
 	esac
 
@@ -69,7 +69,7 @@ minimal_armel () {
 		tempdir="${tempdir}"
 		export_filename="${export_filename}"
 
-		distro="${distro}"
+		deb_distribution="${deb_distribution}"
 		release="${release}"
 		dpkg_arch="${dpkg_arch}"
 		time="${time}"
@@ -149,7 +149,7 @@ production () {
 	if [ -f ${DIR}/release ] ; then
 		if [ "x${SYST}" = "x${RELEASE_HOST}" ] ; then
 			if [ -d /mnt/farm/testing/pending/ ] ; then
-				cp -v arm*.tar /mnt/farm/images/
+				cp -v arm*.tar /mnt/farm/images/ || true
 				actual_dir="/mnt/farm/testing/pending"
 			fi
 		fi
@@ -211,8 +211,9 @@ pkg_list () {
 }
 
 is_ubuntu () {
+	deb_distribution="ubuntu"
+
 	rfs_hostname="arm"
-	distro="ubuntu"
 	rfs_username="ubuntu"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
@@ -224,8 +225,9 @@ is_ubuntu () {
 }
 
 is_debian () {
+	deb_distribution="debian"
+
 	rfs_hostname="arm"
-	distro="debian"
 	rfs_username="debian"
 	rfs_password="temppwd"
 	rfs_fullname="Demo User"
diff --git a/releases.sh b/releases.sh
index 99078d734..d125d6cef 100644
--- a/releases.sh
+++ b/releases.sh
@@ -25,7 +25,7 @@ machinekit_release () {
 	#is_debian - inlined below with some changes
 
 	rfs_hostname="arm"
-	distro="debian"
+	deb_distribution="debian"
 	rfs_username="linuxcnc"
 	rfs_password="linuxcnc"
 	rfs_fullname="Tux Chipcutter"
diff --git a/scripts/chroot.sh b/scripts/chroot.sh
index 2c95d7bef..539e68b7a 100755
--- a/scripts/chroot.sh
+++ b/scripts/chroot.sh
@@ -37,8 +37,8 @@ check_defines () {
 		exit 1
 	fi
 
-	if [ ! "${distro}" ] ; then
-		echo "scripts/deboostrap_first_stage.sh: Error: distro undefined"
+	if [ ! "${deb_distribution}" ] ; then
+		echo "scripts/deboostrap_first_stage.sh: Error: deb_distribution undefined"
 		exit 1
 	fi
 
@@ -57,7 +57,7 @@ check_defines () {
 	fi
 
 	if [ ! "${deb_mirror}" ] ; then
-		case "${distro}" in
+		case "${deb_distribution}" in
 		debian)
 			deb_mirror="ftp.us.debian.org/debian/"
 			;;
@@ -68,7 +68,7 @@ check_defines () {
 	fi
 
 	if [ ! "${deb_components}" ] ; then
-		case "${distro}" in
+		case "${deb_distribution}" in
 		debian)
 			deb_components="main contrib non-free"
 			;;
@@ -83,7 +83,7 @@ check_defines () {
 		if [ "${user_name}" ] ; then
 			rfs_username="${user_name}"
 		else
-			rfs_username="${distro}"
+			rfs_username="${deb_distribution}"
 			echo "rfs_username: undefined using: [${rfs_username}]"
 		fi
 	fi
@@ -282,7 +282,7 @@ sudo mv /tmp/hosts ${tempdir}/etc/hosts
 echo "${rfs_hostname}" > /tmp/hostname
 sudo mv /tmp/hostname ${tempdir}/etc/hostname
 
-case "${distro}" in
+case "${deb_distribution}" in
 debian)
 	sudo cp ${DIR}/target/init_scripts/generic-debian.sh ${tempdir}/etc/init.d/boot_scripts.sh
 	sudo cp ${DIR}/target/init_scripts/capemgr-debian.sh ${tempdir}/etc/init.d/capemgr.sh
@@ -290,6 +290,7 @@ debian)
 
 	#Backward compatibility, as setup_sdcard.sh expects [lsb_release -si > /etc/rcn-ee.conf]
 	echo "distro=Debian" > /tmp/rcn-ee.conf
+	echo "deb_distribution=Debian" > /tmp/rcn-ee.conf
 	echo "rfs_username=${rfs_username}" >> /tmp/rcn-ee.conf
 	echo "release_date=${time}" >> /tmp/rcn-ee.conf
 	echo "third_party_modules=${third_party_modules}" >> /tmp/rcn-ee.conf
@@ -326,6 +327,7 @@ ubuntu)
 
 	#Backward compatibility, as setup_sdcard.sh expects [lsb_release -si > /etc/rcn-ee.conf]
 	echo "distro=Ubuntu" > /tmp/rcn-ee.conf
+	echo "deb_distribution=Ubuntu" > /tmp/rcn-ee.conf
 	echo "rfs_username=${rfs_username}" >> /tmp/rcn-ee.conf
 	echo "release_date=${time}" >> /tmp/rcn-ee.conf
 	sudo mv /tmp/rcn-ee.conf ${tempdir}/etc/rcn-ee.conf
@@ -368,10 +370,10 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
 		EOF
 		chmod +x /usr/sbin/policy-rc.d
 
-		#set distro:
+		#set deb_distribution:
 		. /etc/rcn-ee.conf
 
-		if [ "x\${distro}" = "xUbuntu" ] ; then
+		if [ "x\${deb_distribution}" = "xUbuntu" ] ; then
 			dpkg-divert --local --rename --add /sbin/initctl
 			ln -s /bin/true /sbin/initctl
 		fi
@@ -428,7 +430,7 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
 
 		if [ "x\${pkg_is_not_installed}" = "x" ] ; then
 
-			case "\${distro}" in
+			case "\${deb_distribution}" in
 			Debian)
 				echo "Log: (chroot) Debian: setting up locales: [en_US.UTF-8]"
 				sed -i -e 's:# en_US.UTF-8 UTF-8:en_US.UTF-8 UTF-8:g' /etc/locale.gen
@@ -575,7 +577,7 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
 
 		useradd -G "\${default_groups}" -s /bin/bash -m -p \${pass_crypt} -c "${rfs_fullname}" ${rfs_username}
 
-		case "\${distro}" in
+		case "\${deb_distribution}" in
 		Debian)
 			echo "default username:password is [${rfs_username}:${rfs_password}]" >> /etc/issue
 			echo "" >> /etc/issue
@@ -628,7 +630,7 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
 	}
 
 	startup_script () {
-		case "\${distro}" in
+		case "\${deb_distribution}" in
 		Debian)
 			debian_startup_script
 			;;
@@ -669,7 +671,7 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
 
 		rm -f /usr/sbin/policy-rc.d
 
-		if [ "x\${distro}" = "xUbuntu" ] ; then
+		if [ "x\${deb_distribution}" = "xUbuntu" ] ; then
 			rm -f /sbin/initctl || true
 			dpkg-divert --local --rename --remove /sbin/initctl
 		fi
@@ -843,20 +845,20 @@ if [ "x${chroot_COPY_SETUP_SDCARD}" = "xenable" ] ; then
 fi
 
 if [ "x${chroot_ENABLE_DEB_SRC}" = "xenable" ] ; then
-	echo "Log: packaging src files: [${dpkg_arch}-rootfs-${distro}-${release}-${time}-src.tar]"
+	echo "Log: packaging src files: [${dpkg_arch}-rootfs-${deb_distribution}-${release}-${time}-src.tar]"
 	cd ${tempdir}/tmp/pkg_src/
-	sudo LANG=C tar --numeric-owner -cf ${DIR}/deploy/${dpkg_arch}-rootfs-${distro}-${release}-${time}-src.tar .
+	sudo LANG=C tar --numeric-owner -cf ${DIR}/deploy/${dpkg_arch}-rootfs-${deb_distribution}-${release}-${time}-src.tar .
 	cd ${tempdir}
-	ls -lh ${DIR}/deploy/${dpkg_arch}-rootfs-${distro}-${release}-${time}-src.tar
+	ls -lh ${DIR}/deploy/${dpkg_arch}-rootfs-${deb_distribution}-${release}-${time}-src.tar
 	sudo rm -rf ${tempdir}/tmp/pkg_src/ || true
 	report_size
 fi
 
 cd ${tempdir}
-echo "Log: packaging rootfs: [${dpkg_arch}-rootfs-${distro}-${release}.tar]"
-sudo LANG=C tar --numeric-owner -cf ${DIR}/deploy/${export_filename}/${dpkg_arch}-rootfs-${distro}-${release}.tar .
+echo "Log: packaging rootfs: [${dpkg_arch}-rootfs-${deb_distribution}-${release}.tar]"
+sudo LANG=C tar --numeric-owner -cf ${DIR}/deploy/${export_filename}/${dpkg_arch}-rootfs-${deb_distribution}-${release}.tar .
 cd ${DIR}/
-ls -lh ${DIR}/deploy/${export_filename}/${dpkg_arch}-rootfs-${distro}-${release}.tar
+ls -lh ${DIR}/deploy/${export_filename}/${dpkg_arch}-rootfs-${deb_distribution}-${release}.tar
 
 sudo chown -R ${USER}:${USER} ${DIR}/deploy/${export_filename}/
 #
diff --git a/scripts/debootstrap.sh b/scripts/debootstrap.sh
index 1a102f0bf..a618a39bb 100755
--- a/scripts/debootstrap.sh
+++ b/scripts/debootstrap.sh
@@ -30,8 +30,8 @@ check_defines () {
 		exit 1
 	fi
 
-	if [ ! "${distro}" ] ; then
-		echo "scripts/deboostrap_first_stage.sh: Error: distro undefined"
+	if [ ! "${deb_distribution}" ] ; then
+		echo "scripts/deboostrap_first_stage.sh: Error: deb_distribution undefined"
 		exit 1
 	fi
 
@@ -50,7 +50,7 @@ check_defines () {
 	fi
 
 	if [ ! "${deb_mirror}" ] ; then
-		case "${distro}" in
+		case "${deb_distribution}" in
 		debian)
 			deb_mirror="ftp.us.debian.org/debian/"
 			;;
@@ -79,7 +79,7 @@ report_size () {
 
 check_defines
 
-echo "Log: Creating: [${distro}] [${release}] image for: [${dpkg_arch}]"
+echo "Log: Creating: [${deb_distribution}] [${release}] image for: [${dpkg_arch}]"
 
 if [ "${apt_proxy}" ] ; then
 	echo "Log: using apt proxy: [${apt_proxy}]"
-- 
GitLab