diff --git a/src/etc/inc/console.inc b/src/etc/inc/console.inc index ecb9c0778..e9020c724 100644 --- a/src/etc/inc/console.inc +++ b/src/etc/inc/console.inc @@ -125,7 +125,7 @@ function _set_networking_interfaces_ports($probe = false) if (!empty($iflist)) { echo << $value) { $realif = get_real_interface($key); - mwexec("/sbin/ifconfig ${bridgeif} ifpriority {$realif} " . escapeshellarg($value)); + mwexec("/sbin/ifconfig {$bridgeif} ifpriority {$realif} " . escapeshellarg($value)); } } if (!empty($bridge['ifpathcost'])) { @@ -321,7 +321,7 @@ function _interfaces_bridge_configure($bridge) } foreach ($ifpathcost as $key => $value) { $realif = get_real_interface($key); - mwexec("/sbin/ifconfig ${bridgeif} ifpathcost {$realif} " . escapeshellarg($value)); + mwexec("/sbin/ifconfig {$bridgeif} ifpathcost {$realif} " . escapeshellarg($value)); } } } @@ -2797,13 +2797,13 @@ INFOREQ|REBIND|RENEW|REQUEST) for NAMESERVER in \${new_domain_name_servers}; do ARGS="\${ARGS} -a \${NAMESERVER}" done - /usr/local/sbin/ifctl -i ${wanif} -6nd \${ARGS} + /usr/local/sbin/ifctl -i {$wanif} -6nd \${ARGS} ARGS= for DOMAIN in \${new_domain_name}; do ARGS="\${ARGS} -a \${DOMAIN}" done - /usr/local/sbin/ifctl -i ${wanif} -6sd \${ARGS} + /usr/local/sbin/ifctl -i {$wanif} -6sd \${ARGS} ARGS= for PD in \${PDINFO}; do @@ -2812,7 +2812,7 @@ INFOREQ|REBIND|RENEW|REQUEST) if [ \${REASON} != "RENEW" -a \${REASON} != "REBIND" ]; then # cannot update since PDINFO may be incomplete in these cases # as each PD is being handled separately via the client side - /usr/local/sbin/ifctl -i ${wanif} -6pd \${ARGS} + /usr/local/sbin/ifctl -i {$wanif} -6pd \${ARGS} fi FORCE= @@ -2826,9 +2826,9 @@ INFOREQ|REBIND|RENEW|REQUEST) EXIT|RELEASE) /usr/bin/logger -t dhcp6c "dhcp6c_script: \$REASON on {$wanif} executing" - /usr/local/sbin/ifctl -i ${wanif} -6nd - /usr/local/sbin/ifctl -i ${wanif} -6sd - /usr/local/sbin/ifctl -i ${wanif} -6pd + /usr/local/sbin/ifctl -i {$wanif} -6nd + /usr/local/sbin/ifctl -i {$wanif} -6sd + /usr/local/sbin/ifctl -i {$wanif} -6pd /usr/local/sbin/configctl -d interface newipv6 {$wanif} ;; diff --git a/src/etc/inc/plugins.inc.d/ipsec.inc b/src/etc/inc/plugins.inc.d/ipsec.inc index 9f896e1e7..cf2b1b577 100644 --- a/src/etc/inc/plugins.inc.d/ipsec.inc +++ b/src/etc/inc/plugins.inc.d/ipsec.inc @@ -1193,7 +1193,7 @@ function ipsec_write_keypairs() foreach ((new \OPNsense\IPsec\IPsec())->keyPairs->keyPair->iterateItems() as $uuid => $keyPair) { foreach ($paths as $key => $path) { if (!empty((string)$keyPair->$key)) { - $filename = "${path}/{$uuid}.pem"; + $filename = "{$path}/{$uuid}.pem"; @touch($filename); @chmod($filename, 0600); file_put_contents($filename, (string)$keyPair->$key); diff --git a/src/etc/inc/plugins.inc.d/openvpn.inc b/src/etc/inc/plugins.inc.d/openvpn.inc index 88d64987e..62504176b 100644 --- a/src/etc/inc/plugins.inc.d/openvpn.inc +++ b/src/etc/inc/plugins.inc.d/openvpn.inc @@ -1216,7 +1216,7 @@ function openvpn_gen_route_ipv6($network, $iroute = false) if (empty($prefix)) { $prefix = "128"; } - return "{$i}route-ipv6 ${ipv6}/${prefix}"; + return "{$i}route-ipv6 {$ipv6}/{$prefix}"; } /** diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 8671738ff..fd0513593 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -565,7 +565,7 @@ function system_default_route($gateway, $interface, $far = false) } if ($family == 'inet') { - $dynamicgw = trim(@file_get_contents("/tmp/${realif}_router") ?? ''); + $dynamicgw = trim(@file_get_contents("/tmp/{$realif}_router") ?? ''); if (!empty($dynamicgw) && $gateway === $dynamicgw) { /* special case tries to turn on far gateway when required for dynamic gateway */ list (, $network) = interfaces_primary_address($interface); @@ -604,7 +604,7 @@ function system_routing_configure($verbose = false, $interface = null, $monitor service_log(sprintf('Setting up route%s...', empty($interface) ? 's' : " {$interface}"), $verbose); if (!empty($interface)) { - log_msg("ROUTING: entering configure using '${interface}'", LOG_DEBUG); + log_msg("ROUTING: entering configure using '{$interface}'", LOG_DEBUG); } else { log_msg("ROUTING: entering configure using defaults", LOG_DEBUG); } @@ -1139,7 +1139,7 @@ function system_login_configure($verbose = false) if (!empty($value)) { $new_loader_conf .= "{$param}={$value}\n"; } else { - $new_loader_conf .= "#${param}\n"; + $new_loader_conf .= "#{$param}\n"; } } $new_loader_conf .= "\n"; @@ -1170,7 +1170,7 @@ function system_login_configure($verbose = false) /* virtual terminals */ foreach (array('ttyv0', 'ttyv1', 'ttyv2', 'ttyv3', 'ttyv4', 'ttyv5', 'ttyv6', 'ttyv7') as $virtualport) { if (strpos($tty, $virtualport) === 0) { - fwrite($fd, "{$virtualport}\t\"/usr/libexec/getty {$console_type}\"\t\txterm\t${on_off_secure_v}\n"); + fwrite($fd, "{$virtualport}\t\"/usr/libexec/getty {$console_type}\"\t\txterm\t{$on_off_secure_v}\n"); continue 2; } } @@ -1190,7 +1190,7 @@ function system_login_configure($verbose = false) } if (file_exists('/dev/xc0')) { - fwrite($fd, "xc0\t\"/usr/libexec/getty {$console_type}\"\t\txterm\t${on_off_secure_v}\n"); + fwrite($fd, "xc0\t\"/usr/libexec/getty {$console_type}\"\t\txterm\t{$on_off_secure_v}\n"); } fclose($fd); diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php b/src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php index a3cac3fe8..2bba1f12d 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php @@ -873,7 +873,7 @@ class FirmwareController extends ApiMutableModelControllerBase /* package infos are flat lists with 3 pipes as delimiter */ foreach (array('remote', 'local') as $type) { - $current = $backend->configdRun("firmware ${type}"); + $current = $backend->configdRun("firmware {$type}"); $current = explode("\n", trim($current ?? '')); foreach ($current as $line) { diff --git a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php index 9d9baf206..f7183f0e0 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php +++ b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php @@ -155,10 +155,10 @@ class Config extends Singleton } // copy attributes to xzy@attribute key item foreach ($xmlNode->attributes() as $AttrKey => $AttrValue) { - if (!isset($result["${xmlNodeName}@attributes"])) { - $result["${xmlNodeName}@attributes"] = []; + if (!isset($result["{$xmlNodeName}@attributes"])) { + $result["{$xmlNodeName}@attributes"] = []; } - $result["${xmlNodeName}@attributes"][$AttrKey] = (string)$AttrValue; + $result["{$xmlNodeName}@attributes"][$AttrKey] = (string)$AttrValue; } } } diff --git a/src/www/firewall_rules.php b/src/www/firewall_rules.php index 134a405df..042f186e0 100644 --- a/src/www/firewall_rules.php +++ b/src/www/firewall_rules.php @@ -213,10 +213,10 @@ function filter_rule_item_alias_tooltip($alias_name) { $alias_descr = htmlspecialchars(get_alias_description($alias_name)); $alias_name = htmlspecialchars($alias_name); - $result = ""; + $result = ""; $result .= $alias_name . " "; $result .= ""; - $result .= ""; $result .= ""; $result .= "";