@@ -29,10 +29,10 @@ happyexit() {
2929 echo " # install the GatewayAPI CRDs"
3030 echo " kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml"
3131 echo " "
32- echo " linkerd check --pre # validate that Linkerd can be installed"
32+ echo " linkerd check --pre # validate that Linkerd can be installed"
3333 echo " linkerd install --crds | kubectl apply -f - # install the Linkerd CRDs"
34- echo " linkerd install | kubectl apply -f - # install the control plane into the 'linkerd' namespace"
35- echo " linkerd check # validate everything worked!"
34+ echo " linkerd install | kubectl apply -f - # install the control plane into the 'linkerd' namespace"
35+ echo " linkerd check # validate everything worked!"
3636 echo " "
3737 echo " You can also obtain observability features by installing the viz extension:"
3838 echo " "
@@ -45,29 +45,6 @@ happyexit() {
4545 exit 0
4646}
4747
48- validate_checksum () {
49- filename=$1
50- SHA=$( curl --proto ' =https' --tlsv1.2 -sSfL " ${url} .sha256" )
51- echo " "
52- echo " Validating checksum..."
53-
54- case $checksumbin in
55- * openssl)
56- checksum=$( $checksumbin dgst -sha256 " ${filename} " | sed -e ' s/^.* //' )
57- ;;
58- * shasum)
59- checksum=$( $checksumbin -a256 " ${filename} " | sed -e ' s/ .*$//' )
60- ;;
61- esac
62-
63- if [ " $checksum " != " $SHA " ]; then
64- echo " Checksum validation failed." >&2
65- return 1
66- fi
67- echo " Checksum valid."
68- return 0
69- }
70-
7148OS=$( uname -s)
7249arch=$( uname -m)
7350cli_arch=" "
@@ -119,12 +96,6 @@ case $OS in
11996esac
12097OS=$( echo " $OS " | tr ' [:upper:]' ' [:lower:]' )
12198
122- checksumbin=$( command -v openssl) || checksumbin=$( command -v shasum) || {
123- echo " Failed to find checksum binary. Please install openssl or shasum."
124- exit 1
125- }
126-
127-
12899tmpdir=$( mktemp -d /tmp/linkerd2.XXXXXX)
129100srcfile=" linkerd2-cli-${LINKERD2_VERSION} -${OS} "
130101if [ -n " ${cli_arch} " ]; then
@@ -134,17 +105,15 @@ dstfile="${INSTALLROOT}/bin/linkerd-${LINKERD2_VERSION}"
134105url=" https://github.com/linkerd/linkerd2/releases/download/${LINKERD2_VERSION} /${srcfile} "
135106
136107if [ -e " ${dstfile} " ]; then
137- if validate_checksum " ${dstfile} " ; then
138- echo " "
139- echo " Linkerd ${LINKERD2_VERSION} was already downloaded; making it the default 🎉"
140- echo " "
141- echo " To force re-downloading, delete '${dstfile} ' then run me again."
142- (
143- rm -f " ${INSTALLROOT} /bin/linkerd"
144- ln -s " ${dstfile} " " ${INSTALLROOT} /bin/linkerd"
145- )
146- happyexit
147- fi
108+ echo " "
109+ echo " Linkerd ${LINKERD2_VERSION} was already downloaded; making it the default 🎉"
110+ echo " "
111+ echo " To force re-downloading, delete '${dstfile} ' then run me again."
112+ (
113+ rm -f " ${INSTALLROOT} /bin/linkerd"
114+ ln -s " ${dstfile} " " ${INSTALLROOT} /bin/linkerd"
115+ )
116+ happyexit
148117fi
149118
150119(
153122 echo " Downloading ${srcfile} ..."
154123 curl --proto ' =https' --tlsv1.2 -fLO " ${url} "
155124 echo " Download complete!"
156-
157- if ! validate_checksum " ${srcfile} " ; then
158- exit 1
159- fi
160125 echo " "
161126)
162127
0 commit comments