# # NB: MUST be included before other templates defining cleanup and prepare # if [[ -z $ISO_TYPE ]]; then # default ISO_TYPE='cdemu' # guess :) [[ -n $MOUNTTARGET ]] && ISO_TYPE='fuseiso' [[ -n $CDEMU_NO ]] && ISO_TYPE='cdemu' fi case $ISO_TYPE in 'fuseiso') inherit fuseiso;; 'cdemu') inherit cdemu;; *) die "Unknown ISO_TYPE: '$ISO_TYPE'";; esac # wrapper phases iso_prepare () { default_prepare ${ISO_TYPE}_prepare } iso_cleanup () { default_cleanup ${ISO_TYPE}_cleanup } # we need to OVERRIDE and not EXPORT, to not execute them twice # as they are already exported in the other template OVERRIDE prepare cleanup # vim:ft=sh