Author: glen
Date: Thu Feb 23 15:43:44 2006
New Revision: 7005

Modified:
   rc-scripts/trunk/rc.d/rc.sysinit
Log:
Respect fs_passno for rootfs when doing rootfs fsck. Enable paralell fsck for 
other filesystems.

Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit    (original)
+++ rc-scripts/trunk/rc.d/rc.sysinit    Thu Feb 23 15:43:44 2006
@@ -283,12 +283,17 @@
 
        if [ -f /forcefsck ]; then
                fsckoptions="-f $fsckoptions"
+       else
+               # Obey the fs_passno setting for / (see fstab(5))
+               # - find the / entry
+               # - make sure we have 6 fields
+               _ROOTFS_PASSNO=$(awk '($1 ~ /^(\/|UUID|LABEL)/ && $2 == "/" && 
NF == 6) { print $6}' /etc/fstab)
        fi
 
        _RUN_QUOTACHECK=0
        _ROOTFS_TYPE=$(awk '$2 == "/" && $3 != "rootfs" { print $3 }' 
/proc/mounts 2>/dev/null)
 
-       if [ -z "$fastboot" -a "$_ROOTFS_TYPE" != "nfs" -a "$_ROOTFS_TYPE" != 
"romfs" ]; then
+       if [ -z "$fastboot" -a "$_ROOTFS_TYPE" != "nfs" -a "$_ROOTFS_TYPE" != 
"romfs" -a "$_ROOTFS_PASSNO" != 0 ]; then
                show "Checking root filesystem"; started
                initlog -c "fsck -C -T -a $fsckoptions /"
 
@@ -646,7 +651,7 @@
        if [ -z "$fastboot" ] && ! grep -q nofsck /proc/cmdline 2>/dev/null; 
then
                rc_splash "fsck start"
                show "Checking filesystems"; started
-               initlog -c "fsck -C -T -R -A -a $fsckoptions"
+               initlog -c "fsck -C -T -R -A -a -P $fsckoptions"
 
                rc=$?
 
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to