2015-06-05 08:04:44 -04:00
|
|
|
#!/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
|
|
|
|
|
2015-06-05 19:58:48 -04:00
|
|
|
hashboot.sh check
|
2015-09-29 09:55:28 -04:00
|
|
|
if [ $? -gt 0 ] && [ $? -le 3 ]
|
2015-06-05 08:04:44 -04:00
|
|
|
then
|
2015-06-05 19:58:48 -04:00
|
|
|
echo -n "Recover files? [y/N] "
|
|
|
|
read -r yesno
|
2015-09-25 18:19:06 -04:00
|
|
|
if [ "${yesno}" == "y" ]
|
2015-06-05 19:58:48 -04:00
|
|
|
then
|
|
|
|
hashboot.sh recover
|
|
|
|
fi
|
|
|
|
|
2015-06-05 08:04:44 -04:00
|
|
|
sh
|
2015-06-05 19:58:48 -04:00
|
|
|
return 4
|
|
|
|
elif [ $? != 0 ]
|
2015-06-07 19:43:23 -04:00
|
|
|
then
|
2015-06-05 19:58:48 -04:00
|
|
|
return $?
|
2015-06-05 08:04:44 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
eend 0
|
2015-06-07 19:43:23 -04:00
|
|
|
}
|