diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 8d4fcdb90b..7eb2e00265 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -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") {