diff options
author | NOYB <Al_Stu@Frontier.com> | 2017-02-05 01:50:38 -0800 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-04-26 18:06:32 -0300 |
commit | e90c506f3b5479a278aef845087bc9b25c382ec0 (patch) | |
tree | afb0e41341928012152ee669e62d1dfa836641c4 | |
parent | d9c3f61aad8fd72044660864fc35aac821dd32c7 (diff) | |
download | pfsense-e90c506f3b5479a278aef845087bc9b25c382ec0.zip pfsense-e90c506f3b5479a278aef845087bc9b25c382ec0.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.inc | 2 | ||||
-rwxr-xr-x | src/etc/rc.bootup | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index a5e2fdc..a1a6d3b 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -5862,7 +5862,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 0ade50d..c084e89 100755 --- a/src/etc/rc.bootup +++ b/src/etc/rc.bootup @@ -190,7 +190,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']) && @@ -203,7 +203,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); |