Revision 1ef6e981
Added by Scott Ullrich almost 20 years ago
etc/inc/config.inc | ||
---|---|---|
293 | 293 |
/* if the platform is soekris or wrap or pfSense, lets mount the |
294 | 294 |
* compact flash cards root. |
295 | 295 |
*/ |
296 |
mwexec("/sbin/umount -f /"); |
|
297 |
$status = mwexec("/sbin/mount -w /"); |
|
298 |
/* we could not mount this correctly. kick off fsck */ |
|
299 |
while($status < 0) { |
|
300 |
log_error("File system is dirty. Launching FSCK for /"); |
|
301 |
mwexec("/sbin/fsck -y"); |
|
296 |
if($g['platform'] == "wrap" or $g['platform'] == "net45xx") { |
|
297 |
mwexec("/sbin/umount -f /"); |
|
302 | 298 |
$status = mwexec("/sbin/mount -w /"); |
299 |
/* we could not mount this correctly. kick off fsck */ |
|
300 |
while($status < 0) { |
|
301 |
log_error("File system is dirty. Launching FSCK for /"); |
|
302 |
mwexec("/sbin/fsck -y"); |
|
303 |
$status = mwexec("/sbin/mount -w /"); |
|
304 |
} |
|
303 | 305 |
} |
304 | 306 |
} |
305 | 307 |
|
... | ... | |
317 | 319 |
/* do not umount on cdrom platform */ |
318 | 320 |
if($g['platform'] == "cdrom") |
319 | 321 |
return; |
320 |
|
|
321 |
if(file_exists("/tmp/ro_root_mount")) |
|
322 |
return; |
|
323 | 322 |
|
324 | 323 |
mwexec("/sbin/umount -f {$g['cf_path']}"); |
325 | 324 |
mwexec("/sbin/mount -r {$g['cf_path']}"); |
326 | 325 |
/* if the platform is soekris or wrap, lets unmount the |
327 | 326 |
* compact flash card. |
328 | 327 |
*/ |
329 |
mwexec("/sbin/umount -f /"); |
|
330 |
mwexec("/sbin/mount -f -r /"); |
|
328 |
if($g['platform'] == "wrap" or $g['platform'] == "net45xx") { |
|
329 |
mwexec("/sbin/umount -f /"); |
|
330 |
mwexec("/sbin/mount -f -r /"); |
|
331 |
} |
|
331 | 332 |
} |
332 | 333 |
|
333 | 334 |
/****f* config/convert_config |
Also available in: Unified diff
Restore previous behavior. /tmp and /var will not be writable.