Allowing xorg.conf overrides in /usr/share/live/config/xserver-xorg files.
authorDaniel Baumann <daniel@debian.org>
Fri, 23 Nov 2012 15:53:21 +0000 (16:53 +0100)
committerDaniel Baumann <daniel@debian.org>
Fri, 23 Nov 2012 15:58:23 +0000 (16:58 +0100)
Makefile
debian/live-config.install
scripts/config/1150-xserver-xorg
share/xserver-xorg/nvidia.conf [new file with mode: 0644]

index 81ba2b4..e0f383d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -70,6 +70,10 @@ install:
 
        mkdir -p $(DESTDIR)/sbin
 
+       # Installing shared data
+       mkdir -p $(DESTDIR)/usr/share/live/config
+       cp -r VERSION share/* $(DESTDIR)/usr/share/live/config
+
        # Installing docs
        mkdir -p $(DESTDIR)/usr/share/doc/live-config
        cp -r COPYING examples $(DESTDIR)/usr/share/doc/live-config
@@ -119,6 +123,10 @@ uninstall:
        rmdir --ignore-fail-on-non-empty $(DESTDIR)/var/lib > /dev/null 2>&1 || true
        rmdir --ignore-fail-on-non-empty $(DESTDIR)/var > /dev/null 2>&1 || true
 
+       # Uninstalling shared data
+       rm -rf $(DESTDIR)/usr/share/live/config
+       rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/live
+
        # Uninstalling docs
        rm -rf $(DESTDIR)/usr/share/doc/live-config
        rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/doc > /dev/null 2>&1 || true
index 36b9f4d..ee66d69 100644 (file)
@@ -1,3 +1,4 @@
 sbin
 lib
+usr/share/live
 var
index 050204a..03493bc 100755 (executable)
@@ -144,29 +144,23 @@ Configure_xserver_xorg ()
 
        if [ -n "${LIVE_XORG_DRIVER}" ]
        then
-
                mkdir -p /etc/X11/xorg.conf.d
 
+               if [ -e "/usr/share/live/config/xserver-xorg/${LIVE_XORG_DRIVER}.conf" ]
+               then
+                       # xorg-driver manual overrides
+                       cp "/usr/share/live/config/xserver-xorg/${LIVE_XORG_DRIVER}.conf" /etc/X11/xorg.conf.d/99-live.conf
+               else
+
 cat > /etc/X11/xorg.conf.d/99-live.conf << EOF
 Section "Device"
        Identifier      "Default screen"
        Driver          "${LIVE_XORG_DRIVER}"
-EOF
-
-case "${LIVE_XORG_DRIVER}" in
-       nvidia)
-
-cat >> /etc/X11/xorg.conf.d/99-live.conf << EOF
-       Option          "NoLogo"        "true"
-EOF
-
-               ;;
-esac
-
-cat >> /etc/X11/xorg.conf.d/99-live.conf << EOF
 EndSection
 EOF
 
+               fi
+
                case "${LIVE_XORG_DRIVER}" in
                        nvidia)
                                # wheezy
diff --git a/share/xserver-xorg/nvidia.conf b/share/xserver-xorg/nvidia.conf
new file mode 100644 (file)
index 0000000..746de42
--- /dev/null
@@ -0,0 +1,5 @@
+Section "Device"
+       Identifier      "Default screen"
+       Driver          "nvidia"
+       Option          "NoLogo"        "true"
+EndSection