[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Preserve evnironment in su and sudo commands
commit 235416252df23e0030a6cfa279cb37a5c0b60718
Author: anadahz <kojgelo@xxxxxxxxx>
Date: Sun Jul 12 20:55:25 2015 +0200
Preserve evnironment in su and sudo commands
---
scripts/install.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/install.sh b/scripts/install.sh
index 6efd19f..6dbe7c3 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -81,9 +81,9 @@ user="$(id -un 2>/dev/null || true)"
sh_c='sh -c'
if [ "$user" != 'root' ]; then
if command_exists sudo; then
- sh_c='sudo sh -c'
+ sh_c='sudo sh -c -E'
elif command_exists su; then
- sh_c='su -c'
+ sh_c='su -c --preserve-environment'
else
echo >&2 'Error: this installer needs the ability to run commands as root.'
echo >&2 'We are unable to find either "sudo" or "su" available to make this happen.'
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits