Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Add the nvidia check to installer, will try nvidia-xconfig if the nvidia
Browse files Browse the repository at this point in the history
driver has been loaded.
  • Loading branch information
Kris Moore committed Jan 9, 2014
1 parent 13ee25d commit 8e745d8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
3 changes: 0 additions & 3 deletions overlays/install-overlay/root/PCBSDStart.sh
Expand Up @@ -98,9 +98,6 @@ if [ $? -eq 0 ]; then
exit
fi

# Now run the X auto-detection
detect_x

# Now start xorg
start_xorg

Expand Down
19 changes: 15 additions & 4 deletions overlays/install-overlay/root/functions.sh
Expand Up @@ -4,7 +4,18 @@

detect_x()
{
# Check for VESA support
# First check if we are running as a VirtualBox guest
pciconf -lv | grep -q "VirtualBox"
if [ $? -eq 0 ] ; then cp /root/cardDetect/xorg.conf.virtualbox /etc/X11/xorg.conf; fi

# Check if this system has a nvidia device, and run nvidia-xconfig
kldstat | grep -q 'nvidia'
if [ $? -eq 0 ] ; then
echo "Detected NVIDIA, creating xorg.conf"
nvidia-xconfig 2>/dev/null
fi

# Check if the user requested VESA mode
xvesa="NO"
v=`/bin/kenv xvesa 2>/dev/null`
if [ $? -eq 0 ]; then
Expand Down Expand Up @@ -75,9 +86,9 @@ EndSection

start_xorg()
{
# First check if we are running as a VirtualBox guest
pciconf -lv | grep -q "VirtualBox"
if [ $? -eq 0 ] ; then cp /root/cardDetect/xorg.conf.virtualbox /etc/X11/xorg.conf; fi

# Now run the X auto-detection
detect_x

# Run X Now
startx
Expand Down

0 comments on commit 8e745d8

Please sign in to comment.