mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Check to see if dir exists before blindly mounting rw
This commit is contained in:
parent
ca8e7d4560
commit
e9fc058ce0
@ -38,16 +38,20 @@ require_once("service-utils.inc");
|
||||
require_once("pfsense-utils.inc");
|
||||
require_once("globals.inc");
|
||||
|
||||
|
||||
safe_mkdir("/var/db/pkg");
|
||||
|
||||
$g['platform'] = trim(file_get_contents("/etc/platform"));
|
||||
if($g['platform'] == "pfSense") {
|
||||
safe_mkdir("/usr/local/pkg");
|
||||
safe_mkdir("/usr/local/pkg/pf");
|
||||
} else {
|
||||
if(!is_dir("/usr/local/pkg") or !is_dir("/usr/local/pkg/pf")) {
|
||||
conf_mount_rw();
|
||||
safe_mkdir("/usr/local/pkg");
|
||||
safe_mkdir("/usr/local/pkg/pf");
|
||||
conf_mount_ro();
|
||||
}
|
||||
}
|
||||
|
||||
/****f* pkg-utils/remove_package
|
||||
|
||||
Loading…
Reference in New Issue
Block a user