Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
create-iso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Linux Educacional 5
create-iso
Commits
7f6cb23a
Commit
7f6cb23a
authored
11 years ago
by
Diego Pasqualin
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git:./create-iso/create-iso
parents
6e70cb99
8f2c7660
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
create-iso-jenkins.sh
+1
-0
1 addition, 0 deletions
create-iso-jenkins.sh
create-iso.sh
+14
-9
14 additions, 9 deletions
create-iso.sh
scripts/common-functions.sh
+1
-1
1 addition, 1 deletion
scripts/common-functions.sh
with
16 additions
and
10 deletions
create-iso-jenkins.sh
+
1
−
0
View file @
7f6cb23a
...
@@ -28,6 +28,7 @@ sudo ./create-iso.sh --all "iso/$ISO" \
...
@@ -28,6 +28,7 @@ sudo ./create-iso.sh --all "iso/$ISO" \
--dist
"
$DIST
"
\
--dist
"
$DIST
"
\
--host
"
$MIRROR
"
\
--host
"
$MIRROR
"
\
--mirror
"
$REPO
"
\
--mirror
"
$REPO
"
\
--clean
\
--output
"
$OUTPUT
"
<<<
y
--output
"
$OUTPUT
"
<<<
y
RESULT
=
$?
RESULT
=
$?
...
...
This diff is collapsed.
Click to expand it.
create-iso.sh
+
14
−
9
View file @
7f6cb23a
...
@@ -142,8 +142,9 @@ replaceIso()
...
@@ -142,8 +142,9 @@ replaceIso()
if
[
"
$ack
"
==
"y"
]
;
then
if
[
"
$ack
"
==
"y"
]
;
then
log
"Cleaning temporary directory ..."
log
"Cleaning temporary directory ..."
rm
-rf
"
$TMP
"
/
*
"
$CHROOTDIR
"
"
$CDDIR
"
"
$SQUASHIMAGE
"
||
return
6
if
!
cleanFiles
;
then
#$0 --clean --dist $1 || exit 6
return
6
fi
else
else
log
"Extraction canceled!"
log
"Extraction canceled!"
return
1
return
1
...
@@ -153,6 +154,13 @@ replaceIso()
...
@@ -153,6 +154,13 @@ replaceIso()
return
0
return
0
}
}
# Remove files used on the generation process and umount files
cleanFiles
()
{
checkMountedFS
rm
-rf
"
$TMP
"
/
*
"
$CHROOTDIR
"
"
$CDDIR
"
"
$SQUASHIMAGE
"
||
return
6
}
log
()
log
()
{
{
if
"
$LOGINFO
"
&&
[
"
$1
"
]
;
then
if
"
$LOGINFO
"
&&
[
"
$1
"
]
;
then
...
@@ -253,7 +261,6 @@ checkOutput "$OUTPUT" || exit 8
...
@@ -253,7 +261,6 @@ checkOutput "$OUTPUT" || exit 8
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Init routines
# Init routines
if
$iso
;
then
if
$iso
;
then
if
!
regenerateManifest | log
;
then
if
!
regenerateManifest | log
;
then
log
"Error to regenarate manifest file"
log
"Error to regenarate manifest file"
...
@@ -272,10 +279,6 @@ elif $edit; then
...
@@ -272,10 +279,6 @@ elif $edit; then
log
"Error to edit Squash image"
log
"Error to edit Squash image"
exit
2
exit
2
fi
fi
elif
$clean
;
then
log
"Cleaning temporary directory ..."
rm
-rf
"
$TMP
"
/
*
"
$CHROOTDIR
"
"
$CDDIR
"
"
$SQUASHIMAGE
"
||
exit
6
elif
$all
;
then
elif
$all
;
then
replaceIso
$distName
||
exit
6
replaceIso
$distName
||
exit
6
...
@@ -300,7 +303,9 @@ elif $all; then
...
@@ -300,7 +303,9 @@ elif $all; then
exit
5
exit
5
fi
fi
fi
fi
if
$clean
;
then
#/root/teste_ram/rsync.sh
log
"Cleaning temporary directory ..."
cleanFiles
||
exit
$?
fi
exit
0
exit
0
This diff is collapsed.
Click to expand it.
scripts/common-functions.sh
+
1
−
1
View file @
7f6cb23a
...
@@ -69,7 +69,7 @@ closeChroot()
...
@@ -69,7 +69,7 @@ closeChroot()
umount
-l
"
$CHROOTDIR
"
/sys
&&
removeMountList
"
$CHROOTDIR
"
/sys
umount
-l
"
$CHROOTDIR
"
/sys
&&
removeMountList
"
$CHROOTDIR
"
/sys
fi
fi
if
grep
-qs
"
$CHROOTDIR
/proc"
/proc/mounts
;
then
if
grep
-qs
"
$CHROOTDIR
/proc"
/proc/mounts
;
then
umount
-l
"
$CHROOTDIR
"
/proc
&&
removeMountLit
"
$CHROOTDIR
"
/proc
umount
-l
"
$CHROOTDIR
"
/proc
&&
removeMountLi
s
t
"
$CHROOTDIR
"
/proc
fi
fi
if
grep
-qs
"
$CHROOTDIR
/dev"
/proc/mounts
;
then
if
grep
-qs
"
$CHROOTDIR
/dev"
/proc/mounts
;
then
umount
-l
"
$CHROOTDIR
"
/dev
&&
removeMountList
"
$CHROOTDIR
"
/dev
umount
-l
"
$CHROOTDIR
"
/dev
&&
removeMountList
"
$CHROOTDIR
"
/dev
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment