Skip to content

Commit

Permalink
Extending verify-checksums parameters to allow specifying custom list…
Browse files Browse the repository at this point in the history
… of digests.
  • Loading branch information
daniel-baumann committed Jul 25, 2012
1 parent b5a27fa commit 103c89d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/boot/3010-verify-checksums
Expand Up @@ -7,6 +7,11 @@ Verify_checksums ()
for _PARAMETER in ${_CMDLINE}
do
case "${_PARAMETER}" in
live-boot.verify-checksums=*|verify-checksums=*)
LIVE_VERIFY_CHECKSUMS="true"
LIVE_VERIFY_CHECKSUMS_DIGESTS="${_PARAMETER#*verify-checksums=}"
;;

live-boot.verify-checksums|verify-checksums)
LIVE_VERIFY_CHECKSUMS="true"
;;
Expand All @@ -20,14 +25,14 @@ Verify_checksums ()

_MOUNTPOINT="${1}"

_DIGESTS="sha512 sha384 sha256 sha224 sha1 md5"
LIVE_VERIFY_CHECKSUMS_DIGESTS="${LIVE_VERIFY_CHECKSUMS_DIGESTS:-sha512 sha384 sha256 sha224 sha1 md5}"
_TTY="/dev/tty8"

log_begin_msg "Verifying checksums"

cd "${_MOUNTPOINT}"

for _DIGEST in ${_DIGESTS}
for _DIGEST in $(echo ${LIVE_VERIFY_CHECKSUMS_DIGESTS} | sed -e 's|,| |g')
do
_CHECKSUMS="$(echo ${_DIGEST} | tr [a-z] [A-Z])SUMS"

Expand Down

0 comments on commit 103c89d

Please sign in to comment.