CONFIG_DEBS='yes' # check for bootoption debs for installing .debs
CONFIG_DISPLAY_SSH_FINGERPRINTS='yes' # display SSH server key fingerprints
CONFIG_DISTRI='yes' # support some customization via bootoption distri
-CONFIG_DMRAID='yes' # support for dmraid
CONFIG_EASTEREGG='yes' # easteregg
CONFIG_EXTRACT='yes' # specify which (only in combination with bootparam myconfig/netconfig useful)
CONFIG_FINDDCSDIR='yes' # search for a debs, config, scripts directory
}
# }}}
-# {{{ dmraid
-config_dmraid(){
- [ -n "$INSTALLED" ] && return 0
-
- if checkbootparam 'nodmraid' ; then
- ewarn "Skipping dmraid code as requested on boot commandline." ; eend 0
- return 0
- fi
-
- if ! [ -x /sbin/dmraid ] ; then
- ewarn "dmraid not available, can not execute it." ; eend 1
- return
- fi
-
- dmraid_wrapper() {
- # usage: dmraid_wrapper <dmraid_option>
- [ -n "$1" ] || return 1
-
- IFSOLD=${IFS:-}
- IFS=$'\n'
- eindent
-
- for line in $(dmraid $1 ; echo errcode:$?); do
- case $line in
- *'no block devices found'*)
- einfo "No block devices found" ; eend 0
- break
- ;;
- *'no raid disks'*)
- einfo "No active dmraid devices found" ; eend 0
- break
- ;;
- errcode:0)
- eend 0;
- ;;
- errcode:1)
- eend 1
- ;;
- *)
- einfo "$line"
- ;;
- esac
- done
-
- eoutdent
- IFS=$IFSOLD
- }
-
- if checkbootparam 'dmraid' ; then
- local ACTION="$(getbootparam 'dmraid' 2>>$DEBUG)"
- if [ "$ACTION" = "off" ] ; then
- # Deactivates all active software RAID sets:
- einfo "Deactivating present dmraid sets (as requested via dmraid=off):"
- dmraid_wrapper -an
- else
- # Activate all software RAID sets discovered:
- einfo "Activating present dmraid sets (as requested via dmraid):"
- dmraid_wrapper -ay
- fi
-
- return
- fi
-
- # by default (no special bootoptions) discover all software RAID devices:
- einfo "Searching for any present dmraid sets:"
- dmraid_wrapper -r
-}
-# }}}
-
# {{{ LVM (Logical Volumes)
config_lvm(){
[ -n "$INSTALLED" ] && return 0
checkvalue $CONFIG_SWRAID && config_swraid
-checkvalue $CONFIG_DMRAID && config_dmraid
-
checkvalue $CONFIG_LVM && config_lvm
checkvalue $CONFIG_TESTCD && config_testcd