Adding debian version 2.0~a1-1.
[live-boot-grml.git] / scripts / live-bottom / 21xdriver
1 #!/bin/sh
2
3 #set -e
4
5 # initramfs-tools header
6
7 PREREQ=""
8
9 prereqs()
10 {
11         echo "${PREREQ}"
12 }
13
14 case "${1}" in
15         prereqs)
16                 prereqs
17                 exit 0
18                 ;;
19 esac
20
21 # live-boot header
22
23 if [ -n "${NOXAUTOCONFIG}" ] || [ ! -x /root/usr/bin/X ] || [ -z "${XDRIVER}" ]
24 then
25         exit 0
26 fi
27
28 . /scripts/live-functions
29
30 log_begin_msg "Configuring X video driver"
31
32 # live-boot script
33
34 . /live.vars
35
36 mount -o bind /sys /root/sys
37 mount -o bind /proc /root/proc
38 mount -o bind /dev /root/dev
39
40 if [ "${XDRIVER}" != "dexconf" ]
41 then
42
43 chroot /root debconf-communicate -fnoninteractive live-boot > /dev/null << EOF
44 set xserver-xorg/autodetect_video_card false
45 set xserver-xorg/config/device/driver ${XDRIVER}
46 EOF
47
48 fi
49
50 chroot /root dexconf
51
52 umount /root/sys
53 umount /root/proc
54 umount /root/dev
55
56 log_end_msg