944bd33a6a72ecf03c6e6e2f0acb1193e7c162f8
[live-boot-grml.git] / scripts / live-bottom / 21xvidemode
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-initramfs header
22
23 . /scripts/live-functions
24
25 log_begin_msg "Configuring X kludges..."
26
27 # live-initramfs script
28
29 if [ -n "$XVIDEOMODE" ]
30 then
31         mount -n -o bind /sys /root/sys
32         mount -n -o bind /proc /root/proc
33         mount -n -o bind /dev /root/dev
34
35 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
36 set xserver-xorg/config/monitor/mode-list ${XVIDEOMODE}
37 set xserver-xorg/config/display/modes ${XVIDEOMODE}
38 EOF
39
40         chroot /root dexconf
41
42         umount /root/sys
43         umount /root/proc
44         umount /root/dev
45 fi
46
47 log_end_msg