Adding upstream version 1.87.1.
[live-boot-grml.git] / scripts / casper-bottom / 20xconfig
index 840200d..c5563ed 100755 (executable)
@@ -3,7 +3,7 @@
 PREREQ=""
 DESCRIPTION="Configuring X..."
 
-. /scripts/functions
+. /scripts/casper-functions
 
 prereqs()
 {
@@ -33,11 +33,20 @@ for x in $(cat /proc/cmdline); do
                         debian-installer/locale=*)
                                 locale=${x#debian-installer/locale=}
                                 ;;
+                        locale=*)
+                                locale=${x#locale=}
+                                ;;
                 esac
 done
 
 mount -n -o bind /sys /root/sys
 mount -n -o bind /proc /root/proc
+mount -n -o bind /dev /root/dev
+
+if [ -n "${XDEBCONF}" -a -x /root/usr/sbin/xdebconfigurator ]; then
+    # xdebconfigurator
+    chroot /root /usr/sbin/xdebconfigurator
+fi
 
 chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF
 set xserver-xorg/autodetect_keyboard true
@@ -47,5 +56,6 @@ EOF
 DEBUG_XORG_PACKAGE=1 DEBUG_XORG_DEBCONF=1 LANG=$(grep "^${locale}" /root/usr/share/i18n/SUPPORTED | grep UTF-8 | sed -e 's, .*,,' -e q) casper-reconfigure /root xserver-xorg
 umount /root/sys
 umount /root/proc
+umount /root/dev
 
 log_end_msg