mirror of https://schlomp.space/tastytea/hashboot
37 lines
529 B
Plaintext
Executable File
37 lines
529 B
Plaintext
Executable File
#!/sbin/runscript
|
|
|
|
description="Check integrity of files in /boot"
|
|
|
|
depend()
|
|
{
|
|
need localmount
|
|
}
|
|
|
|
start()
|
|
{
|
|
ebegin "Checking integrity of files in /boot"
|
|
|
|
# See if hashboot.sh is accessible
|
|
which hashboot.sh > /dev/null || return 255
|
|
|
|
hashboot.sh check
|
|
if [ $? -gt 0 ] && [ $? -le 3 ]
|
|
then
|
|
echo -n "Recover files? [y/N] "
|
|
read -r yesno
|
|
if [ "${yesno}" == "y" ]
|
|
then
|
|
hashboot.sh recover
|
|
fi
|
|
|
|
echo "Dropping to shell. Type exit to continue."
|
|
sh
|
|
return 3
|
|
elif [ $? != 0 ]
|
|
then
|
|
return $?
|
|
fi
|
|
|
|
eend 0
|
|
}
|