]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: developer mode: set PATH, too
authorSage Weil <sage@inktank.com>
Wed, 31 Jul 2013 06:08:58 +0000 (23:08 -0700)
committerSage Weil <sage@inktank.com>
Wed, 31 Jul 2013 06:08:58 +0000 (23:08 -0700)
Otherwise the call to ceph-conf may fail if it is not installed on the
local machine.

Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph.in

index 6caef354a10253ddf55c5d861000149cbe9d0153..b9d3b04c94d866ef7a49c8d36d8d4e7641a0099d 100755 (executable)
@@ -26,7 +26,7 @@ import sys
 
 MYPATH = os.path.abspath(__file__)
 MYDIR = os.path.dirname(MYPATH)
-DEVMODEMSG = '*** DEVELOPER MODE: setting PYTHONPATH and LD_LIBRARY_PATH'
+DEVMODEMSG = '*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***'
 
 if MYDIR.endswith('src') and \
    os.path.exists(os.path.join(MYDIR, '.libs')) and \
@@ -35,6 +35,7 @@ if MYDIR.endswith('src') and \
     if 'LD_LIBRARY_PATH' in os.environ:
         if MYLIBPATH not in os.environ['LD_LIBRARY_PATH']:
             os.environ['LD_LIBRARY_PATH'] += ':' + MYLIBPATH
+            os.environ['PATH'] += ':' + MYDIR
             print >> sys.stderr, DEVMODEMSG
             os.execvp('python', ['python'] + sys.argv)
     else: