diff --git a/README.md b/README.md index 3e3f207ff..e4c2f5ae3 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ #欢迎使用Jumpserver **Jumpserver** 是一款由python编写开源的跳板机(堡垒机)系统,实现了跳板机应有的功能。基于ssh协议来管理,客户端无需安装agent。 支持常见系统: - 1. redhat centos - 2. debian - 3. suse ubuntu - 4. freebsd + 1. CentOS, RedHat, Fedora, Amazon Linux + 2. Debian + 3. SUSE, Ubuntu + 4. FreeBSD 5. 其他ssh协议硬件设备 ###截图: diff --git a/install/install.py b/install/install.py index 01b281a92..da26157a5 100755 --- a/install/install.py +++ b/install/install.py @@ -80,12 +80,12 @@ class PreSetup(object): self.ip = '' self.key = ''.join(random.choice(string.ascii_lowercase + string.digits) \ for _ in range(16)) - self.dist = platform.dist()[0].lower() - self.version = platform.dist()[1] + self.dist = platform.linux_distribution(supported_dists=['system'])[0].lower() + self.version = platform.linux_distribution(supported_dists=['system'])[1] @property def _is_redhat(self): - if self.dist == "centos" or self.dist == "redhat" or self.dist == "fedora": + if self.dist == "centos" or self.dist == "redhat" or self.dist == "fedora" or self.dist == "amazon linux ami": return True @property @@ -105,7 +105,7 @@ class PreSetup(object): def check_platform(self): if not (self._is_redhat or self._is_ubuntu): - print(u"支持的平台: CentOS, RedHat, Fedora, Debian, Ubuntu, 暂不支持其他平台安装.") + print(u"支持的平台: CentOS, RedHat, Fedora, Debian, Ubuntu, Amazon Linux, 暂不支持其他平台安装.") exit() @staticmethod diff --git a/templates/setting.html b/templates/setting.html index d13cf7f4f..061a71f0e 100644 --- a/templates/setting.html +++ b/templates/setting.html @@ -109,7 +109,7 @@ timely: 2, theme: "yellow_right_effect", rules: { - check_name: [/^\w{2,20}$/, '大小写字母数字和下划线,2-20位'], + check_name: [/^(\w|\-){2,20}$/, '大小写字母、数字、中划线和下划线,2-20位'], check_port: [/^\d{1,5}$/, '端口号不正确'], either: function(){ return $('#password').val() == ''