diff options
author | Erich Eckner <git@eckner.net> | 2016-04-13 14:12:14 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-04-13 14:12:14 +0200 |
commit | 2b588323a8502a20dfafb4cf2717ce4f5cf9be69 (patch) | |
tree | 47ff2a68aecaea1f6638d22a985055ed866f4ab6 /README | |
parent | c78af27f50e3f3072549a98433bf802dc08bcb5c (diff) | |
download | archMirrorBootStrap-2b588323a8502a20dfafb4cf2717ce4f5cf9be69.tar.xz |
auch CA-Zertifikat installieren
Diffstat (limited to 'README')
-rwxr-xr-x | README | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1,7 +1,22 @@ #!/bin/bash # to be run as root ... -set -o +set -e + +# check and possibly install root-certificate +if ! curl -o /dev/null "https://jeti100.ioq.uni-jena.de/" 2> /dev/null +then + cert="$(curl -o - "http://jeti100.ioq.uni-jena.de/statisch/ca.crt" 2> /dev/null)" + if ! echo "${cert}" | \ + sha512sum | \ + grep -q "^c1a9da72183ef6fd87deb506dd93ea3e6247d28ec0720914c97a80369e9e81cb7e9f7ce37fe063756880eb84f402fec20ccb3c2c4fb46f5f707a022f803372be -\$" + then + >&2 echo 'falsches CA-Zertifikat heruntergeladen' + exit 1 + fi + echo "${cert}" > /usr/share/ca-certificates/trust-source/anchors/jeti100.crt + trust export-compat +fi # import keys: pacman-key --add <(curl -o - "https://arch.eckner.net/archlinuxewe/masterkeys.gpg") |