diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-04-18 01:27:05 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-04-18 01:27:05 +0000 |
commit | 18859f3b8906a39e5befe1771cac2ab945ca9aba (patch) | |
tree | 37ba220fac234f5ec5f2ecabb5503747989404f4 /etc | |
parent | 6a692182c94edb3b17a6b523dd7a993c38714afb (diff) | |
download | pfsense-18859f3b8906a39e5befe1771cac2ab945ca9aba.zip pfsense-18859f3b8906a39e5befe1771cac2ab945ca9aba.tar.gz |
Detect a dirty CF partition and invoke fsck -y
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/config.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 54edeab..c21f821 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -208,7 +208,11 @@ 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']}"); - mwexec("/sbin/mount -w -o noatime {$g['cf_path']}"); + $status = mwexec("/sbin/mount -w -o noatime {$g['cf_path']}"); + while($status == -1) { + 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") { |