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

LILOCONF="/etc/lilo.conf"
logger -s "ADMIN - ACPI: $ACPI"

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 ACPI parameter $1"
   exit 1
fi

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