Revision e9fc058c
Added by Scott Ullrich about 16 years ago
etc/inc/pkg-utils.inc | ||
---|---|---|
38 | 38 |
require_once("pfsense-utils.inc"); |
39 | 39 |
require_once("globals.inc"); |
40 | 40 |
|
41 |
|
|
41 | 42 |
safe_mkdir("/var/db/pkg"); |
43 |
|
|
42 | 44 |
$g['platform'] = trim(file_get_contents("/etc/platform")); |
43 | 45 |
if($g['platform'] == "pfSense") { |
44 | 46 |
safe_mkdir("/usr/local/pkg"); |
45 | 47 |
safe_mkdir("/usr/local/pkg/pf"); |
46 | 48 |
} else { |
49 |
if(!is_dir("/usr/local/pkg") or !is_dir("/usr/local/pkg/pf")) { |
|
47 | 50 |
conf_mount_rw(); |
48 | 51 |
safe_mkdir("/usr/local/pkg"); |
49 | 52 |
safe_mkdir("/usr/local/pkg/pf"); |
50 | 53 |
conf_mount_ro(); |
54 |
} |
|
51 | 55 |
} |
52 | 56 |
|
53 | 57 |
/****f* pkg-utils/remove_package |
Also available in: Unified diff
Check to see if dir exists before blindly mounting rw