checkroot always checks the root filesystem, even if the pass number in fstab is set to zero. checkfs uses the fsck -A option which doesn't check filesystems whose pass is zero. Making checkroot obey fs_passno would avoid running a fsck on filesystems which do not require it. Reproducible: Always Steps to Reproduce: 1. Set fs_passno to 0 for the root filesystem. 2. Reboot. Actual Results: fsck runs on the root filesystem. Expected Results: fsck should not run.
added -A in cvs
ok, after reading the manpage in depth (which i should have done in the first place), -A is not the way to go about this ... -A will try to fsck more than just / guess we can awk /etc/fstab to see if we should fsck it or not
ok, here's the diff i've tested and works for me ... will be in 1.11.4: - fsck -A -C -T -a / + # Obey the fs_passno setting for / (see fstab(5)) + # - find the / entry + # - make sure we have 6 fields + # - see if fs_passno is something other than 0 + if [ -n "$(awk '($1 ~ /^\// && $2 == "/" \ + && NF == 6 && $6 != 0) { print }' /etc/fstab)" ] + then + ebegin "Checking root filesystem" + fsck -C -T -a / + retval=$? + else + ebegin "Skipping root filesystem check (fstab's passno == 0)" + retval=0 + fi