mirror of
https://schlomp.space/tastytea/hashboot
synced 2024-11-16 14:37:06 +01:00
36 lines
457 B
Plaintext
Executable File
36 lines
457 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 1
|
|
|
|
hashboot.sh check
|
|
if [ $? == 4 ]
|
|
then
|
|
echo -n "Recover files? [y/N] "
|
|
read -r yesno
|
|
if [ ${yesno} == "y" ]
|
|
then
|
|
hashboot.sh recover
|
|
fi
|
|
|
|
sh
|
|
return 4
|
|
elif [ $? != 0 ]
|
|
then
|
|
return $?
|
|
fi
|
|
|
|
eend 0
|
|
}
|