#!/bin/bash
# Filename:      ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/36-cpufrequtils
# Purpose:       configure cpufrequtils of live-system
# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# Bug-Reports:   see http://grml.org/bugs/
# License:       This file is licensed under the GPL v2 or any later version.
################################################################################

set -u
set -e

[ -r /etc/grml/grml-live.conf ]  && . /etc/grml/grml-live.conf
[ -n "$GRML_LIVE_LOCAL_CONFIG" ] && . "$GRML_LIVE_LOCAL_CONFIG"

if [ -r $target/usr/share/doc/cpufrequtils/examples/cpufrequtils.sample ] ; then
   if ! [ -r $target/etc/default/loadcpufreq ] ; then
      cat $target/usr/share/doc/cpufrequtils/examples/cpufrequtils.sample > $target/etc/default/loadcpufreq
      sed -i 's/^ENABLE=.*/ENABLE="true"/' $target/etc/default/loadcpufreq
   fi
fi

## END OF FILE #################################################################
# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2
