Adding upstream version 1.154.3.
[debian-live-boot/hramrach.git] / scripts / live-bottom / 21xvidemode
blobead3a6c9c2697cf668837fd82263649d2807203d
1 #!/bin/sh
3 #set -e
5 # initramfs-tools header
7 PREREQ=""
9 prereqs()
11 echo "${PREREQ}"
14 case "${1}" in
15 prereqs)
16 prereqs
17 exit 0
19 esac
21 # live-initramfs header
23 if [ -n "${NOXAUTOCONFIG}" ]
24 then
25 exit 0
28 if [ ! -x /root/usr/bin/X ]
29 then
30 exit 0
33 . /scripts/live-functions
35 log_begin_msg "Configuring X video modes"
37 # live-initramfs script
39 . /live.vars
41 if [ -n "$XVIDEOMODE" ]
42 then
43 mount -o bind /sys /root/sys
44 mount -o bind /proc /root/proc
45 mount -o bind /dev /root/dev
47 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
48 set xserver-xorg/config/monitor/mode-list ${XVIDEOMODE}
49 set xserver-xorg/config/display/modes ${XVIDEOMODE}
50 EOF
52 chroot /root dexconf
54 umount /root/sys
55 umount /root/proc
56 umount /root/dev
59 log_end_msg