|
|
|
@ -58,19 +58,18 @@ add_autoload_modules(){
|
|
|
|
|
# get root type
|
|
|
|
|
local roottype=`variable_value os_root_type`
|
|
|
|
|
# if modules have not added yet
|
|
|
|
|
if ! find_string_modules;
|
|
|
|
|
if find_string_modules;
|
|
|
|
|
then
|
|
|
|
|
ebegin "Added rules for cpu frequency"
|
|
|
|
|
# detect cpufreq modules
|
|
|
|
|
get_cpufreq_modules
|
|
|
|
|
# if root type is hdd
|
|
|
|
|
if [[ $roottype == "hdd" ]]
|
|
|
|
|
then
|
|
|
|
|
# append config string to conf file
|
|
|
|
|
echo ${KERNEL_VERSION_CONF}=\"${MODULES_STRING}\" >> ${CONF_FILE}
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
ebegin "Cpu frequency modules already detected"
|
|
|
|
|
sed -i "/${KERNEL_VERSION_CONF}=/d" ${CONF_FILE}
|
|
|
|
|
fi
|
|
|
|
|
ebegin "Added rules for cpu frequency"
|
|
|
|
|
# detect cpufreq modules
|
|
|
|
|
get_cpufreq_modules
|
|
|
|
|
# if root type is hdd
|
|
|
|
|
if [[ $roottype == "hdd" ]]
|
|
|
|
|
then
|
|
|
|
|
# append config string to conf file
|
|
|
|
|
echo ${KERNEL_VERSION_CONF}=\"${MODULES_STRING}\" >> ${CONF_FILE}
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -82,8 +81,14 @@ start() {
|
|
|
|
|
stop() {
|
|
|
|
|
# remove calculate-builder from autorun
|
|
|
|
|
local roottype=`variable_value os_root_type`
|
|
|
|
|
if [[ $roottype == "hdd" ]] && rc-config list boot | grep -q calculate-builder
|
|
|
|
|
if [[ $roottype == "hdd" ]]
|
|
|
|
|
then
|
|
|
|
|
rc-update del calculate-builder boot
|
|
|
|
|
for runlevel in boot default
|
|
|
|
|
do
|
|
|
|
|
if rc-config list $runlevel | grep -q calculate-builder
|
|
|
|
|
then
|
|
|
|
|
rc-update del calculate-builder $runlevel
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|