fix (install.py):  compatable centos7

1. use systemctl  stop firewalld
2. add  dependence:  readline-devel and lrzsz
pull/98/head
yumaojun 2016-02-28 15:23:14 +08:00
parent ccd1a10892
commit ad3178fe94
1 changed files with 3 additions and 4 deletions

View File

@ -82,6 +82,7 @@ class PreSetup(object):
self.key = ''.join(random.choice(string.ascii_lowercase + string.digits) \ self.key = ''.join(random.choice(string.ascii_lowercase + string.digits) \
for _ in range(16)) for _ in range(16))
self.dist = platform.dist()[0].lower() self.dist = platform.dist()[0].lower()
self.version = platform.dist()[1]
@property @property
def _is_redhat(self): def _is_redhat(self):
@ -90,10 +91,8 @@ class PreSetup(object):
@property @property
def _is_centos7(self): def _is_centos7(self):
version = platform.dist()[1] if self.dist == "centos" and self.version.startswith("7"):
if self._is_redhat: return True
if version.startswith("7"):
return True
@property @property
def _is_ubuntu(self): def _is_ubuntu(self):