2008-12-02, 22:04
Let me be more clear... this would eliminate the need to choose 1 for nvidia, 2 for ati, 3 for intel (and 4 for the show? jk)
This is possible.
the following command will output the mgf of the video card:
lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)'
now a simple if / then statement can be used inside of the initramfs loading scripts that is called before any script that configures X
basically you say (this is psudeo code):
if lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)' == Intel
then (perform the same tasks as if the user hit #3 during boot process)
if lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)' == ATI
then (perform the same tasks as if the user hit #2 during boot process)
if lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)' == nVidia
then (perform the same tasks as if the user hit #1 during boot process)
else echo "buy a real video card. press any key to restart."
halt
end if
-CB
This is possible.
the following command will output the mgf of the video card:
lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)'
now a simple if / then statement can be used inside of the initramfs loading scripts that is called before any script that configures X
basically you say (this is psudeo code):
if lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)' == Intel
then (perform the same tasks as if the user hit #3 during boot process)
if lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)' == ATI
then (perform the same tasks as if the user hit #2 during boot process)
if lspci|grep VGA|grep -Ewo '(Intel|ATI|nVidia)' == nVidia
then (perform the same tasks as if the user hit #1 during boot process)
else echo "buy a real video card. press any key to restart."
halt
end if
-CB