Cleanup /etc/motd after doc link shift
This commit is contained in:
		@@ -77,8 +77,6 @@ function set-broken-motd() {
 | 
				
			|||||||
function reset-motd() {
 | 
					function reset-motd() {
 | 
				
			||||||
  # kubelet is installed both on the master and nodes, and the version is easy to parse (unlike kubectl)
 | 
					  # kubelet is installed both on the master and nodes, and the version is easy to parse (unlike kubectl)
 | 
				
			||||||
  local -r version="$(/usr/local/bin/kubelet --version=true | cut -f2 -d " ")"
 | 
					  local -r version="$(/usr/local/bin/kubelet --version=true | cut -f2 -d " ")"
 | 
				
			||||||
  # This regex grabs the minor version, e.g. v1.2.
 | 
					 | 
				
			||||||
  local -r minor="$(echo ${version} | sed -r "s/(v[0-9]+\.[0-9]+).*/\1/g")"
 | 
					 | 
				
			||||||
  # This logic grabs either a release tag (v1.2.1 or v1.2.1-alpha.1),
 | 
					  # This logic grabs either a release tag (v1.2.1 or v1.2.1-alpha.1),
 | 
				
			||||||
  # or the git hash that's in the build info.
 | 
					  # or the git hash that's in the build info.
 | 
				
			||||||
  local gitref="$(echo "${version}" | sed -r "s/(v[0-9]+\.[0-9]+\.[0-9]+)(-[a-z]+\.[0-9]+)?.*/\1\2/g")"
 | 
					  local gitref="$(echo "${version}" | sed -r "s/(v[0-9]+\.[0-9]+\.[0-9]+)(-[a-z]+\.[0-9]+)?.*/\1\2/g")"
 | 
				
			||||||
@@ -95,8 +93,8 @@ If it isn't, the closest tag is at:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Welcome to Kubernetes ${version}!
 | 
					Welcome to Kubernetes ${version}!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
You can find documentation for this release at:
 | 
					You can find documentation for Kubernetes at:
 | 
				
			||||||
  http://kubernetes.io/${minor}/
 | 
					  http://docs.kubernetes.io/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
You can download the build image for this release at:
 | 
					You can download the build image for this release at:
 | 
				
			||||||
  https://storage.googleapis.com/kubernetes-release/release/${version}/kubernetes-src.tar.gz
 | 
					  https://storage.googleapis.com/kubernetes-release/release/${version}/kubernetes-src.tar.gz
 | 
				
			||||||
@@ -106,6 +104,7 @@ It is based on the Kubernetes source at:
 | 
				
			|||||||
${devel}
 | 
					${devel}
 | 
				
			||||||
For Kubernetes copyright and licensing information, see:
 | 
					For Kubernetes copyright and licensing information, see:
 | 
				
			||||||
  /usr/local/share/doc/kubernetes/LICENSES
 | 
					  /usr/local/share/doc/kubernetes/LICENSES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user