summaryrefslogtreecommitdiff
path: root/data/Init.in
diff options
context:
space:
mode:
authorDominique Leuenberger <dimstar@opensuse.org>2020-09-16 11:59:43 +0200
committerRay Strode <rstrode@redhat.com>2021-02-24 15:34:21 -0500
commitd98debd294060489c77d913d32674c4e08987b8f (patch)
tree37c56801dfe64203656c0a3a3b130813c4961f3b /data/Init.in
parent349e6af855a1c1dbee9af3e5881e00b66482d155 (diff)
downloadgdm-d98debd294060489c77d913d32674c4e08987b8f.tar.gz
Xinit: Allow for distros to split system config to /usr/etc
openSUSE is preparing the system to have /etc as 'administrator config files' with system/package config templates shipped in /usr/etc (similar to the overlay system used by systemd) Have gdm follow this and try to load files from /etc, if not existing, fallback to /usr/etc
Diffstat (limited to 'data/Init.in')
-rw-r--r--data/Init.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/data/Init.in b/data/Init.in
index 86cc2d86..0c50251c 100644
--- a/data/Init.in
+++ b/data/Init.in
@@ -22,14 +22,22 @@ gdmwhich () {
echo "$OUTPUT"
}
-sysresources=/etc/X11/Xresources
+if [ -f /etc/X11/Xresources ]; then
+ sysresources=/etc/X11/Xresources
+else
+ sysresources=/usr/etc/X11/Xresources
+fi
# merge in defaults
if [ -f "$sysresources" ]; then
xrdb -nocpp -merge "$sysresources"
fi
-sysmodmap=/etc/X11/Xmodmap
+if [ -f /etc/X11/Xmodmap ]; then
+ sysmodmap=/etc/X11/Xmodmap
+else
+ sysmodmap=/usr/etc/X11/Xmodmap
+fi
XMODMAP=`gdmwhich xmodmap`
if [ "x$XMODMAP" != "x" ] ; then