Julien Cristau pushed to branch debian-unstable at X Strike Force / xserver / xorg-server
Commits:
-
fdabbaca
by Eli Schwartz at 2018-07-03T11:46:23+02:00
-
72da781e
by Eli Schwartz at 2018-07-03T11:46:28+02:00
-
819b2f0c
by Julien Cristau at 2018-07-03T11:52:45+02:00
1 changed file:
Changes:
... | ... | @@ -22,9 +22,9 @@ XAUTHPROTO=. |
22 | 22 |
# the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while the
|
23 | 23 |
# script is running, and this cannot, only being calculated once.)
|
24 | 24 |
DEFCOLUMNS=$(stty size 2>/dev/null | awk '{print $2}') || true
|
25 |
-if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" >/dev/null 2>&1; then
|
|
26 |
- DEFCOLUMNS=80
|
|
27 |
-fi
|
|
25 |
+case "$DEFCOLUMNS" in
|
|
26 |
+ *[!0-9]*|'') DEFCOLUMNS=80 ;;
|
|
27 |
+esac
|
|
28 | 28 |
|
29 | 29 |
# Display a message, wrapping lines at the terminal width.
|
30 | 30 |
message () {
|
... | ... | @@ -134,7 +134,7 @@ if [ -z "$*" ]; then |
134 | 134 |
exit 2
|
135 | 135 |
fi
|
136 | 136 |
|
137 |
-if ! which xauth >/dev/null; then
|
|
137 |
+if ! command -v xauth >/dev/null; then
|
|
138 | 138 |
error "xauth command not found"
|
139 | 139 |
exit 3
|
140 | 140 |
fi
|
... | ... | @@ -146,8 +146,9 @@ trap clean_up EXIT |
146 | 146 |
# directory to house one.
|
147 | 147 |
if [ -z "$AUTHFILE" ]; then
|
148 | 148 |
XVFB_RUN_TMPDIR="$(mktemp -d -t $PROGNAME.XXXXXX)"
|
149 |
+ AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority"
|
|
149 | 150 |
# Create empty file to avoid xauth warning
|
150 |
- AUTHFILE=$(tempfile -n "$XVFB_RUN_TMPDIR/Xauthority")
|
|
151 |
+ touch "$AUTHFILE"
|
|
151 | 152 |
fi
|
152 | 153 |
|
153 | 154 |
# Start Xvfb.
|