2020-06-29 15:28:10 +08:00
|
|
|
|
From 8ecae3e85d9eeedb131dbc026dcdf5bba95cdb15 Mon Sep 17 00:00:00 2001
|
|
|
|
|
|
From: t_feng <fengtao40@huawei.com>
|
|
|
|
|
|
Date: Thu, 18 Jun 2020 17:13:47 +0800
|
2020-07-01 19:07:10 +08:00
|
|
|
|
Subject: [PATCH] fix hostname info
|
2020-06-29 15:28:10 +08:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
po/zh_CN.po | 6 +++---
|
|
|
|
|
|
pyanaconda/network.py | 4 ++--
|
|
|
|
|
|
2 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/po/zh_CN.po b/po/zh_CN.po
|
|
|
|
|
|
index 0a4d1cd..be8cefe 100644
|
|
|
|
|
|
--- a/po/zh_CN.po
|
|
|
|
|
|
+++ b/po/zh_CN.po
|
|
|
|
|
|
@@ -2365,11 +2365,11 @@ msgstr "本地主机名绝不能以句号\".\"结尾。"
|
|
|
|
|
|
#: pyanaconda/network.py:119
|
|
|
|
|
|
msgid ""
|
|
|
|
|
|
"Host names can only contain the characters 'a-z', 'A-Z', '0-9', '-', or '.', "
|
|
|
|
|
|
-"parts between periods must contain something and cannot start or end with "
|
|
|
|
|
|
-"'-'."
|
|
|
|
|
|
+"parts between periods must contain something being 63 or fewer "
|
|
|
|
|
|
+"characters and cannot start or end with '-'."
|
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
"主机名只能包含 'a-z', 'A-Z', '0-9', '-'(英文减号), 或者 '.'(英文点号),其"
|
|
|
|
|
|
-"中两个点号中不能为空且不能以'-'开头或结尾。"
|
|
|
|
|
|
+"中两个点号中不能为空,必须少于64个字符且不能以'-'开头或结尾。"
|
|
|
|
|
|
|
|
|
|
|
|
#: pyanaconda/network.py:465
|
|
|
|
|
|
msgid "Status not available"
|
|
|
|
|
|
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
|
|
|
|
|
|
index f8e9b19..127a1bd 100644
|
|
|
|
|
|
--- a/pyanaconda/network.py
|
|
|
|
|
|
+++ b/pyanaconda/network.py
|
|
|
|
|
|
@@ -118,8 +118,8 @@ def is_valid_hostname(hostname, local=False):
|
|
|
|
|
|
if not re.match('^' + HOSTNAME_PATTERN_WITHOUT_ANCHORS + '$', hostname):
|
|
|
|
|
|
return (False, _("Host names can only contain the characters 'a-z', "
|
|
|
|
|
|
"'A-Z', '0-9', '-', or '.', parts between periods "
|
|
|
|
|
|
- "must contain something and cannot start or end with "
|
|
|
|
|
|
- "'-'."))
|
|
|
|
|
|
+ "must contain something being 63 or fewer "
|
|
|
|
|
|
+ "characters and cannot start or end with '-'."))
|
|
|
|
|
|
|
|
|
|
|
|
return (True, "")
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
2.23.0
|
|
|
|
|
|
|