From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: howaboutsynergy@pm.me
Subject: [PATCH] kernel-shark: Add quotes around $XDG_SESSION_TYPE in kshark-su-record
Date: Mon, 22 Jul 2019 11:37:07 -0400 [thread overview]
Message-ID: <20190722113707.156a099f@gandalf.local.home> (raw)
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
If XDG_SESSION_TYPE is not set, then $XDG_SESSION_TYPE will become nothing,
which means the test:
if [ $XDG_SESSION_TYPE = "wayland" ];
turns into
if [ = "wayland" ];
And will cause a shell error. Adding quotes around "$XDG_SESSION_TYPE"
changes an empty $XDG_SESSION_TYPE into:
if [ "" = "wayland" ];
which the shell can understand.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204261
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel-shark/bin/kshark-su-record | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
index ee839a26..2477045f 100755
--- a/kernel-shark/bin/kshark-su-record
+++ b/kernel-shark/bin/kshark-su-record
@@ -1,6 +1,6 @@
#!/bin/bash
-if [ $XDG_SESSION_TYPE = "wayland" ]
+if [ "$XDG_SESSION_TYPE" = "wayland" ]
then
xhost +si:localuser:root &>/dev/null
fi
--
2.20.1
next reply other threads:[~2019-07-22 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 15:37 Steven Rostedt [this message]
2019-07-23 8:02 ` [PATCH] kernel-shark: Add quotes around $XDG_SESSION_TYPE in kshark-su-record Yordan Karadzhov (VMware)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190722113707.156a099f@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=howaboutsynergy@pm.me \
--cc=linux-trace-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).