diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2012-05-19 04:22:14 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2012-05-19 04:26:21 -0700 |
commit | 335937217a51e5e159a14463e0b1e3aedf35c6be (patch) | |
tree | 9042678ecaaf2fc6f3952c0d5c1d3cf0b33ff439 | |
parent | eda973a32552c916e7e7cce8877674106cbda0cb (diff) |
darwin: Silence a syslog message from defaults
Unfortunately defaults has no way to check if a preference exists, and it
prints a message to syslog if we read one that doesn't exist. dpi is one
that commonly doesn't exist and results in user confusion when they read
syslog.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | startx.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -126,7 +126,9 @@ if [ x`defaults read $X11_PREFS_DOMAIN nolisten_tcp` = x1 ] ; then defaultserverargs="$defaultserverargs -nolisten tcp" fi -if defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then +XCOMM The second check is the real one. The first is to hopefully avoid +XCOMM needless syslog spamming. +if defaults read $X11_PREFS_DOMAIN 2> /dev/null | grep -q '"dpi"' && defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then defaultserverargs="$defaultserverargs -dpi `defaults read $X11_PREFS_DOMAIN dpi`" fi |