5 # initramfs-tools header
21 # live-initramfs header
23 . /scripts/live-functions
25 log_begin_msg "Configuring X..."
27 # live-initramfs script
29 if [ "$TERM_TYPE" = "serial" ]; then
30 # Don't bother trying to configure or start X on a serial console
31 rm -f /etc/rc?.d/S??[gxk]dm
37 mount -n -o bind /sys /root/sys
38 mount -n -o bind /proc /root/proc
39 mount -n -o bind /dev /root/dev
41 if [ -n "${XDEBCONF}" -a -x /root/usr/sbin/xdebconfigurator ]; then
43 chroot /root /usr/sbin/xdebconfigurator
46 if [ "${BUILD_SYSTEM}" = "Ubuntu" ]; then
47 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
48 set xserver-xorg/autodetect_keyboard true
49 fset xserver-xorg/autodetect_keyboard seen true
52 # d-i code not present, so:
53 if [ -n "${KOPTIONS}" ]; then
54 setoptions="set xserver-xorg/config/inputdevice/keyboard/options ${KOPTIONS}"
56 if [ -n "${KVARIANT}" ]; then
57 setvariant="set xserver-xorg/config/inputdevice/keyboard/variant ${KVARIANT}"
59 if [ -n "${KMODEL}" ]; then
60 setmodel="set xserver-xorg/config/inputdevice/keyboard/model ${KMODEL}"
63 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
64 set xserver-xorg/config/inputdevice/keyboard/layout ${kbd}
71 DEBUG_XORG_PACKAGE=1 DEBUG_XORG_DEBCONF=1 live-reconfigure /root xserver-xorg