# ---------------------------------------
# @FUNCTION: getfilevar
-# @USAGE: variable configfile
+# @USAGE: <variable> <configfile>
# @RETURN: the value of the variable
# @DESCRIPTION:
# It detects the value of the variable defined in the file configfile. This is
}
# @FUNCTION: getfilevar_noexec
-# @USAGE: variable configfile
+# @USAGE: <variable> <configfile>
# @RETURN: the value of the variable
# @DESCRIPTION:
# It detects the value of the variable defined in the file configfile.
}
# @FUNCTION: linux_chkconfig_present
-# @USAGE: option
+# @USAGE: <option>
# @RETURN: true or false
# @DESCRIPTION:
# It checks that CONFIG_<option>=y or CONFIG_<option>=m is present in the current kernel .config
}
# @FUNCTION: linux_chkconfig_module
-# @USAGE: option
+# @USAGE: <option>
# @RETURN: true or false
# @DESCRIPTION:
# It checks that CONFIG_<option>=m is present in the current kernel .config
}
# @FUNCTION: linux_chkconfig_builtin
-# @USAGE: option
+# @USAGE: <option>
# @RETURN: true or false
# @DESCRIPTION:
# It checks that CONFIG_<option>=y is present in the current kernel .config
}
# @FUNCTION: linux_chkconfig_string
-# @USAGE: option
+# @USAGE: <option>
# @RETURN: CONFIG_<option>
# @DESCRIPTION:
# It prints the CONFIG_<option> value of the current kernel .config (it requires a configured kernel).
# ---------------------------------------
# @FUNCTION: kernel_is
-# @USAGE: [-lt -gt -le -ge -eq] major_number [minor_number patch_number]
+# @USAGE: [-lt -gt -le -ge -eq] <major_number> [minor_number patch_number]
# @RETURN: true or false
# @DESCRIPTION:
# It returns true when the current kernel version satisfies the comparison against the passed version.
return 1
fi
- # and in newer versions we can also pull LOCALVERSION if it is set.
- # but before we do this, we need to find if we use a different object directory.
- # This *WILL* break if the user is using localversions, but we assume it was
- # caught before this if they are.
- if [[ -z ${OUTPUT_DIR} ]] ; then
- # Try to locate a kernel that is most relevant for us.
- for OUTPUT_DIR in "${SYSROOT}" "${ROOT%/}" "" ; do
- OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}/build"
- if [[ -e ${OUTPUT_DIR} ]] ; then
- break
- fi
- done
- fi
-
[ -d "${OUTPUT_DIR}" ] && KV_OUT_DIR="${OUTPUT_DIR}"
if [ -n "${KV_OUT_DIR}" ];
then
KV_LOCAL=$tmplocal
fi
+ # and in newer versions we can also pull LOCALVERSION if it is set.
+ # but before we do this, we need to find if we use a different object directory.
+ # This *WILL* break if the user is using localversions, but we assume it was
+ # caught before this if they are.
+ if [[ -z ${OUTPUT_DIR} ]] ; then
+ # Try to locate a kernel that is most relevant for us.
+ for OUTPUT_DIR in "${SYSROOT}" "${ROOT%/}" "" ; do
+ OUTPUT_DIR+="/lib/modules/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}${KV_LOCAL}/build"
+ if [[ -e ${OUTPUT_DIR} ]] ; then
+ break
+ fi
+ done
+ fi
+
# And we should set KV_FULL to the full expanded version
KV_FULL="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${KV_EXTRA}${KV_LOCAL}"