9 _DIGESTS
="sha512 sha384 sha256 sha224 sha1 md5"
12 log_begin_msg
"Verifying checksums"
16 for _DIGEST
in ${_DIGESTS}
18 _CHECKSUMS
="$(echo ${_DIGEST} | tr [a-z] [A-Z])SUMS"
20 if [ -e "${_CHECKSUMS}" ]
22 echo "Found ${_CHECKSUMS}..." > "${_TTY}"
24 if [ -e "/bin/${_DIGEST}sum" ]
26 echo "Checking ${_CHECKSUMS}..." > "${_TTY}"
29 /bin
/${_DIGEST}sum -c "${_CHECKSUMS}" < "${_TTY}" > "${_TTY}"
32 # Stop after first verification
35 echo "Not found
/bin
/${_DIGEST}sum...
" > "${_TTY}"
44 log_success_msg "Verification successfull
, rebooting
in 10 seconds.
"
49 umount -f ${_MOUNTPOINT} > /dev/null 2>&1
52 # Attempt to remount all mounted filesystems read-only
53 echo u > /proc/sysrq-trigger
55 # Immediately reboot the system without syncing or unmounting filesystems
56 echo b > /proc/sysrq-trigger
60 panic "Verification failed
, $
(basename ${_TTY}) for more information.
"