Skip to content

Commit 1e7ef11

Browse files
committed
deliver a correct RC during exit
1 parent dde5d7b commit 1e7ef11

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

lib/autoconfig.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ _load_modules_() {
8080

8181
_start_() {
8282

83+
changed=0
8384

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

101102
# Transfer exported config values
102103
cp $cfg_tmp_folder/* $cfg_auto_folder
103-
}
104+
105+
106+
if [ "$changed" == "1" ] ; then
107+
#If we changed something we deliver 0 as RC, because
108+
#we did our work successfully
109+
exit 0
110+
else
111+
#So, we haven't changed something, so, we inform with
112+
#RC 1 as a hint
113+
exit 1
114+
fi
115+
}
104116

0 commit comments

Comments
 (0)