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

Message ID 20191008093354.15060-2-jk@ozlabs.org
State New
Headers show
  • [1/2] pb-console: start shell as a login shell
Related show

Commit Message

Jeremy Kerr Oct. 8, 2019, 9:33 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(-)

diff mbox series

diff --git a/utils/pb-console b/utils/pb-console
index 8245b33..012d242 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" ]
-	PATH=/usr/bin:/usr/sbin:/bin:/sbin
+	export PATH=/usr/bin:/usr/sbin:/bin:/sbin
-export PATH
 if $pb_config debug | grep -q enabled