#!/bin/bash # $HeadURL$ $LastChangedRevision$ # Properties MY_ID=system_boot PARENT_ID=system MY_PRIVATE_ATTRIBUTES="uname status helper" MY_PUBLIC_ATTRIBUTES="" MY_ATTRIBUTES="$MY_PRIVATE_ATTRIBUTES $MY_PUBLIC_ATTRIBUTES" MY_HELPER_IDS="$(ls | fgrep -v helper | xargs echo)" # Attributes for MY_ATTRIBUTE in ${MY_ATTRIBUTES^^}; do eval "$MY_ATTRIBUTE="; done # Defaults for the questions we ask (should only used here) DFLT_HELPER=nop # Hooks list_prologue() { return 0 } edit_prologue() { # my properties inherit MY_ATTRIBUTES # my attributes inherit ${MY_ATTRIBUTES^^} # my inherited i will use inherit BOOTMEDIA # Guts map_an_inherited_attribute_to_my_helpers } create_prologue() { map_an_inherited_attribute_to_my_helpers } delete_prologue() { map_an_inherited_attribute_to_my_helpers } # Support functions map_an_inherited_attribute_to_my_helpers() { # my properties inherit MY_HELPER_IDS MY_ATTRIBUTES # my attributes inherit ${MY_ATTRIBUTES^^} # those inherited attributes i will use inherit BOOTMEDIA # real local # Sanity checks [ "X$BOOTMEDIA" = Xnet -o "X$BOOTMEDIA" = Xcd ] || internal "AUTOINST: seems not to have been propogated" # Guts if [ $BOOTMEDIA = net ]; then MY_HELPER_IDS=net else MY_HELPER_IDS=cd fi return 0 }