summaryrefslogtreecommitdiff
path: root/scripts/live-bottom/21xvidemode
blob: 23eb212e6105c66436cdd1593abc1a3a255f570b (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
57
#!/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}" ]
then
	exit 0
fi

if [ ! -x /root/usr/bin/X ]
then
	exit 0
fi

. /scripts/live-functions

log_begin_msg "Configuring X video modes"

# live-initramfs script

if [ -n "$XVIDEOMODE" ]
then
	mount -o bind /sys /root/sys
	mount -o bind /proc /root/proc
	mount -o bind /dev /root/dev

chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
set xserver-xorg/config/monitor/mode-list ${XVIDEOMODE}
set xserver-xorg/config/display/modes ${XVIDEOMODE}
EOF

	chroot /root dexconf

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

log_end_msg