{"id":311,"date":"2009-12-09T18:36:48","date_gmt":"2009-12-09T10:36:48","guid":{"rendered":"http:\/\/www.julyclyde.org\/?p=311"},"modified":"2009-12-09T18:36:48","modified_gmt":"2009-12-09T10:36:48","slug":"redhat-%e7%bd%91%e7%bb%9c%e5%ae%89%e8%a3%85%ef%bc%8c%e5%af%b9nfs-url%e7%9a%84%e6%a0%bc%e5%bc%8f%e8%a6%81%e6%b1%82%e5%be%88%e9%ab%98%e5%93%a6","status":"publish","type":"post","link":"https:\/\/julyclyde.org\/?p=311","title":{"rendered":"RedHat \u7f51\u7edc\u5b89\u88c5\uff0c\u5bf9NFS URL\u7684\u683c\u5f0f\u8981\u6c42\u5f88\u9ad8\u54e6"},"content":{"rendered":"<p>\u4eca\u5929\u7528nfs:\/\/host\/dir\u7684\u683c\u5f0f\u5b89\u88c5\u5931\u8d25\u4e86\u3002\u540e\u6765\u770b\u4e86python-virtinst-0.400.3-5.el5\u5305\u91cc\u9762\ufeffDistroInstaller.py\u6587\u4ef6\u7684\u6e90\u7801\uff0c\u53d1\u73b0\u5176\u4e2d\u6709\u4e00\u6b65\u662f\u8f6c\u6362NFS URL\u7684\u683c\u5f0f\uff1a<br \/>\n<code>def _sanitize_url(url):<br \/>\n\"\"\"<br \/>\nDo nothing for http or ftp, but make sure nfs is in the expected format<br \/>\n\"\"\"<br \/>\nif url.startswith(\"nfs:\/\/\"):<br \/>\n# Convert RFC compliant NFS\u00a0\u00a0\u00a0\u00a0\u00a0 nfs:\/\/server\/path\/to\/distro<br \/>\n# to what mount\/anaconda expect\u00a0 nfs:server:\/path\/to\/distro<br \/>\n# and carry the latter form around internally<br \/>\nurl = \"nfs:\" + url[6:]<\/p>\n<p># If we need to add the : after the server<br \/>\nindex = url.find(\"\/\", 4)<br \/>\nif index == -1:<br \/>\nraise ValueError(_(\"Invalid NFS format: No path specified.\"))<br \/>\nif url[index - 1] != \":\":<br \/>\nurl = url[:index] + \":\" + url[index:]<\/p>\n<p>return url<\/code><br \/>\n\u4e8e\u662f\u6309\u7167\u5b83\u90a3\u4e2a\u5199\u6210nfs:host:\/dir \u5c31\u6210\u529f\u4e86\u3002\u4f30\u8ba1\u662f\u8f6c\u6362\u811a\u672c\u6ca1\u6709\u6b63\u5e38\u8fd0\u884c\u9020\u6210\u7684<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u7528nfs:\/\/host\/dir\u7684\u683c\u5f0f\u5b89\u88c5\u5931\u8d25\u4e86\u3002\u540e\u6765\u770b\u4e86python-virtinst-0.400.3-5.el5\u5305\u91cc\u9762\ufeffDistroInstaller.py\u6587\u4ef6\u7684\u6e90\u7801\uff0c\u53d1\u73b0\u5176\u4e2d\u6709\u4e00\u6b65\u662f\u8f6c\u6362NFS URL\u7684\u683c\u5f0f\uff1a def _sanitize_url(url): &#8220;&#8221;&#8221; Do nothing for http or ftp, but make sure nfs is in the expected format &#8220;&#8221;&#8221; if url.startswith(&#8220;nfs:\/\/&#8221;): # Convert RFC compliant NFS\u00a0\u00a0\u00a0\u00a0\u00a0 nfs:\/\/server\/path\/to\/distro # to what mount\/anaconda expect\u00a0 nfs:server:\/path\/to\/distro # and carry the latter &hellip; <a href=\"https:\/\/julyclyde.org\/?p=311\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[31,29,10,27,34,32],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-default","tag-bugs","tag-enterprise","tag-linux","tag-python","tag-redhat","tag-virtualization"],"_links":{"self":[{"href":"https:\/\/julyclyde.org\/index.php?rest_route=\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/julyclyde.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/julyclyde.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/julyclyde.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/julyclyde.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311"}],"version-history":[{"count":0,"href":"https:\/\/julyclyde.org\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions"}],"wp:attachment":[{"href":"https:\/\/julyclyde.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/julyclyde.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/julyclyde.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}