summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2017-02-05 01:50:38 -0800
committerNOYB <Al_Stu@Frontier.com>2017-02-15 15:52:09 -0800
commit5fbc719be35ade666eb739f423831493358840a7 (patch)
tree505423479598fb3035f1aacb3c35f83e1e2cab0f
parent537a2bb0ceae7cca8bdd5ce70b90edcfeb0275f2 (diff)
downloadpfsense-5fbc719be35ade666eb739f423831493358840a7.zip
pfsense-5fbc719be35ade666eb739f423831493358840a7.tar.gz
Vendor MAC Retention File Relocate
Relocate the vendor MAC retention file to /var/db directory. a) It's more at home here with other network interface stuff. b) Friendlier to write cycle sensitive media in a RAM disk enabled system.
-rw-r--r--src/etc/inc/interfaces.inc2
-rwxr-xr-xsrc/etc/rc.bootup4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index 9d1ddd8..9b29bd0 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -6005,7 +6005,7 @@ function get_interface_vendor_mac($interface) {
global $g;
$mac = "";
- $mac_file = "{$g['cf_conf_path']}/vendor_mac_{$interface}";
+ $mac_file = "{$g['vardb_path']}/vendor_mac_($interface)";
if (file_exists($mac_file)) {
$mac = file_get_contents($mac_file);
if (!is_macaddr($mac)) {
diff --git a/src/etc/rc.bootup b/src/etc/rc.bootup
index e4a3a20..1bbed09 100755
--- a/src/etc/rc.bootup
+++ b/src/etc/rc.bootup
@@ -113,7 +113,7 @@ echo "done.\n";
if (mwexec("/bin/kenv -q pfSense.boot 2>/dev/null") != 0) {
/* Collect vendor MAC address for all interfaces */
$ifs = pfSense_interface_listget();
- unlink_if_exists("{$g['cf_conf_path']}/vendor_mac_*");
+ unlink_if_exists("{$g['vardb_path']}/vendor_mac_*");
foreach ($ifs as $if) {
$if_details = pfSense_get_interface_addresses($if);
if (isset($if_details['iftype']) &&
@@ -126,7 +126,7 @@ if (mwexec("/bin/kenv -q pfSense.boot 2>/dev/null") != 0) {
continue;
}
- @file_put_contents("{$g['cf_conf_path']}/vendor_mac_{$if}",
+ @file_put_contents("{$g['vardb_path']}/vendor_mac_{$if}",
$if_details['macaddr']);
}
unset($ifs, $if);
OpenPOWER on IntegriCloud