When using 'ptxdist bash' some tools installed by ptxdist may have to be
used as root. some sudo installations do not pass through the PATH environment
variable so that 'sudo <somecommand-in-sysroot-host>' results in command not
found error messages. This patch adds a ptxsudo alias that can be used in such
situations. The name has been chosen rather than regular 'sudo' since the
said feature is a security feature protecting against path spoofing which
we do not want to disable silently.

Signed-off-by: Sascha Hauer <[email protected]>
---
 bin/ptxdist | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bin/ptxdist b/bin/ptxdist
index 0a86ad9..13bf9f7 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1712,6 +1712,7 @@ parse_second()
 . ~/.bashrc
 PS1="[ptx] \${PS1}"
 PATH="${PATH}"
+alias ptxsudo='sudo env PATH=$PATH'
 EOF
                                "${BASH}" --init-file "${bashrc}"
                        else
-- 
1.8.5.3


-- 
ptxdist mailing list
[email protected]

Reply via email to