summaryrefslogtreecommitdiffstats
path: root/etc/inc/services.inc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-05-27 10:49:01 +0200
committerErmal LUÇI <eri@pfsense.org>2015-05-27 10:51:38 +0200
commit427d36b4a8e32a1692ee59c0f7db3a660492f90f (patch)
tree05c0aaac4b8ba6d69b705b0e1127894ff3168a7f /etc/inc/services.inc
parentfc123231da1bd74525beddf7948ee8037c47bfe6 (diff)
downloadpfsense-427d36b4a8e32a1692ee59c0f7db3a660492f90f.zip
pfsense-427d36b4a8e32a1692ee59c0f7db3a660492f90f.tar.gz
Ticket #4523 Major changes to how fsck is done.
Follow best practice of using fsck from FreeBSD rc.d/fsck script. This means run preen mode first and later on try forcefully to fix issues. Try to give as much information during boot on the status of the filesystem. Follow best practice of using fsck from FreeBSD rc.d/fsck script. This means run preen mode first and later on try forcefully to fix issues. Try to give as much information during boot on the status of the filesystem. Conflicts: etc/inc/services.inc
Diffstat (limited to 'etc/inc/services.inc')
-rw-r--r--etc/inc/services.inc19
1 files changed, 11 insertions, 8 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index c14615e..3b94885 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -655,14 +655,17 @@ EOPP;
}
$all_mac_strings[] = $dhcpifconf['mac_allow'];
$all_mac_strings[] = $dhcpifconf['mac_deny'];
- $all_mac_list = array_unique(explode(',', implode(',', $all_mac_strings)));
- foreach ($all_mac_list as $mac) {
- if (empty($mac))
- continue;
- $dhcpdconf .= 'class "' . str_replace(':', '', $mac) . '" {' . "\n";
- // Skip the first octet of the MAC address - for media type, typically Ethernet ("01") and match the rest.
- $dhcpdconf .= ' match if substring (hardware, 1, ' . (substr_count($mac, ':') + 1) . ') = ' . $mac . ';' . "\n";
- $dhcpdconf .= '}' . "\n";
+ if (!empty($all_mac_strings)) {
+ $all_mac_list = array_unique(explode(',', implode(',', $all_mac_strings)));
+ foreach ($all_mac_list as $mac) {
+ if (empty($mac)) {
+ continue;
+ }
+ $dhcpdconf .= 'class "' . str_replace(':', '', $mac) . '" {' . "\n";
+ // Skip the first octet of the MAC address - for media type, typically Ethernet ("01") and match the rest.
+ $dhcpdconf .= ' match if substring (hardware, 1, ' . (substr_count($mac, ':') + 1) . ') = ' . $mac . ';' . "\n";
+ $dhcpdconf .= '}' . "\n";
+ }
}
$dhcpdconf .= "subnet {$subnet} netmask {$subnetmask} {\n";
OpenPOWER on IntegriCloud