#!/bin/sh
dialog \
--title "Select clock chip class" \
--menu "Please choose the appropriate DAC class\n\
 for your card. (current: $1)" \
21 50 10 \
\
"generic"   "kernel support" \
\
2> /tmp/.kernclass 

KERN_CLASS=$1
KERN_TYPE=$2

NEW_KERN_CLASS=`cat /tmp/.kernclass`

if [ "$NEW_KERN_CLASS" != "" ]; then
  kernel/$NEW_KERN_CLASS/.configure $2
  NEW_KERN_TYPE=`cat /tmp/.kerntype`
  if [ "$NEW_KERN_TYPE" != "" ]; then
    KERN_CLASS=$NEW_KERN_CLASS
    KERN_TYPE=$NEW_KERN_TYPE
  fi
fi

echo $KERN_CLASS>/tmp/.kernclass
echo $KERN_TYPE>/tmp/.kerntype
