summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-07-29 21:48:43 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-07-29 21:48:43 +0000
commit14249fdadd129ea95eecb9352d5a864c132d4f0c (patch)
tree243d9d2ab5b1f9146def44801b237fc6c2d9a41c /etc
parent7e9a7d04f8608e55f0c85402eb65deb4944b7c70 (diff)
downloadpfsense-14249fdadd129ea95eecb9352d5a864c132d4f0c.zip
pfsense-14249fdadd129ea95eecb9352d5a864c132d4f0c.tar.gz
Fsck if dirty
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/config.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 8d4fcdb..7eb2e00 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") {
OpenPOWER on IntegriCloud