Commit dd04c33a authored by Alessandro Elias's avatar Alessandro Elias

Merge branch 'issue/495' into 'develop'

SCRUM#495: Improve overlay creation process

See merge request !8
parents acd35ab1 27169e74
SHORTNAME=le6
TMP=/home/lucas/tmp/${_DIST}/
TMP=/home/lucas/${_DIST}/
CHROOTDIR=/home/lucas/create-iso/overlay
OVERLAY=/home/lucas/tmp
CHROOTFILE=${TMP}/todo.sh
DISTRO=Linux_Educacional_6.1.0
DPLIST=${PREFIX}/pkg-list/${_DIST}/dependencies.list
......
......@@ -78,7 +78,7 @@ sudo apt-get install syslinux squashfs-tools genisoimage xorriso \
for file in $(ls ${SCRIPTSDIR}); do
if [ -x "${SCRIPTSDIR}/${file}" ] && egrep -q '^[0-9]{2}-[a-z-]+' <<< "$file"; then
echo "$file"
if ! "${SCRIPTSDIR}/${file}" ${_DIST} ${CHROOTDIR} ${CHROOTFILE} ${DISTRO} ${DPLIST} ${INSTLIST} ${ISOLINUX} ${MOUNTLIST} ${OURSOURCESLIST} ${RMDSKT} ${RMLIST} ${SCRIPTSDIR} ${SHORTNAME} ${SOURCESLISTDEFAULT} ${TMP} ${_ARCH}; then
if ! "${SCRIPTSDIR}/${file}" ${_DIST} ${_ARCH} ${CHROOTDIR} ${CHROOTFILE} ${DISTRO} ${DPLIST} ${INSTLIST} ${ISOLINUX} ${MOUNTLIST} ${OURSOURCESLIST} ${RMDSKT} ${RMLIST} ${SCRIPTSDIR} ${SHORTNAME} ${SOURCESLISTDEFAULT} ${TMP} ${OVERLAY}; then
log ERROR "While running \"${SCRIPTSDIR}/${file}\""
fi
fi
......
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
source ${PREFIX}/common.sh
......
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
source ${PREFIX}/common.sh
......
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
source ${PREFIX}/common.sh
......
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
source ${PREFIX}/common.sh
......
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
source ${PREFIX}/common.sh
......
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
source common.sh
......
......@@ -21,27 +21,27 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
OVERLAY=$(mktemp --suffix \-overlay --directory)
mkdir --mode=0700 --parents "${OVERLAY}/upper"
mkdir --mode=0700 --parents "${OVERLAY}/work"
mkdir --mode=0700 ${CHROOTDIR}
mkdir "${OVERLAY}/upper"
mkdir "${OVERLAY}/work"
mkdir ${CHROOTDIR}
if [ ! -d "${OVERLAY}" ]; then
echo "overlay path: '${OVERLAY}' has not been found."
......@@ -64,11 +64,13 @@ if [ ! -d "${PREFIX}/chroot" ]; then
exit 1
fi
if ! mount -t overlay overlay -o rw,lowerdir="${PREFIX}/chroot",upperdir="${OVERLAY}"/upper,workdir="${OVERLAY}"/work "${CHROOTDIR}"; then
echo "Overlay could not be mounted:" >&2
echo " lowerdir: '${PREFIX}/chroot'" >&2
echo " upperdir: '${OVERLAY}/upper'" >&2
echo " workdir: '${OVERLAY}/work'" >&2
echo "mount point: '${CHROOTDIR}'" >&2
exit 1
if ! mountpoint ${CHROOTDIR}; then
if ! mount -t overlay overlay -o rw,lowerdir="${PREFIX}/chroot",upperdir="${OVERLAY}"/upper,workdir="${OVERLAY}"/work "${CHROOTDIR}"; then
echo "Overlay could not be mounted:" >&2
echo " lowerdir: '${PREFIX}/chroot'" >&2
echo " upperdir: '${OVERLAY}/upper'" >&2
echo " workdir: '${OVERLAY}/work'" >&2
echo "mount point: '${CHROOTDIR}'" >&2
exit 1
fi
fi
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
source common.sh
......
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
export PREFIX=$PWD
source common.sh
......
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
source ${PREFIX}/common.sh
......
......@@ -21,22 +21,24 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
if test -z ${CHROOTDIR}; then
echo "Variavel CHROOTDIR vazia!!"
echo "CHROOTDIR=\"${CHROOTDIR}\""
......
......@@ -21,21 +21,22 @@
# USA.
_DIST=$1
CHROOTDIR=$2
CHROOTFILE=$3
DISTRO=$4
DPLIST=$5
INSTLIST=$6
ISOLINUX=$7
MOUNTLIST=$8
OURSOURCESLIST=$9
RMDSKT=${10}
RMLIST=${11}
SCRIPTSDIR=${12}
SHORTNAME=${13}
SOURCESLISTDEFAULT=${14}
TMP=${15}
_ARCH=${16}
_ARCH=$2
CHROOTDIR=$3
CHROOTFILE=$4
DISTRO=$5
DPLIST=$6
INSTLIST=$7
ISOLINUX=$8
MOUNTLIST=$9
OURSOURCESLIST=${10}
RMDSKT=${11}
RMLIST=${12}
SCRIPTSDIR=${13}
SHORTNAME=${14}
SOURCESLISTDEFAULT=${15}
TMP=${16}
OVERLAY=${17}
PREFIX=$PWD
source ${PREFIX}/common.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment