summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-18 00:06:37 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-18 00:06:37 +0000
commit8a66cbc86ce3ddaf29df0217b96e46e4cae935e9 (patch)
tree38600a1fbf79552db0ec527791dfc4744da5defb /etc/inc/config.inc
parente9208daf22b9d4770e4e98621e237d77f975217d (diff)
downloadpfsense-8a66cbc86ce3ddaf29df0217b96e46e4cae935e9.zip
pfsense-8a66cbc86ce3ddaf29df0217b96e46e4cae935e9.tar.gz
MFC 7768
Use mount -u instead of umount -f way for remounting filesystem ro or rw.
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r--etc/inc/config.inc22
1 files changed, 9 insertions, 13 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 6734c09..c8ce335 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -292,14 +292,10 @@ function conf_mount_rw() {
if($g['platform'] == "cdrom")
return;
- /* don't use mount -u anymore
- (doesn't sync the files properly and /bin/sync won't help either) */
- $status = mwexec("/sbin/umount -f {$g['cf_path']}");
-
- $status = mwexec("/sbin/mount -w -o noatime {$g['cf_path']}");
+ $status = mwexec("/sbin/mount -u -w {$g['cf_path']}");
if($status <> 0) {
mwexec("/sbin/fsck -y {$g['cf_path']}");
- $status = mwexec("/sbin/mount -w -o noatime {$g['cf_path']}");
+ $status = mwexec("/sbin/mount -u -w {$g['cf_path']}");
}
/* if the platform is soekris or wrap or pfSense, lets mount the
@@ -307,13 +303,12 @@ function conf_mount_rw() {
*/
if($g['platform'] == "wrap" or $g['platform'] == "net45xx"
or $g['platform'] == "embedded") {
- mwexec("/sbin/umount -f /");
- $status = mwexec("/sbin/mount -w /");
+ $status = mwexec("/sbin/mount -u -w /");
/* we could not mount this correctly. kick off fsck */
if($status <> 0) {
log_error("File system is dirty. Launching FSCK for /");
mwexec("/sbin/fsck -y");
- $status = mwexec("/sbin/mount -w /");
+ $status = mwexec("/sbin/mount -u -w /");
}
}
}
@@ -338,15 +333,16 @@ function conf_mount_ro() {
if($g['platform'] == "cdrom")
return;
- mwexec("/sbin/umount -f {$g['cf_path']}");
- mwexec("/sbin/mount -r {$g['cf_path']}");
+ mwexec("/sbin/mount -u -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'] == "embedded") {
- mwexec("/sbin/umount -f /");
- mwexec("/sbin/mount -f -r /");
+ mwexec("/bin/sync");
+ mwexec("/bin/sync");
+ mwexec("/bin/sync");
+ mwexec("/sbin/mount -u -r /");
}
}
OpenPOWER on IntegriCloud