Fix update master branch. Add comments for init.d.

master
Mike Hiretsky 12 years ago
parent dffc3dac5f
commit 6ef7328334

@ -11,6 +11,7 @@ KERNEL_VERSION_CONF="modules_3"
MODULES_PATH="/lib/modules/${KERNEL_VERSION}"
CONF_FILE="/etc/conf.d/modules"
# get variable value from cl-install
variable_value()
{
local varname=$1
@ -18,10 +19,13 @@ variable_value()
awk "{ if (\$1 == \"$varname\") print \$3 }"
}
# detect modules for cpu freq
get_cpufreq_modules(){
MODULES_STRING=""
# find all cpufreq modules
for path in $(find $MODULES_PATH -name cpufreq)
do
# load each module and chech it
for module_path in $(find $path -name *.ko | sort)
do
module_name=${module_path##\/*\/}
@ -39,6 +43,7 @@ get_cpufreq_modules(){
done
}
# find cpu freq modules autoload string
find_string_modules(){
find_string=$(awk "/^\s*[^#]*\s*${KERNEL_VERSION_CONF}/ {print}" < ${CONF_FILE})
if [[ -n $find_string ]];
@ -48,14 +53,20 @@ find_string_modules(){
return 1
}
# add cpu freq modules to modules autoload file
add_autoload_modules(){
# get root type
local roottype=`variable_value os_root_type`
# if modules have not added yet
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
@ -69,6 +80,7 @@ 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
then

@ -271,7 +271,7 @@ class cl_builder(color_print):
format(repname=gitName,
branch='master'))
changeBranch = self.runChroot(distrPath,
"cd %s;git fetch;git checkout master"%gitDir)
"cd %s;git pull;git checkout master;git pull"%gitDir)
self.printByResult(changeBranch.success())
self.printMessageForTest(_("Updating portage"))

@ -55,9 +55,6 @@ CMD_OPTIONS = [{'shortOption':"p",
if len(COMPRESS_METHODS)>1
else _("only {0}").format(COMPRESS_METHODS[0]))
},
{'longOption':'notree',
'help':_("exclude the portage tree from the image")
},
{'longOption':'live',
'help':_("use only live templates on startup")
},

Loading…
Cancel
Save