You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/06/03 19:37:03 UTC
ambari git commit: AMBARI-11664. Unable to Install Hive Due To
Invalid sudo Module Function (aonishuk)
Repository: ambari
Updated Branches:
refs/heads/trunk 22cac0a2a -> 7a75fb0a3
AMBARI-11664. Unable to Install Hive Due To Invalid sudo Module Function (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7a75fb0a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7a75fb0a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7a75fb0a
Branch: refs/heads/trunk
Commit: 7a75fb0a3eaf8ffcf253c9bad2ca0e76afca5d7f
Parents: 22cac0a
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Jun 3 20:36:45 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Jun 3 20:36:45 2015 +0300
----------------------------------------------------------------------
.../src/main/python/resource_management/core/sudo.py | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7a75fb0a/ambari-common/src/main/python/resource_management/core/sudo.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/sudo.py b/ambari-common/src/main/python/resource_management/core/sudo.py
index 4a123ad..4ceaaed 100644
--- a/ambari-common/src/main/python/resource_management/core/sudo.py
+++ b/ambari-common/src/main/python/resource_management/core/sudo.py
@@ -88,6 +88,9 @@ if os.geteuid() == 0:
def path_lexists(path):
return os.path.lexists(path)
+ def readlink(path):
+ return os.readlink(path)
+
def path_isfile(path):
return os.path.isfile(path)
@@ -187,6 +190,10 @@ else:
def path_lexists(path):
return (shell.call(["test", "-L", path], sudo=True)[0] == 0)
+ # os.readlink
+ def readlink(path):
+ return shell.checked_call(["readlink", path], sudo=True)[1].strip()
+
# os.path.isfile
def path_isfile(path):
return (shell.call(["test", "-f", path], sudo=True)[0] == 0)