Unverified Commit 9af84959 authored by Batuhan Osman Taşkaya's avatar Batuhan Osman Taşkaya Committed by GitHub

Indentetion

parent 6095e7cb
...@@ -30,6 +30,70 @@ init_args() { ...@@ -30,6 +30,70 @@ init_args() {
ARG_RESOLUTION="$(echo "${ARGS}" | cut -d: -f2)" ARG_RESOLUTION="$(echo "${ARGS}" | cut -d: -f2)"
} }
# Global variables
ARG_FB_DRIVER=""
ARG_RESOLUTION=""
# kernel_cmdline <param> <default>
# Looks for a parameter on the kernel's boot-time command line.
#
# returns: 0 if param was found. Also prints its value if it was a K=V param.
# 1 if it was not. Also prints value passed as <default>
#
kernel_cmdline()
{
for param in $(/bin/cat /proc/cmdline); do
case "${param}" in
$1=*) echo "${param##*=}"; return 0 ;;
$1) return 0 ;;
*) continue ;;
esac
done
[ -n "${2}" ] && echo "${2}"
return 1
}
init_args() {
local ARGS="$(kernel_cmdline mhwdfb):" # additional ':' if f2 isn't set -> empty string
ARG_FB_DRIVER="$(echo "${ARGS}" | cut -d: -f1)"
ARG_RESOLUTION="$(echo "${ARGS}" | cut -d: -f2)"
}
run_earlyhook()
{
init_args
if [ "${ARG_FB_DRIVER}" != "kms" ]; then
# Disable KMS modules
for module in radeon nouveau i915 via-agp sis-agp intel-agp amd64-agp ati-agp sworks-agp ali-agp amd-k7-agp nvidia-agp efficeon-agp
do
echo "blacklist ${module}" >> "/etc/modprobe.d/mhwd-kms.conf"
done
fi
}
run_latehook()
{
init_args
if [ "${ARG_FB_DRIVER}" == "uvesafb" ]; then
if [ "${ARG_RESOLUTION}" == "" ]; then
/sbin/modprobe uvesafb
else
case "${ARG_RESOLUTION}" in
*-*) ;;
*) ARG_RESOLUTION="${ARG_RESOLUTION}-32" ;;
esac
/sbin/modprobe uvesafb mode_option=${ARG_RESOLUTION}
fi
fi
}
run_earlyhook() run_earlyhook()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment