Skip to content

Commit

Permalink
deliver a correct RC during exit
Browse files Browse the repository at this point in the history
  • Loading branch information
MaStr committed Aug 20, 2013
1 parent dde5d7b commit 1e7ef11
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/autoconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ _load_modules_() {

_start_() {

changed=0

# check if $cfg_modules is available
if [ ! -d $cfg_modules ] ; then
Expand All @@ -100,5 +101,16 @@ _start_() {

# Transfer exported config values
cp $cfg_tmp_folder/* $cfg_auto_folder
}


if [ "$changed" == "1" ] ; then
#If we changed something we deliver 0 as RC, because
#we did our work successfully
exit 0
else
#So, we haven't changed something, so, we inform with
#RC 1 as a hint
exit 1
fi
}

0 comments on commit 1e7ef11

Please sign in to comment.