Commit 8f3c8051 authored by Daniel Bissani Furlin's avatar Daniel Bissani Furlin

SCRUM#495: Add parameters to functions in overlay.sh and mktmpfs.sh

parent 87aa45c4
......@@ -21,6 +21,8 @@
# USA.
mountTmpfs() {
local TMPFS=$1
if mount | grep -q ${TMPFS}; then
return 1
fi
......@@ -33,6 +35,7 @@ mountTmpfs() {
}
umountTmpfs() {
local TMPFS=$1
if mountpoint -q ${TMPFS}; then
umount ${TMPFS}
fi
......
......@@ -21,6 +21,10 @@
# USA.
mountOverlay() {
local CHROOTDIR=$1
local TMPFS=$2
local PREFIX=$(pwd)
mkdir -p "${TMPFS}/upper"
mkdir -p "${TMPFS}/work"
mkdir -p ${CHROOTDIR}
......@@ -59,6 +63,8 @@ mountOverlay() {
}
umountOverlay() {
local CHROOTDIR=$1
local TMPFS=$2
if mountpoint -q ${CHROOTDIR}; then
umount ${CHROOTDIR}
fi
......
......@@ -75,8 +75,8 @@ source lib/overlay.sh
sudo apt-get install syslinux squashfs-tools genisoimage xorriso \
|| log ERROR "Failed to install basic tools: \"${_DIST}\""
mountTmpfs
mountOverlay
mountTmpfs ${TMPFS}
mountOverlay ${CHROOTDIR} ${TMPFS}
mkdir -p ${TMP}
for file in $(ls ${SCRIPTSDIR}); do
......@@ -97,7 +97,7 @@ sudo xorriso -as mkisofs -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -c isolin
cd -
cleanTmpFiles
umountOverlay
umountTmpfs
umountOverlay ${CHROOTDIR} ${TMPFS}
umountTmpfs ${TMPFS}
exit 0
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