[oe-commits] org.oe.dev initscripts: checkroot.sh: enable auto-fsck on boot for ext2 and ext3 rootfs partitions * * * Untested in .dev! * * *
coredump commit
openembedded-commits at lists.openembedded.org
Tue Nov 7 23:08:35 UTC 2006
initscripts: checkroot.sh: enable auto-fsck on boot for ext2 and ext3 rootfs partitions * * * Untested in .dev! * * *
Author: coredump at openembedded.org
Branch: org.openembedded.dev
Revision: 27501039f4773e7f3b2142998ee04c9f71c6fa20
ViewMTN: http://monotone.openembedded.org/revision.psp?id=27501039f4773e7f3b2142998ee04c9f71c6fa20
Files:
1
packages/initscripts/initscripts-1.0/checkroot.sh
packages/initscripts/initscripts_1.0.bb
Diffs:
#
# mt diff -r66190b5f9155cf291b0a7158138e14ab4d333823 -r27501039f4773e7f3b2142998ee04c9f71c6fa20
#
#
#
# patch "packages/initscripts/initscripts-1.0/checkroot.sh"
# from [b17337e6503486a51b8eaf06ab4de7f61b7f8f2a]
# to [691bdc2691bdee8051bf58353b478ebde05dfe6f]
#
# patch "packages/initscripts/initscripts_1.0.bb"
# from [184c85d6aa03815816d40e0e59673bf7b8c1d5ac]
# to [68a2503830c5a60d30e0003f1badbe630bcfc9cc]
#
============================================================
--- packages/initscripts/initscripts-1.0/checkroot.sh b17337e6503486a51b8eaf06ab4de7f61b7f8f2a
+++ packages/initscripts/initscripts-1.0/checkroot.sh 691bdc2691bdee8051bf58353b478ebde05dfe6f
@@ -24,7 +24,7 @@ rootopts=rw
exec 9>&0 </etc/fstab
rootmode=rw
rootopts=rw
-rootcheck=no
+test "$ENABLE_ROOTFS_FSCK" = yes && rootcheck="yes" || rootcheck="no"
swap_on_md=no
devfs=
while read fs mnt type opts dump pass junk
@@ -44,15 +44,40 @@ do
test "$type" = swap && swap_on_md=yes
;;
esac
+
test "$type" = devfs && devfs="$fs"
- test "$mnt" != / && continue
- rootopts="$opts"
- test "$pass" = 0 -o "$pass" = "" && rootcheck=no
- case "$opts" in
- ro|ro,*|*,ro|*,ro,*)
- rootmode=ro
- ;;
- esac
+
+ # Currently we do not care about the other entries
+ if test "$mnt" = "/"
+ then
+ #echo "[$fs] [$mnt] [$type] [$opts] [$dump] [$pass] [$junk]"
+
+ rootopts="$opts"
+ roottype="$type"
+
+ test "$pass" = 0 -o "$pass" = "" && rootcheck=no
+
+ # Enable fsck for ext2 and ext3 rootfs, disable for everything else
+ case "$type" in
+ ext2|ext3) rootcheck=yes;;
+ *) rootcheck=no;;
+ esac
+
+ if test "$rootcheck" = yes
+ then
+ if ! test -x "/sbin/fsck.${roottype}"
+ then
+ echo -e "\n * * * WARNING: /sbin/fsck.${roottype} is missing! * * *\n"
+ rootcheck=no
+ fi
+ fi
+
+ case "$opts" in
+ ro|ro,*|*,ro|*,ro,*)
+ rootmode=ro
+ ;;
+ esac
+ fi
done
exec 0>&9 9>&-
============================================================
--- packages/initscripts/initscripts_1.0.bb 184c85d6aa03815816d40e0e59673bf7b8c1d5ac
+++ packages/initscripts/initscripts_1.0.bb 68a2503830c5a60d30e0003f1badbe630bcfc9cc
@@ -5,7 +5,7 @@ LICENSE = "GPL"
DEPENDS_openzaurus = "makedevs virtual/kernel"
RDEPENDS = "makedevs"
LICENSE = "GPL"
-PR = "r77"
+PR = "r78"
SRC_URI = "file://halt \
file://ramdisk \
More information about the Openembedded-commits
mailing list