diff options
author | Sage Weil <sage@inktank.com> | 2013-06-14 16:29:10 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-06-17 11:16:42 -0700 |
commit | e538829f16ce19d57d63229921afa01cc687eb86 (patch) | |
tree | 29314883ef87c1b24806f39156a3524bc2d9eecf | |
parent | d7f7d613512fe39ec883e11d201793c75ee05db1 (diff) | |
download | ceph-e538829f16ce19d57d63229921afa01cc687eb86.tar.gz |
ceph-disk: clear TERM to avoid libreadline hijinx
The weird output from libreadline users is related to the TERM variable.
Signed-off-by: Sage Weil <sage@inktank.com>
-rwxr-xr-x | src/ceph-disk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ceph-disk b/src/ceph-disk index 26097c8e089..3f15a9a1d22 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -57,6 +57,11 @@ INIT_SYSTEMS = [ 'auto', ] +# Nuke the TERM variable to avoid confusing any subprocesses we call. +# For example, libreadline will print weird control sequences for some +# TERM values. +if 'TERM' in os.environ: + del os.environ['TERM'] LOG_NAME = __name__ if LOG_NAME == '__main__': |