Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tools
development-tools
manjaro-tools
Commits
52ce7f86
Commit
52ce7f86
authored
Jun 13, 2016
by
udeved
Browse files
buildiso: finalize error handling
parent
98b11ef5
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/buildiso.in
View file @
52ce7f86
...
...
@@ -169,6 +169,12 @@ done
shift
$((
$OPTIND
-
1
))
for
sig
in
TERM HUP QUIT
;
do
trap
"trap_exit
$sig
\"
$(
gettext
"%s signal caught. Exiting..."
)
\"
\"
$sig
\"
"
"
$sig
"
done
trap
'trap_exit INT "$(gettext "Aborted by user! Exiting...")"'
INT
trap
'trap_exit USR1 "$(gettext "An unknown error has occurred. Exiting...")"'
ERR
timer_start
=
$(
get_timer
)
check_root
"
$0
"
"
${
orig_argv
[@]
}
"
...
...
lib/util-iso.sh
View file @
52ce7f86
...
...
@@ -46,7 +46,7 @@ run_safe() {
set
-e
set
-E
restoretrap
=
$(
trap
-p
ERR
)
trap
'error_function $func'
ERR
SIGINT SIGTERM
trap
'error_function $func'
ERR
if
${
verbose
}
;
then
run_log
"
$func
"
...
...
@@ -59,6 +59,14 @@ run_safe() {
set
+e
}
trap_exit
()
{
local
sig
=
$1
;
shift
error
"
$@
"
umount_image
trap
--
"
$sig
"
kill
"-
$sig
"
"
$$
"
}
# $1: image path
make_sqfs
()
{
if
[[
!
-d
"
$1
"
]]
;
then
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment