diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-09-03 23:17:54 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-09-03 23:17:54 +0000 |
commit | 578d4f386568c012aad2789d6dcb2ad996babc66 (patch) | |
tree | 75ddcacd696fd666ef90f222cb838c5a75949451 /etc/inc/config.inc | |
parent | f30fd4b9fa8910dc85fcbc5eb032e207c1372664 (diff) | |
download | pfsense-578d4f386568c012aad2789d6dcb2ad996babc66.zip pfsense-578d4f386568c012aad2789d6dcb2ad996babc66.tar.gz |
Umount correctly
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r-- | etc/inc/config.inc | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 4bbf6cd..ab063be 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -290,18 +290,16 @@ function conf_mount_rw() { $status = mwexec("/sbin/mount -w -o noatime {$g['cf_path']}"); } - /* if the platform is soekris or wrap or pfSense, lets mount the - compact flash cards root. */ - if($g['platform'] == "wrap" or $g['platform'] == "net45xx" - or $g['platform'] == "pfSense") { - mwexec("/sbin/umount -f {$g['embeddedbootupslice']}"); - $status = mwexec("/sbin/mount -w {$g['embeddedbootupslice']}"); - /* we could not mount this correctly. kick off fsck */ - while($status < 0) { - log_error("File system is dirty. Launching FSCK for /"); - mwexec("/sbin/fsck -y"); - $status = mwexec("/sbin/mount -w {$g['embeddedbootupslice']}"); - } + /* if the platform is soekris or wrap or pfSense, lets mount the + * compact flash cards root. + */ + mwexec("/sbin/umount -f /"); + $status = mwexec("/sbin/mount -w /"); + /* we could not mount this correctly. kick off fsck */ + while($status < 0) { + log_error("File system is dirty. Launching FSCK for /"); + mwexec("/sbin/fsck -y"); + $status = mwexec("/sbin/mount -w /"); } } @@ -322,13 +320,11 @@ function conf_mount_ro() { mwexec("/sbin/umount -f {$g['cf_path']}"); mwexec("/sbin/mount -r {$g['cf_path']}"); - /* if the platform is soekris or wrap, lets unmount the - compact flash card. */ - if($g['platform'] == "wrap" or $g['platform'] == "net45xx" - or $g['platform'] == "pfSense") { - mwexec("/sbin/umount -f {$g['embeddedbootupslice']}"); - mwexec("/sbin/mount -r {$g['embeddedbootupslice']}"); - } + /* if the platform is soekris or wrap, lets unmount the + * compact flash card. + */ + mwexec("/sbin/umount -f /"); + mwexec("/sbin/mount -f -r /"); } /****f* config/convert_config |