7 for _PARAMETER
in ${_CMDLINE}
9 case "${_PARAMETER}" in
10 live-boot.verify-checksums
=*|verify-checksums
=*)
11 LIVE_VERIFY_CHECKSUMS
="true"
12 LIVE_VERIFY_CHECKSUMS_DIGESTS
="${_PARAMETER#*verify-checksums=}"
15 live-boot.verify-checksums|verify-checksums
)
16 LIVE_VERIFY_CHECKSUMS
="true"
21 if [ "${LIVE_VERIFY_CHECKSUMS}" != "true" ]
28 LIVE_VERIFY_CHECKSUMS_DIGESTS
="${LIVE_VERIFY_CHECKSUMS_DIGESTS:-sha512 sha384 sha256 sha224 sha1 md5}"
31 log_begin_msg
"Verifying checksums"
35 for _DIGEST
in $
(echo ${LIVE_VERIFY_CHECKSUMS_DIGESTS} |
sed -e 's|,| |g')
37 _CHECKSUMS
="$(echo ${_DIGEST} | tr [a-z] [A-Z])SUMS"
39 if [ -e "${_CHECKSUMS}" ]
41 echo "Found ${_CHECKSUMS}..." > "${_TTY}"
43 if [ -e "/bin/${_DIGEST}sum" ]
45 echo "Checking ${_CHECKSUMS}..." > "${_TTY}"
48 /bin
/${_DIGEST}sum -c "${_CHECKSUMS}" < "${_TTY}" > "${_TTY}"
51 # Stop after first verification
54 echo "Not found
/bin
/${_DIGEST}sum...
" > "${_TTY}"
63 log_success_msg "Verification successfull
, rebooting
in 10 seconds.
"
68 umount -f ${_MOUNTPOINT} > /dev/null 2>&1
71 # Attempt to remount all mounted filesystems read-only
72 echo u > /proc/sysrq-trigger
74 # Immediately reboot the system without syncing or unmounting filesystems
75 echo b > /proc/sysrq-trigger
79 panic "Verification failed
, $
(basename ${_TTY}) for more information.
"