Timo Aaltonen pushed to branch debian-unstable at X Strike Force / xorg
Commits:
-
6e2b340c
by Josh Triplett at 2019-11-29T12:33:09-08:00
-
d90b74e7
by Josh Triplett at 2019-11-29T12:36:56-08:00
6 changed files:
- debian/changelog
- debian/local/Xsession
- debian/local/Xsession.d/20x11-common_process-args
- debian/local/Xsession.options.5
- + debian/local/Xsession.options.d.5
- debian/x11-common.manpages
Changes:
| 1 |
+xorg (1:7.7+21) unstable; urgency=medium
|
|
| 2 |
+ |
|
| 3 |
+ [ Josh Triplett ]
|
|
| 4 |
+ * Support /etc/X11/Xsession.options.d/*.conf in addition to
|
|
| 5 |
+ Xsession.options, allowing sysadmins to drop configuration snippets there
|
|
| 6 |
+ rather than editing /etc/X11/Xsession.options.
|
|
| 7 |
+ |
|
| 8 |
+ -- Josh Triplett <josh@joshtriplett.org> Fri, 29 Nov 2019 12:34:43 -0800
|
|
| 9 |
+ |
|
| 1 | 10 |
xorg (1:7.7+20) unstable; urgency=medium
|
| 2 | 11 |
|
| 3 | 12 |
[ Julien Cristau ]
|
| ... | ... | @@ -60,6 +60,24 @@ USERXSESSIONRC=$HOME/.xsessionrc |
| 60 | 60 |
ALTUSERXSESSION=$HOME/.Xsession
|
| 61 | 61 |
ERRFILE=$HOME/.xsession-errors
|
| 62 | 62 |
|
| 63 |
+OPTIONS="$(
|
|
| 64 |
+ if [ -r "$OPTIONFILE" ]; then
|
|
| 65 |
+ cat "$OPTIONFILE"
|
|
| 66 |
+ fi
|
|
| 67 |
+ if [ -d /etc/X11/Xsession.options.d ]; then
|
|
| 68 |
+ run-parts --list --regex '\.conf$' /etc/X11/Xsession.options.d
|
|
| 69 |
+ fi
|
|
| 70 |
+)"
|
|
| 71 |
+ |
|
| 72 |
+has_option() {
|
|
| 73 |
+ # Ensure that a later no-foo overrides an earlier foo
|
|
| 74 |
+ if [ "$(echo "$OPTIONS" | grep -Eo "^(no-)?$1\>" | tail -n 1)" = "$1" ]; then
|
|
| 75 |
+ return 0
|
|
| 76 |
+ else
|
|
| 77 |
+ return 1
|
|
| 78 |
+ fi
|
|
| 79 |
+}
|
|
| 80 |
+ |
|
| 63 | 81 |
# attempt to create an error file; abort if we cannot
|
| 64 | 82 |
if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] &&
|
| 65 | 83 |
[ ! -L "$ERRFILE" ]; then
|
| ... | ... | @@ -2,18 +2,6 @@ |
| 2 | 2 |
|
| 3 | 3 |
# This file is sourced by Xsession(5), not executed.
|
| 4 | 4 |
|
| 5 |
-# read OPTIONFILE
|
|
| 6 |
-OPTIONS=$(cat "$OPTIONFILE") || true
|
|
| 7 |
- |
|
| 8 |
-has_option() {
|
|
| 9 |
- if [ "${OPTIONS#*
|
|
| 10 |
-$1}" != "$OPTIONS" ]; then
|
|
| 11 |
- return 0
|
|
| 12 |
- else
|
|
| 13 |
- return 1
|
|
| 14 |
- fi
|
|
| 15 |
-}
|
|
| 16 |
- |
|
| 17 | 5 |
# Determine how many arguments were provided.
|
| 18 | 6 |
case $# in
|
| 19 | 7 |
0)
|
| ... | ... | @@ -18,11 +18,11 @@ |
| 18 | 18 |
.\" Suite 330, Boston, MA 02111-1307 USA
|
| 19 | 19 |
.TH Xsession.options 5 "2004\-10\-31" "Debian Project"
|
| 20 | 20 |
.SH NAME
|
| 21 |
-Xsession.options \- configuration options for
|
|
| 21 |
+Xsession.options, Xsession.options.d \- configuration options for
|
|
| 22 | 22 |
.BR Xsession (5)
|
| 23 | 23 |
.SH DESCRIPTION
|
| 24 |
-.I /etc/X11/Xsession.options
|
|
| 25 |
-contains a set of flags that determine some of the behavior of the
|
|
| 24 |
+\fI/etc/X11/Xsession.options\fR and \fI/etc/X11/Xsession.options.d/*.conf\fR
|
|
| 25 |
+contain options that determine some of the behavior of the
|
|
| 26 | 26 |
.BR Xsession (5)
|
| 27 | 27 |
Bourne shell
|
| 28 | 28 |
.RB ( sh (1))
|
| ... | ... | @@ -31,7 +31,7 @@ See the |
| 31 | 31 |
.BR Xsession (5)
|
| 32 | 32 |
manpage for further information.
|
| 33 | 33 |
.PP
|
| 34 |
-.I Xsession.options
|
|
| 34 |
+These configuration files
|
|
| 35 | 35 |
may contain comments, which begin with a hash mark (\(oq#\(cq) and end at
|
| 36 | 36 |
the next newline, just like comments in shell scripts.
|
| 37 | 37 |
The rest of the file consists of options which are expressed as words
|
| ... | ... | @@ -39,6 +39,11 @@ separated by hyphens, with only one option per line. |
| 39 | 39 |
Options are enabled by simply placing them in the file; they are disabled
|
| 40 | 40 |
by prefixing the option name with \(oqno\-\(cq.
|
| 41 | 41 |
.PP
|
| 42 |
+Options are read from \fI/etc/X11/Xsession.options\fR, followed by
|
|
| 43 |
+\fI/etc/X11/Xsession.options.d/*.conf\fR in sorted order; later occurrences of
|
|
| 44 |
+an option (with or without the \(oqno\-\(cq prefix) take precedence over earlier
|
|
| 45 |
+occurrences.
|
|
| 46 |
+.PP
|
|
| 42 | 47 |
Available options are:
|
| 43 | 48 |
.TP
|
| 44 | 49 |
.B allow\-failsafe
|
| 1 |
+Xsession.options.5
|
|
| \ No newline at end of file |
| 1 | 1 |
debian/local/Xsession.5
|
| 2 | 2 |
debian/local/Xsession.options.5
|
| 3 |
+debian/local/Xsession.options.d.5
|