Bug 240017 - sysutils/cpu-x cpu-x_polkit script errors when "XDG_SESSION_TYPE" variable not set
Summary: sysutils/cpu-x cpu-x_polkit script errors when "XDG_SESSION_TYPE" variable no...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-21 16:22 UTC by Jim D.
Modified: 2020-01-26 13:24 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (danfe)


Attachments
diff file for change to script test of XDG_SESSION_TYPE variable (238 bytes, patch)
2019-08-21 16:22 UTC, Jim D.
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jim D. 2019-08-21 16:22:04 UTC
Created attachment 206755 [details]
diff file for change to script test of XDG_SESSION_TYPE variable

System: FreeBSD 12.0-RELEASE #1 r350972M
Port Version: 3.2.3
Desktop: Mate-1.20.0
XDG ports installed: xdg-utils-1.1.1

When attempting to execute cpu-x as non-root user, it invokes "cpu-x_polkit" script. In my environment, the "XDG_SESSION_TYPE" variable is undefined. This causes a script error.

Simple static character prefix to script test of that variable prevents the script error. Proposed patch included in attachment (also includes closing script statement "exit").
Comment 1 Alexey Dokuchaev freebsd_committer 2020-01-26 13:24:10 UTC
Looks like current version in the ports, 3.2.4, already has $XDG_SESSION_TYPE properly quoted:

> data/cpu-x_polkit.in: if [ "$XDG_SESSION_TYPE" = "wayland" ] ...