7 for _PARAMETER
in ${LIVE_BOOT_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 case "${LIVE_VERIFY_CHECKSUMS}" in
32 LIVE_VERIFY_CHECKSUMS_DIGESTS
="${LIVE_VERIFY_CHECKSUMS_DIGESTS:-sha512 sha384 sha256 sha224 sha1 md5}"
35 log_begin_msg
"Verifying checksums"
39 for _DIGEST
in $
(echo ${LIVE_VERIFY_CHECKSUMS_DIGESTS} |
sed -e 's|,| |g')
41 _CHECKSUMS
="$(echo ${_DIGEST} | tr [a-z] [A-Z])SUMS ${_DIGEST}sum.txt"
43 for _CHECKSUM
in ${_CHECKSUMS}
45 if [ -e "${_CHECKSUM}" ]
47 echo "Found ${_CHECKSUM}..." > "${_TTY}"
49 if [ -e "/bin/${_DIGEST}sum" ]
51 echo "Checking ${_CHECKSUM}..." > "${_TTY}"
54 /bin
/${_DIGEST}sum -c "${_CHECKSUM}" < "${_TTY}" > "${_TTY}"
57 # Stop after first verification
60 echo "Not found
/bin
/${_DIGEST}sum...
" > "${_TTY}"
70 log_success_msg "Verification successfull
, rebooting
in 10 seconds.
"
75 umount -f "${_MOUNTPOINT}" > /dev/null 2>&1
78 # Attempt to remount all mounted filesystems read-only
79 echo u > /proc/sysrq-trigger
81 # Immediately reboot the system without syncing or unmounting filesystems
82 echo b > /proc/sysrq-trigger
86 panic "Verification failed
, $
(basename ${_TTY}) for more information.
"