Revision e7cbe965 snf-image-helper/common.sh

b/snf-image-helper/common.sh
159 159
  fi
160 160
}
161 161

  
162
trap cleanup EXIT
162 163

  
164
check_if_excluded() {
163 165

  
164
trap cleanup EXIT
166
    test "$PROGNAME" = "snf-image-helper" && return 0
167

  
168
    eval local do_exclude=\$SNF_IMAGE_EXCLUDE_${PROGNAME:2}_TASK
169
    if [ -n "$do_exclude" ]; then
170
        warn "Task $PROGNAME was excluded and will not run."
171
        exit 0
172
    fi
173

  
174
    return 0
175
}
176

  
177
# Check if the execution of a task should be ommited
178
check_if_excluded
165 179

  
166 180
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :

Also available in: Unified diff