#!/bin/bash
#
source /etc/conf.d/vdr.admin.cfg

if [ "$1" != "" ] ; then
   ACPI=$1
   $SETVAL ACPI $1
else
   ACPI=`$GETVAL ACPI`
fi

LILOCONF="/etc/lilo.conf"

if [ "$ACPI" = "An" ] ; then
   BP="2.6"
elif [ "$ACPI" = "Aus" ]  ; then
   BP="2.6-AN"
elif [ "$ACPI" = "MP_QDI" ]  ; then
   BP="2.6-AF-PN"
elif [ "$ACPI" = "MP_AVT" ]  ; then
   BP="2.6-AF-PN"
elif [ "$ACPI" = "EPIA_M" ]  ; then
   BP="2.6-AF-PN"
elif [ "$ACPI" = "ACTIVY" ]  ; then
   BP="2.6-AF-PN"
else
   echo "Unknown parameter $1"
   exit 1
fi

sed -i $LILOCONF -e "s/^default = .*/default = $BP/"
lilo
echo 'Done!'
exit 0
