From 9171ce28fbec2c18a19730044d1ac2157ccb396b Mon Sep 17 00:00:00 2001 From: Andrey Asadchev Date: Fri, 29 Feb 2008 11:56:36 +0100 Subject: [PATCH] Explicitly set Xorg video driver. Xdriver is specifed with "xdriver=$(DRIVER)". This is because fglrx (and possibly other drivers) are not detected correctly. --- scripts/live | 5 +++++ scripts/live-bottom/21xdriver | 51 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100755 scripts/live-bottom/21xdriver diff --git a/scripts/live b/scripts/live index 332de10..8db6b80 100755 --- a/scripts/live +++ b/scripts/live @@ -396,6 +396,11 @@ Arguments () export XDEBCONF ;; + xdriver=*) + XDRIVER="${ARGUMENT#xdriver=}" + export XDRIVER + ;; + xvideomode=*) XVIDEOMODE="${ARGUMENT#xvideomode=}" export XVIDEOMODE diff --git a/scripts/live-bottom/21xdriver b/scripts/live-bottom/21xdriver new file mode 100755 index 0000000..c96f0ea --- /dev/null +++ b/scripts/live-bottom/21xdriver @@ -0,0 +1,51 @@ +#!/bin/sh + +#set -e + +# initramfs-tools header + +PREREQ="" + +prereqs() +{ + echo "${PREREQ}" +} + +case "${1}" in + prereqs) + prereqs + exit 0 + ;; +esac + +# live-initramfs header + +if [ -n "${NOXAUTOCONFIG}" ] +then + exit 0 +fi + +. /scripts/live-functions + +log_begin_msg "Configuring X kludges..." + +# live-initramfs script + +if [ -n "$XDRIVER" ] +then + mount -n -o bind /sys /root/sys + mount -n -o bind /proc /root/proc + mount -n -o bind /dev /root/dev + +chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF +set xserver-xorg/autodetect_video_card false +set xserver-xorg/config/device/driver ${XDRIVER} +EOF + + chroot /root dexconf + + umount /root/sys + umount /root/proc + umount /root/dev +fi + -- 2.1.4