Fsck if dirty

This commit is contained in:
Scott Ullrich 2005-07-29 21:48:43 +00:00
parent 7e9a7d04f8
commit 14249fdadd

View File

@ -278,12 +278,18 @@ function conf_mount_rw() {
/* don't use mount -u anymore
(doesn't sync the files properly and /bin/sync won't help either) */
mwexec("/sbin/umount -f {$g['cf_path']}");
$status = mwexec("/sbin/umount -f {$g['cf_path']}");
while($status <> 0) {
mwexec("fsck -y");
$status = mwexec("/sbin/umount -f {$g['cf_path']}");
}
$status = mwexec("/sbin/mount -w -o noatime {$g['cf_path']}");
while($status == -1) {
while($status <> 0) {
mwexec("fsck -y");
$status = mwexec("/sbin/mount -w -o noatime {$g['cf_path']}");
}
/* if the platform is soekris or wrap, lets mount the
compact flash card. */
if($g['platform'] == "wrap" or $g['platform'] == "net45xx") {