hashboot/initscript.openrc

36 lines
459 B
Plaintext
Raw Normal View History

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