Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
create-iso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
le6
create-iso
Commits
8f3c8051
Commit
8f3c8051
authored
May 02, 2018
by
Daniel Bissani Furlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SCRUM#495
: Add parameters to functions in overlay.sh and mktmpfs.sh
parent
87aa45c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
lib/mktmpfs.sh
lib/mktmpfs.sh
+3
-0
lib/overlay.sh
lib/overlay.sh
+6
-0
monta_image.sh
monta_image.sh
+4
-4
No files found.
lib/mktmpfs.sh
View file @
8f3c8051
...
...
@@ -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
...
...
lib/overlay.sh
View file @
8f3c8051
...
...
@@ -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
...
...
monta_image.sh
View file @
8f3c8051
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment