Revision ac62a50d
Added by Ermal LUÇI about 12 years ago
etc/rc | ||
---|---|---|
33 | 33 |
|
34 | 34 |
if [ -e /root/force_fsck ]; then |
35 | 35 |
echo "Forcing filesystem check..." |
36 |
/sbin/fsck -fy -t ufs /
|
|
36 |
/sbin/fsck -y -t ufs / |
|
37 | 37 |
if [ "$PLATFORM" = "nanobsd" ]; then |
38 |
/sbin/fsck -fy -t ufs /cf
|
|
38 |
/sbin/fsck -y -t ufs /cf |
|
39 | 39 |
fi |
40 | 40 |
fi |
41 | 41 |
|
... | ... | |
81 | 81 |
# Mount /. If it fails run a fsck. |
82 | 82 |
if [ "$PLATFORM" = "nanobsd" ]; then |
83 | 83 |
export PKG_TMPDIR=/root/ |
84 |
/sbin/mount -uw / || (/sbin/fsck -fy; /sbin/mount -uw /)
|
|
84 |
/sbin/mount -uw / || (/sbin/fsck -y /; /sbin/fsck -y /cf; /sbin/mount -uw /)
|
|
85 | 85 |
else |
86 |
/sbin/mount -a || (/sbin/fsck -fy; /sbin/mount -a)
|
|
86 |
/sbin/mount -a || (/sbin/fsck -y /; /sbin/mount -a)
|
|
87 | 87 |
fi |
88 | 88 |
|
89 | 89 |
# If /conf is a directory, convert it to a symlink to /cf/conf |
... | ... | |
98 | 98 |
|
99 | 99 |
if [ ! "$PLATFORM" = "jail" ]; then |
100 | 100 |
# Check to see if a compact flash mountpoint exists |
101 |
# If it fails to mount then run a fsck -fy
|
|
101 |
# If it fails to mount then run a fsck -y |
|
102 | 102 |
if grep -q cf /etc/fstab; then |
103 | 103 |
/sbin/mount -w /cf 2>/dev/null |
104 | 104 |
/sbin/mount -uw /cf || \ |
105 |
(/sbin/umount /cf; /sbin/fsck -fy /cf; /sbin/mount -w /cf)
|
|
105 |
(/sbin/umount /cf; /sbin/fsck -y /cf; /sbin/mount -w /cf) |
|
106 | 106 |
fi |
107 | 107 |
fi |
108 | 108 |
|
Also available in: Unified diff
Do not force the check to avoid garbling filesystems. Also be specific to check / filesystem and /cf on nano platform since the others will be checked on php code