kernel-shark: Add quotes around $XDG_SESSION_TYPE in kshark-su-record
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.
Link: http://lore.kernel.org/linux-trace-devel/20190722113707.156a099f@gandalf.local.home
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204261
Fixes: 9b1208c4e ("kernel-shark-qt: Workaround for running as Root on Wayland")
Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 file changed