]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Add CEPH_ARGS at the end of sys.argv
authorBenoît Knecht <benoit.knecht@fsfe.org>
Mon, 23 Sep 2013 13:58:42 +0000 (15:58 +0200)
committerSage Weil <sage@inktank.com>
Thu, 26 Sep 2013 23:06:29 +0000 (16:06 -0700)
This allows, for instance, to pass a different client name to ceph by
exporting CEPH_ARGS="--id client_id".

Signed-off-by: Benoît Knecht <benoit.knecht@fsfe.org>
Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph.in

index 320e4bd413fd2f60a71e3c1fe6e1b074e544cd82..07b8dc12fd204296c44a0bb71be5c940666e15e8 100755 (executable)
@@ -476,6 +476,9 @@ def complete(sigdict, args, target):
 ###
 
 def main():
+    ceph_args = os.environ.get('CEPH_ARGS')
+    if ceph_args:
+        sys.argv.extend(ceph_args.split())
 
     parser, parsed_args, childargs = parse_cmdargs()