pb-console: don't modify PATH unless it's empty
diff mbox series

Message ID 20190815071821.19956-1-jk@ozlabs.org
State New
Headers show
Series
  • pb-console: don't modify PATH unless it's empty
Related show

Commit Message

Jeremy Kerr Aug. 15, 2019, 7:18 a.m. UTC
We're now running pb-console through a proper login shell, so we
shouldn't need to modify PATH, as we expect it to be properly set up by
the shell profile.

This change removes the unconditional PATH modification, so we only set
a basic PATH if it's currently empty.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
---
 utils/pb-console | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/utils/pb-console b/utils/pb-console
index ab5eaaa..845f3f6 100644
--- a/utils/pb-console
+++ b/utils/pb-console
@@ -119,10 +119,8 @@  esac
 # we may have been run from udev - ensure we have a sensible PATH
 if [ -z "$PATH" ]
 then
-	PATH=/usr/bin:/usr/sbin:/bin:/sbin
+	export PATH=/usr/bin:/usr/sbin:/bin:/sbin
 fi
-PATH=/var/lib/pb-plugins/bin:$PATH
-export PATH
 
 verbose_opt=
 if $pb_config debug | grep -q enabled