summaryrefslogtreecommitdiff
path: root/scripts/live-bottom/21xdriver
blob: e86c3106a9f44a491827c55064d0ee85b0cd0cd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/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}" ] || [ ! -x /root/usr/bin/X ] || [ -z "${XDRIVER}" ]
then
	exit 0
fi

. /scripts/live-functions

log_begin_msg "Configuring X video driver"

# live-initramfs script

. /live.vars

mount -o bind /sys /root/sys
mount -o bind /proc /root/proc
mount -o bind /dev /root/dev

if [ "${XDRIVER}" != "dexconf" ]
then

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

fi

chroot /root dexconf

umount /root/sys
umount /root/proc
umount /root/dev

log_end_msg