diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-05-02 10:17:40 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-05-02 10:17:40 (EDT) |
commit | d14509d2843ba04a8eb38165249bde64e77be4d1 (patch) | |
tree | feb34ba6e4d1492415c35dd317b0b5cc8e1cd035 | |
parent | 2336104faee586b6e0e5fddb282fcff9a0386203 (diff) |
pro-archman: Set sig handlers outside of init().
-rw-r--r-- | src/pro-archman.sh | 36 |
1 files changed, 20 insertions, 16 deletions
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 } |