2015-06-05 14:04:44 +02: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
|
2015-10-03 17:09:36 +02:00
|
|
|
which hashboot.sh > /dev/null || return 255
|
2015-06-05 14:04:44 +02:00
|
|
|
|
2015-06-06 01:58:48 +02:00
|
|
|
hashboot.sh check
|
2015-09-29 15:55:28 +02:00
|
|
|
if [ $? -gt 0 ] && [ $? -le 3 ]
|
2015-06-05 14:04:44 +02:00
|
|
|
then
|
2015-06-06 01:58:48 +02:00
|
|
|
echo -n "Recover files? [y/N] "
|
|
|
|
read -r yesno
|
2015-09-26 00:19:06 +02:00
|
|
|
if [ "${yesno}" == "y" ]
|
2015-06-06 01:58:48 +02:00
|
|
|
then
|
|
|
|
hashboot.sh recover
|
|
|
|
fi
|
|
|
|
|
2015-10-03 17:09:36 +02:00
|
|
|
echo "Dropping to shell. Type exit to continue."
|
2015-06-05 14:04:44 +02:00
|
|
|
sh
|
2015-10-03 17:09:36 +02:00
|
|
|
return 3
|
2015-06-06 01:58:48 +02:00
|
|
|
elif [ $? != 0 ]
|
2015-06-08 01:43:23 +02:00
|
|
|
then
|
2015-06-06 01:58:48 +02:00
|
|
|
return $?
|
2015-06-05 14:04:44 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
eend 0
|
2015-06-08 01:43:23 +02:00
|
|
|
}
|