]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
login: avoid external process call
authorMax Harmathy <max.harmathy@web.de>
Fri, 12 Jan 2018 13:16:43 +0000 (14:16 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 12 Jan 2018 17:02:57 +0000 (18:02 +0100)
Use a shell builtin of posix shells insteaf of calling 'which'.
See also http://stackoverflow.com/a/677212

xorg/50-systemd-user.sh

index 4d497672283bbf463b9a93fe2559a86f1d19b7e7..5588185c50382ae3e4f376ffb5293ec73da4a489 100755 (executable)
@@ -2,6 +2,6 @@
 
 systemctl --user import-environment DISPLAY XAUTHORITY
 
-if which dbus-update-activation-environment >/dev/null 2>&1; then
+if command -v dbus-update-activation-environment >/dev/null 2>&1; then
         dbus-update-activation-environment DISPLAY XAUTHORITY
 fi