27d943e76936dc69224f8c21bd031dcd550d78ea
[live-boot-grml.git] / scripts / live-bottom / 21xvidemode
1 #!/bin/sh
2
3 PREREQ=""
4 DESCRIPTION="Configuring X kludges..."
5
6 . /scripts/live-functions
7
8 prereqs()
9 {
10        echo "$PREREQ"
11 }
12
13 case $1 in
14 # get pre-requisites
15 prereqs)
16        prereqs
17        exit 0
18        ;;
19 esac
20
21 log_begin_msg "$DESCRIPTION"
22
23 if [ -n "$XVIDEOMODE" ]
24 then
25         mount -n -o bind /sys /root/sys
26         mount -n -o bind /proc /root/proc
27         mount -n -o bind /dev /root/dev
28
29 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
30 set xserver-xorg/config/monitor/mode-list ${XVIDEOMODE}
31 set xserver-xorg/config/display/modes ${XVIDEOMODE}
32 EOF
33
34         chroot /root dexconf
35
36         umount /root/sys
37         umount /root/proc
38         umount /root/dev
39 fi
40
41 log_end_msg