From d14509d2843ba04a8eb38165249bde64e77be4d1 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 02 May 2014 10:17:40 -0400 Subject: pro-archman: Set sig handlers outside of init(). --- diff --git a/src/pro-archman.sh b/src/pro-archman.sh index cc23a22..0725ffd 100644 --- a/src/pro-archman.sh +++ b/src/pro-archman.sh @@ -89,6 +89,7 @@ main() local cmd= local status= + init_sigs load_locale load_cmds @@ -115,22 +116,7 @@ main() return ${status} } -get_options() -{ - local opt= - - unset OPTARG - while getopts "${OPTSTRING}" opt; do - if [ "x${opt}" != 'x?' ]; then - eval "opt_${opt}=\"\${OPTARG:-true}\"" - fi - unset OPTARG - done - - return 0 -} - -init() +init_sigs() { local i= local sig= @@ -148,7 +134,25 @@ init() ;; esac done +} + +get_options() +{ + local opt= + + unset OPTARG + while getopts "${OPTSTRING}" opt; do + if [ "x${opt}" != 'x?' ]; then + eval "opt_${opt}=\"\${OPTARG:-true}\"" + fi + unset OPTARG + done + + return 0 +} +init() +{ lock get_conf } -- cgit v0.9.1