Detect when system does not contain any UFS partitions and skip it to run fsck -z
On a system with a broken filesystem it could end up on an infinite loop since fsck -z call would always return != 0. Save a counter on flag file and let it to try 3 times to run. If it fails just warn user and proceed with boot
Related issues
Bug #9612: Run fsck with -z for ufs on upgrade to address FreeBSD-SA-19:10.ufs
Ticket #9612: Prevent infinite loop and skip zfs
run fsck -z
loop since fsck -z call would always return != 0. Save a counter on
flag file and let it to try 3 times to run. If it fails just warn
user and proceed with boot