Skip to content

Commit

Permalink
Minor adjustment to sed filtering to avoid the need to escape an unim…
Browse files Browse the repository at this point in the history
…portant

plus in regex.
  • Loading branch information
jonasbardino committed Jan 7, 2025
1 parent 836c4d5 commit 24f0f1a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -680,11 +680,11 @@ RUN if [ ! -e "${CERT_DIR}/.persistent" ]; then \
&& chown 0:0 *.key server.crt ca.pem \
&& chmod 400 *.key server.crt ca.pem combined.pem server.ca.pem \
&& openssl x509 -noout -fingerprint -sha256 -in combined.pem | \
sed 's/.+ Fingerprint=//g' > combined.pem.sha256 \
sed 's/.* Fingerprint=//g' > combined.pem.sha256 \
&& ssh-keygen -l -E md5 -f combined.pub | \
sed 's/.+ MD5://g,s/ .*//g' > combined.pub.md5 \
sed 's/.* MD5://g,s/ .*//g' > combined.pub.md5 \
&& ssh-keygen -l -f combined.pub | \
sed 's/.+ SHA256://g,s/ .*//g' > combined.pub.sha256; fi
sed 's/.* SHA256://g,s/ .*//g' > combined.pub.sha256; fi

# Prepare keys for mig
RUN if [ ! -e "${CERT_DIR}/.persistent" ]; then \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.rocky8
Original file line number Diff line number Diff line change
Expand Up @@ -697,11 +697,11 @@ RUN if [ ! -e "${CERT_DIR}/.persistent" ]; then \
&& chown 0:0 *.key server.crt ca.pem \
&& chmod 400 *.key server.crt ca.pem combined.pem server.ca.pem \
&& openssl x509 -noout -fingerprint -sha256 -in combined.pem | \
sed 's/.+ Fingerprint=//g' > combined.pem.sha256 \
sed 's/.* Fingerprint=//g' > combined.pem.sha256 \
&& ssh-keygen -l -E md5 -f combined.pub | \
sed 's/.+ MD5://g,s/ .*//g' > combined.pub.md5 \
sed 's/.* MD5://g,s/ .*//g' > combined.pub.md5 \
&& ssh-keygen -l -f combined.pub | \
sed 's/.+ SHA256://g,s/ .*//g' > combined.pub.sha256; fi
sed 's/.* SHA256://g,s/ .*//g' > combined.pub.sha256; fi

# Prepare keys for mig
RUN if [ ! -e "${CERT_DIR}/.persistent" ]; then \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.rocky9
Original file line number Diff line number Diff line change
Expand Up @@ -656,11 +656,11 @@ RUN if [ ! -e "${CERT_DIR}/.persistent" ]; then \
&& chown 0:0 *.key server.crt ca.pem \
&& chmod 400 *.key server.crt ca.pem combined.pem server.ca.pem \
&& openssl x509 -noout -fingerprint -sha256 -in combined.pem | \
sed 's/.+ Fingerprint=//g' > combined.pem.sha256 \
sed 's/.* Fingerprint=//g' > combined.pem.sha256 \
&& ssh-keygen -l -E md5 -f combined.pub | \
sed 's/.+ MD5://g,s/ .*//g' > combined.pub.md5 \
sed 's/.* MD5://g,s/ .*//g' > combined.pub.md5 \
&& ssh-keygen -l -f combined.pub | \
sed 's/.+ SHA256://g,s/ .*//g' > combined.pub.sha256; fi
sed 's/.* SHA256://g,s/ .*//g' > combined.pub.sha256; fi

# Prepare keys for mig
RUN if [ ! -e "${CERT_DIR}/.persistent" ]; then \
Expand Down

0 comments on commit 24f0f1a

Please sign in to comment.