From 736c50053b9ea89681863b73d068dbb3e672f190 Mon Sep 17 00:00:00 2001 From: "Isaac (.ike) Levy" Date: Wed, 22 Apr 2015 22:47:27 -0400 Subject: [PATCH 01/51] playing catchup with deleted files first, more to come once deleted files are out Signed-off-by: Isaac (.ike) Levy --- src/share/locale/en/LC_MESSAGES/OPNsense.pot | 632 ------------------- 1 file changed, 632 deletions(-) diff --git a/src/share/locale/en/LC_MESSAGES/OPNsense.pot b/src/share/locale/en/LC_MESSAGES/OPNsense.pot index 473a55226..f9946a762 100644 --- a/src/share/locale/en/LC_MESSAGES/OPNsense.pot +++ b/src/share/locale/en/LC_MESSAGES/OPNsense.pot @@ -36,17 +36,6 @@ msgstr "" msgid " - Submit this to the developers for inspection" msgstr "" -#: src/etc/inc/pkg-utils.inc:1205 -msgid " >>> Trying to fetch package info..." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:1212 -msgid "" -" >>> Unable to communicate with %1$s. " -"Please verify DNS and interface configuration, " -"and that %2$s has functional Internet connectivity." -msgstr "" - #: src/etc/inc/shaper.inc:672 msgid " Beware you can lose information." msgstr "" @@ -92,10 +81,6 @@ msgstr "" msgid " done!" msgstr "" -#: src/etc/inc/array_intersect_key.inc:46 -msgid " is not an array" -msgstr "" - #: src/www/firewall_nat_out.php:621 msgid " may also be required." msgstr "" @@ -462,27 +447,6 @@ msgstr "" msgid "(this might create problems for some clients)." msgstr "" -#: src/etc/inc/smtp.inc:247 -msgid "-3 socket could not be created" -msgstr "" - - -#: src/etc/inc/smtp.inc:249 -msgid "-4 dns lookup on hostname \"%s\" failed" -msgstr "" - -#: src/etc/inc/smtp.inc:251 -msgid "-5 connection refused or timed out" -msgstr "" - -#: src/etc/inc/smtp.inc:253 -msgid "-6 fdopen() call failed" -msgstr "" - -#: src/etc/inc/smtp.inc:255 -msgid "-7 setvbuf() call failed" -msgstr "" - #: src/www/system_advanced_misc.php:500 msgid "/tmp RAM Disk Size" msgstr "" @@ -572,14 +536,6 @@ msgstr "" msgid "802.1p" msgstr "" -#: src/etc/inc/smtp.inc:93 -msgid ": data access time out" -msgstr "" - -#: src/etc/inc/smtp.inc:96 -msgid ": the server disconnected" -msgstr "" - #: src/www/services_unbound_acls.php:224 msgid "Allow Snoop: This action allows recursive and nonrecursive access from hosts within the netblock defined below. Used for cache snooping and ideally should only be configured for your administrative host." msgstr "" @@ -1637,10 +1593,6 @@ msgstr "" msgid "Additional authentication servers can be added here." msgstr "" -#: src/etc/inc/pkg-utils.inc:1481 -msgid "Additional files... " -msgstr "" - #: src/www/system_usermanager.php:892 msgid "" "Additional users can be added here. User permissions for accessing " @@ -2973,11 +2925,6 @@ msgstr "" msgid "Allows selection of different speeds for the serial console port." msgstr "" -#: src/etc/inc/xmlrpc_client.inc:1636 -#: src/etc/inc/xmlrpc_client.inc:1652 -msgid "Already initialized as a [%s]" -msgstr "" - #: src/www/firewall_rules.php:123 #: src/www/firewall_rules_edit.php:991 msgid "Alternate Host" @@ -3195,10 +3142,6 @@ msgstr "" msgid "Attempting to fetch Organizational Units from" msgstr "" -#: src/etc/inc/pkg-utils.inc:1206 -msgid "Attempting to reinstall all packages" -msgstr "" - #: src/www/diag_smart.php:298 msgid "Attributes" msgstr "" @@ -3251,11 +3194,6 @@ msgstr "" msgid "Authentication containers" msgstr "" -#: src/etc/inc/smtp.inc:317 -#: src/etc/inc/smtp.inc:347 -msgid "Authentication error:" -msgstr "" - #: src/www/xmlrpc.php:57 msgid "Authentication failed" msgstr "" @@ -3364,10 +3302,6 @@ msgstr "" msgid "Automatically ping host" msgstr "" -#: src/etc/inc/pkg-utils.inc:1088 -msgid "Auxiliary files... " -msgstr "" - #: src/www/load_balancer_relay_protocol_edit.php:239 msgid "Available Actions" msgstr "" @@ -3584,11 +3518,6 @@ msgstr "" msgid "Beginning firmware upgrade" msgstr "" -#: src/etc/inc/pkg-utils.inc:622 -msgid "Beginning package installation for %s ." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:620 #: src/www/pkg_mgr_install.php:169 msgid "Beginning package installation." msgstr "" @@ -4008,10 +3937,6 @@ msgstr "" msgid "Can't find PPP config for %s in interface_ppps_configure()." msgstr "" -#: src/etc/inc/xmlrpc_client.inc:155 -msgid "Can't introspect: method unknown" -msgstr "" - #: src/www/firewall_aliases_edit.php:750 #: src/www/firewall_aliases_import.php:214 #: src/www/firewall_nat_1to1_edit.php:567 @@ -4089,10 +4014,6 @@ msgstr "" msgid "Cannot get CPU load" msgstr "" -#: src/etc/inc/pkg-utils.inc:1214 -msgid "Cannot reinstall packages: " -msgstr "" - #: src/www/diag_logs_filter.php:42 msgid "Cannot resolve" msgstr "" @@ -4328,10 +4249,6 @@ msgstr "" msgid "Changing any settings on this page will disconnect all clients! Don't forget to enable the DHCP server on your captive portal interface! Make sure that the default/maximum DHCP lease time is higher than the timeout entered on this page. Also, the DNS forwarder needs to be enabled for DNS lookups by unauthenticated clients to work." msgstr "" -#: src/etc/inc/pkg-utils.inc:1513 -msgid "Changing file mode to %1$s for %2$s%3$s%4$s" -msgstr "" - #: src/www/system_gateway_groups_edit.php:89 msgid "Changing name on a gateway group is not allowed." msgstr "" @@ -4843,10 +4760,6 @@ msgstr "" msgid "Configuration" msgstr "" -#: src/etc/inc/pkg-utils.inc:1121 -msgid "Configuration... " -msgstr "" - #: src/etc/rc.initial.setlanip:249 msgid "Configure %s address %s interface via %s?" msgstr "" @@ -4914,10 +4827,6 @@ msgstr "" msgid "Configuring loopback interface..." msgstr "" -#: src/etc/inc/pkg-utils.inc:738 -msgid "Configuring package components...\n" -msgstr "" - #: src/www/diag_confbak.php:177 #: src/www/diag_gmirror.php:187 msgid "Confirm Action" @@ -4947,14 +4856,6 @@ msgstr "" msgid "Connected Since" msgstr "" -#: src/etc/inc/smtp.inc:464 -msgid "Connected to SMTP server \"%s\"." -msgstr "" - -#: src/etc/inc/smtp.inc:240 -msgid "Connecting to host address \"%1$s\" port %2$s..." -msgstr "" - #: src/www/system_firmware_check.php:78 #: src/www/widgets/widgets/system_information.widget.php:57 msgid "Connection Error" @@ -4972,18 +4873,6 @@ msgstr "" msgid "Connection failed (Refused/Timeout)" msgstr "" -#: src/etc/inc/xmlrpc_client.inc:957 -msgid "" -"'Connection to RPC server" -" %1$s:%2$s failed. %3$s" -msgstr "" - -#: src/etc/inc/xmlrpc_client.inc:951 -msgid "" -"Connection to proxy server" -" %1$s:%2$s failed. %3$s" -msgstr "" - #: src/www/wizards/traffic_shaper_wizard_dedicated.inc:1465 #: src/www/wizards/traffic_shaper_wizard_multi_all.inc:1535 msgid "Connections From Upstream SIP Server" @@ -5164,31 +5053,15 @@ msgstr "" msgid "Could not process aliases from alias: {$alias_url}" msgstr "" -#: src/etc/inc/smtp.inc:352 -msgid "Could not process the SASL authentication step:" -msgstr "" - #: src/etc/inc/config.lib.inc:508 msgid "Could not restore config.xml." msgstr "" -#: src/etc/inc/smtp.inc:302 -msgid "Could not send the AUTH command" -msgstr "" - -#: src/etc/inc/smtp.inc:332 -msgid "Could not send the authentication step message" -msgstr "" - #: src/etc/inc/notices.inc:326 #: src/etc/inc/notices.inc:327 msgid "Could not send the message to %1$s -- Error: %2$s" msgstr "" -#: src/etc/inc/smtp.inc:295 -msgid "Could not start the SASL authentication client:" -msgstr "" - #: src/etc/inc/services.inc:1347 msgid "Could not write Igmpproxy configuration file!" msgstr "" @@ -5413,10 +5286,6 @@ msgstr "" msgid "Custom Bandwidths are greater than 30%. Please lower them for the wizard to continue." msgstr "" -#: src/etc/inc/pkg-utils.inc:778 -msgid "Custom commands..." -msgstr "" - #: src/www/interfaces.php:2676 #: src/www/interfaces_ppps_edit.php:616 #: src/www/status_rrd_graph_tabs.php:38 @@ -5832,10 +5701,6 @@ msgstr "" msgid "Defines the time in minutes that a user is allowed access. The clock starts ticking the first time a voucher is used for authentication" msgstr "" -#: src/etc/inc/pkg-utils.inc:1069 -msgid "Deinstall commands... " -msgstr "" - #: src/www/vpn_ipsec_phase1.php:904 msgid "Delay between requesting peer acknowledgement" msgstr "" @@ -6304,10 +6169,6 @@ msgstr "" msgid "Dial on demand" msgstr "" -#: src/etc/inc/xmlrpc_client.inc:156 -msgid "Didn't receive 200 OK from remote server." -msgstr "" - #: src/www/diag_confbak.php:252 #: src/www/diag_confbak.php:309 msgid "Diff" @@ -7141,22 +7002,10 @@ msgstr "" msgid "Downloading current version information" msgstr "" -#: src/etc/inc/pkg-utils.inc:1434 -msgid "Downloading package configuration file... " -msgstr "" - -#: src/etc/inc/pkg-utils.inc:1436 -msgid "Downloading package configuration file..." -msgstr "" - #: src/www/system_firmware_auto.php:155 msgid "Downloading updates" msgstr "" -#: src/etc/inc/pkg-utils.inc:707 -msgid "Downloading" -msgstr "" - #: src/www/services_igmpproxy_edit.php:189 msgid "Downstream Interface" msgstr "" @@ -7319,14 +7168,6 @@ msgstr "" msgid "ERROR! Either LDAP search failed, or multiple users were found." msgstr "" -#: src/etc/inc/pkg-utils.inc:1440 -msgid "ERROR! Unable to fetch package configuration file. Aborting installation." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:1442 -msgid "ERROR! Unable to fetch package configuration file. Aborting package installation." -msgstr "" - #: src/etc/inc/auth.inc:1056 msgid "ERROR! ldap_backed() called with no LDAP authentication server defined. Defaulting to local user database. Visit System -> User Manager." msgstr "" @@ -8748,18 +8589,6 @@ msgstr "" msgid "Example:" msgstr "" -#: src/etc/inc/pkg-utils.inc:782 -msgid "Executing custom_php_global_functions()..." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:789 -msgid "Executing custom_php_install_command()..." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:818 -msgid "Executing custom_php_resync_config_command()..." -msgstr "" - #: src/www/system_camanager.php:404 msgid "Existing Certificate Authority" msgstr "" @@ -8853,10 +8682,6 @@ msgstr "" msgid "External subnet" msgstr "" -#: src/etc/inc/pkg-utils.inc:1507 -msgid "Extracting tarball to -C for " -msgstr "" - #: src/www/pkg_mgr_install.php:272 msgid "FAILED!" msgstr "" @@ -8893,10 +8718,6 @@ msgstr "" msgid "Failed to delete Certificate %s from CRL %s" msgstr "" -#: src/etc/inc/pkg-utils.inc:651 -msgid "Failed to install package." -msgstr "" - #: src/www/system_firmware.php:78 msgid "Failed to write file to disk" msgstr "" @@ -8995,18 +8816,6 @@ msgstr "" msgid "Final certificate data" msgstr "" -#: src/etc/inc/pkg-utils.inc:1235 -msgid "Finished installing package" -msgstr "" - -#: src/etc/inc/pkg-utils.inc:1238 -msgid "Finished reinstalling all packages." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:1232 -msgid "Finished uninstalling package" -msgstr "" - #: src/etc/inc/pfsense-utils.inc:2557 msgid "Finnish" msgstr "" @@ -9720,10 +9529,6 @@ msgstr "" msgid "HTTP Code" msgstr "" -#: src/etc/inc/xmlrpc_client.inc:1470 -msgid "HTTP error, got response: %s" -msgstr "" - #: src/www/load_balancer_monitor_edit.php:186 #: src/www/load_balancer_monitor_edit.php:270 #: src/www/load_balancer_relay_action_edit.php:174 @@ -11190,14 +10995,6 @@ msgstr "" msgid "Incorrect ip address specified for username %s" msgstr "" -#: src/etc/inc/xmlrpc_client.inc:154 -msgid "Incorrect parameters passed to method" -msgstr "" - -#: src/etc/inc/priv/user.priv.inc:7 -msgid "Indicates whether the user is able to login on the captive portal." -msgstr "" - #: src/etc/inc/upgrade_config.inc:532 msgid "Indicates whether this user is able to login for example via SSH." msgstr "" @@ -11300,10 +11097,6 @@ msgstr "" msgid "Install Package" msgstr "" -#: src/etc/inc/pkg-utils.inc:874 -msgid "Installation aborted." -msgstr "" - #: src/www/pkg_mgr_install.php:282 msgid "Installation completed. Please check to make sure that the package is configured from the respective menu then start the package." msgstr "" @@ -11320,10 +11113,6 @@ msgstr "" msgid "Installation of" msgstr "" -#: src/etc/inc/pkg-utils.inc:634 -msgid "Installed %s package." -msgstr "" - #: src/etc/inc/filter.inc:3274 msgid "Installed 15 minute filter reload for Time Based Rules" msgstr "" @@ -11355,10 +11144,6 @@ msgstr "" msgid "Installing configuration..." msgstr "" -#: src/etc/inc/pkg-utils.inc:706 -msgid "Installing" -msgstr "" - #: src/www/diag_dump_states.php:162 msgid "Int" msgstr "" @@ -11371,10 +11156,6 @@ msgstr "" msgid "Int." msgstr "" -#: src/etc/inc/pkg-utils.inc:843 -msgid "Integrated Tab items... " -msgstr "" - #: src/www/system_advanced_misc.php:69 msgid "Intel Core* CPU on-die thermal sensor" msgstr "" @@ -11782,14 +11563,6 @@ msgstr "" msgid "Invalid protocol." msgstr "" -#: src/etc/inc/xmlrpc_client.inc:158 -msgid "Invalid request payload" -msgstr "" - -#: src/etc/inc/xmlrpc_client.inc:153 -msgid "Invalid return payload: enable debugging to examine incoming payload" -msgstr "" - #: src/www/status_rrd_graph.php:147 msgid "Invalid start date/time:" msgstr "" @@ -12365,10 +12138,6 @@ msgstr "" msgid "List of mirrors changed. Old: (%s) New: (%s)" msgstr "" -#: src/etc/inc/pkg-utils.inc:1223 -msgid "List of packages to reinstall: " -msgstr "" - #: src/www/services_dnsmasq.php:265 #: src/www/services_unbound.php:223 msgid "Listen Port" @@ -12432,20 +12201,6 @@ msgstr "" msgid "Loading filter rules" msgstr "" -#: src/etc/inc/pkg-utils.inc:733 -#: src/etc/inc/pkg-utils.inc:1474 -msgid "Loading package configuration... " -msgstr "" - -#: src/etc/inc/pkg-utils.inc:874 -msgid "Loading package configuration... failed!" -msgstr "" - -#: src/etc/inc/pkg-utils.inc:763 -#: src/etc/inc/pkg-utils.inc:1035 -msgid "Loading package instructions..." -msgstr "" - #: src/www/index.php:618 msgid "Loading selected widget" msgstr "" @@ -12986,11 +12741,6 @@ msgstr "" msgid "Memory usage" msgstr "" -#: src/etc/inc/pkg-utils.inc:827 -#: src/etc/inc/pkg-utils.inc:982 -msgid "Menu items... " -msgstr "" - #: src/www/xmlrpc.php:219 #: src/www/xmlrpc.php:306 #: src/www/xmlrpc.php:337 @@ -13981,10 +13731,6 @@ msgstr "" msgid "Non-Temporary Address Allocation" msgstr "" -#: src/etc/inc/xmlrpc_client.inc:431 -msgid "Non-numeric value received in INT or DOUBLE" -msgstr "" - #: src/etc/inc/openvpn.inc:211 msgid "None (No Authentication)" msgstr "" @@ -14045,10 +13791,6 @@ msgstr "" msgid "Not Members" msgstr "" -#: src/etc/inc/xmlrpc_client.inc:1600 -msgid "Not a scalar type (%s)" -msgstr "" - #: src/etc/inc/system.inc:439 msgid "Not adding default route because OLSR dynamic gateway is enabled." msgstr "" @@ -14471,10 +14213,6 @@ msgstr "" msgid "On" msgstr "" -#: src/etc/inc/pkg-utils.inc:1204 -msgid "One moment please, reinstalling packages...\n" -msgstr "" - #: src/etc/inc/config.console.inc:405 msgid "One moment while we reload the settings..." msgstr "" @@ -14695,10 +14433,6 @@ msgstr "" msgid "Overview" msgstr "" -#: src/etc/inc/pkg-utils.inc:638 -msgid "Overwrote previous installation of %s." -msgstr "" - #: src/www/vpn_ipsec.php:246 msgid "P1 Description" msgstr "" @@ -14755,18 +14489,6 @@ msgstr "" msgid "PFS key group" msgstr "" -#: src/etc/inc/smtp.inc:437 -msgid "POP3 authentication password was not accepted:" -msgstr "" - -#: src/etc/inc/smtp.inc:421 -msgid "POP3 authentication server greeting was not found" -msgstr "" - -#: src/etc/inc/smtp.inc:429 -msgid "POP3 authentication user was not accepted:" -msgstr "" - #: src/www/interfaces.php:2527 msgid "PPP configuration" msgstr "" @@ -14946,10 +14668,6 @@ msgstr "" msgid "PTP ports" msgstr "" -#: src/etc/inc/pkg-utils.inc:613 -msgid "Package %s is not supported on this version." -msgstr "" - #: src/www/pkg_edit.php:249 msgid "Package Editor" msgstr "" @@ -14966,10 +14684,6 @@ msgstr "" msgid "Package Logs" msgstr "" -#: src/etc/inc/pkg-utils.inc:1415 -msgid "Package Manager Settings" -msgstr "" - #: src/www/diag_backup.php:177 #: src/www/fbegin.inc:332 #: src/www/pkg_mgr.php:47 @@ -14990,14 +14704,6 @@ msgstr "" msgid "Package Settings" msgstr "" -#: src/etc/inc/pkg-utils.inc:719 -msgid "Package WAS NOT installed properly." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:1102 -msgid "Package XML... " -msgstr "" - #: src/www/pkg_mgr_install.php:224 #: src/www/pkg_mgr_install.php:225 msgid "Package deleted." @@ -15030,7 +14736,6 @@ msgstr "" msgid "Packages are currently being reinstalled in the background.

Do not make changes in the GUI until this is complete." msgstr "" -#: src/etc/inc/pkg-utils.inc:416 #: src/www/fbegin.inc:163 msgid "Packages" msgstr "" @@ -16614,10 +16319,6 @@ msgstr "" msgid "Reinstall" msgstr "" -#: src/etc/inc/pkg-utils.inc:1233 -msgid "Reinstalling package" -msgstr "" - #: src/www/interfaces.php:1986 msgid "Reject Leases From" msgstr "" @@ -16770,10 +16471,6 @@ msgstr "" msgid "Remote tunnel network" msgstr "" -#: src/etc/inc/pkg-utils.inc:1081 -msgid "Remove '%s'" -msgstr "" - #: src/www/diag_confbak.php:190 msgid "Remove Configuration Backup" msgstr "" @@ -16823,18 +16520,6 @@ msgstr "" msgid "Removed cron job for %s" msgstr "" -#: src/etc/inc/pkg-utils.inc:953 -msgid "Removing %s components..." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:952 -msgid "Removing %s package... " -msgstr "" - -#: src/etc/inc/pkg-utils.inc:1079 -msgid "Removing package instructions..." -msgstr "" - #: src/www/status_interfaces.php:99 #: src/www/status_interfaces.php:115 msgid "Renew" @@ -16983,14 +16668,6 @@ msgstr "" msgid "Resolver" msgstr "" -#: src/etc/inc/smtp.inc:414 -msgid "Resolving POP3 authentication host \"%s\"..." -msgstr "" - -#: src/etc/inc/smtp.inc:452 -msgid "Resolving SMTP server domain \"%s\"..." -msgstr "" - #: src/etc/inc/service-utils.inc:546 msgid "Restart %sService" msgstr "" @@ -17078,28 +16755,10 @@ msgstr "" msgid "Result Match" msgstr "" -#: src/etc/inc/pkg-utils.inc:201 -msgid "Resyncing configuration for all packages." -msgstr "" - #: src/www/load_balancer_pool_edit.php:239 msgid "Retry" msgstr "" -#: src/etc/inc/xmlrpc_server.inc:66 -msgid "" -"Returns an array of known" -" signatures (an array of arrays) for the method name passed. If" -" no signatures are known, returns a none-array (test for type !=" -" array to detect missing signature)" -msgstr "" - -#: src/etc/inc/xmlrpc_server.inc:86 -msgid "" -"Returns help text if defined" -" for the method passed, otherwise returns an empty string" -msgstr "" - #: src/www/diag_traceroute.php:138 msgid "Reverse Address Lookup" msgstr "" @@ -17548,14 +17207,6 @@ msgstr "" msgid "Saving changes..." msgstr "" -#: src/etc/inc/pkg-utils.inc:630 -msgid "Saving updated package information..." -msgstr "" - -#: src/etc/inc/xmlrpc_client.inc:1593 -msgid "Scalar can have only one value" -msgstr "" - #: src/www/widgets/widgets/traffic_graphs.widget.php:137 msgid "Scale follow" msgstr "" @@ -18156,8 +17807,6 @@ msgstr "" msgid "Services" msgstr "" -#: src/etc/inc/pkg-utils.inc:859 -#: src/etc/inc/pkg-utils.inc:999 #: src/www/fbegin.inc:245 msgid "Services... " msgstr "" @@ -19031,10 +18680,6 @@ msgstr "" msgid "Starting initial configuration" msgstr "" -#: src/etc/inc/pkg-utils.inc:921 -msgid "Starting package deletion for %s..." -msgstr "" - #: src/etc/inc/system.inc:621 msgid "Starting syslog..." msgstr "" @@ -19592,10 +19237,6 @@ msgstr "" msgid "Synchronize Voucher Database IP" msgstr "" -#: src/etc/inc/pkg-utils.inc:221 -msgid "Syncing packages:" -msgstr "" - #: src/etc/inc/system.inc:1653 msgid "Syncing system time before startup..." msgstr "" @@ -19647,11 +19288,6 @@ msgstr "" msgid "System events" msgstr "" -#: src/etc/inc/pkg-utils.inc:744 -#: src/etc/inc/pkg-utils.inc:1059 -msgid "System files... " -msgstr "" - #: src/www/services_snmp.php:310 msgid "System location" msgstr "" @@ -19836,10 +19472,6 @@ msgstr "" msgid "Tables" msgstr "" -#: src/etc/inc/pkg-utils.inc:965 -msgid "Tabs items... " -msgstr "" - #: src/www/interfaces_qinq.php:126 #: src/www/interfaces_qinq_edit.php:353 msgid "Tag" @@ -19933,32 +19565,10 @@ msgstr "" msgid "That username is reserved by the system." msgstr "" -#: src/etc/inc/pkg-utils.inc:263 -msgid "" -"The %1$s package is missing required dependencies and must be reinstalled. %2$s" -msgstr "" - #: src/www/interfaces.php:1556 msgid "The %s configuration has been changed." msgstr "" -#: src/etc/inc/pkg-utils.inc:383 -msgid "The %s package is missing its configuration file and must be reinstalled." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:288 -#: src/etc/inc/pkg-utils.inc:416 -msgid "The %s package is missing required dependencies and must be reinstalled." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:941 -msgid "The %s package is not installed.%sDeletion aborted." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:691 -msgid "The %s package is not installed.%sInstallation aborted." -msgstr "" - #: src/www/firewall_nat_1to1_edit.php:532 msgid "The 1:1 mapping will only be used for connections to or from the specified destination." msgstr "" @@ -21031,10 +20641,6 @@ msgid "" "The remote gateway \"%1$s\" is already used by phase1 \"%2$s\"." msgstr "" -#: src/etc/inc/xmlrpc_client.inc:157 -msgid "The requested method didn't return an XML_RPC_Response object." -msgstr "" - #: src/www/load_balancer_pool_edit.php:91 msgid "The retry value must be an integer between 1 and 65535." msgstr "" @@ -21126,10 +20732,6 @@ msgstr "" msgid "The static route configuration has been changed.%sYou must apply the changes in order for them to take effect." msgstr "" -#: src/etc/inc/xmlrpc_client.inc:1330 -msgid "The submitted request did not contain this parameter" -msgstr "" - #: src/www/services_dhcp.php:314 msgid "The subnet range cannot overlap with virtual IP address %s." msgstr "" @@ -21935,12 +21537,6 @@ msgid "" "that the image has not been tampered with." msgstr "" -#: src/etc/inc/xmlrpc_server.inc:48 -msgid "" -"This method lists all the" -" methods that the XML-RPC server knows how to dispatch" -msgstr "" - #: src/www/load_balancer_monitor_edit.php:84 msgid "This monitor name has already been used. Monitor names must be unique." msgstr "" @@ -22716,19 +22312,10 @@ msgstr "" msgid "Unable to check for updates." msgstr "" -#: src/etc/inc/pkg-utils.inc:1212 -#: src/www/pkg_mgr.php:76 -msgid "Unable to communicate with %1$s. Please verify DNS and interface configuration, and that %2$s has functional Internet connectivity." -msgstr "" - #: src/www/firewall_aliases_edit.php:167 msgid "Unable to fetch usable data." msgstr "" -#: src/etc/inc/pkg-utils.inc:876 -msgid "Unable to load package configuration. Installation aborted." -msgstr "" - #: src/etc/inc/config.lib.inc:487 msgid "Unable to open /conf/config.xml for writing in write_config()" msgstr "" @@ -22763,10 +22350,6 @@ msgstr "" msgid "Unfortunately we have detected a programming bug." msgstr "" -#: src/etc/inc/pkg-utils.inc:1230 -msgid "Uninstalling package" -msgstr "" - #: src/www/vpn_ipsec_phase2.php:122 msgid "Unique Identifier" msgstr "" @@ -22779,10 +22362,6 @@ msgstr "" msgid "Unknown block error." msgstr "" -#: src/etc/inc/xmlrpc_client.inc:152 -msgid "Unknown method" -msgstr "" - #: src/etc/inc/easyrule.inc:374 msgid "Unknown pass error." msgstr "" @@ -23130,10 +22709,6 @@ msgstr "" msgid "User (s)" msgstr "" -#: src/etc/inc/priv/user.priv.inc:6 -msgid "User - Services - Captive portal login" -msgstr "" - #: src/www/vpn_openvpn_client.php:672 msgid "User Authentication Settings" msgstr "" @@ -24989,10 +24564,6 @@ msgstr "" msgid "Would you like to submit the programming debug logs to the OPNsense developers for inspection?" msgstr "" -#: src/etc/inc/pkg-utils.inc:655 -msgid "Writing configuration... " -msgstr "" - #: src/www/bandwidth_by_ip.php:47 msgid "Wrong Interface" msgstr "" @@ -25001,10 +24572,6 @@ msgstr "" msgid "Wrong data submitted" msgstr "" -#: src/etc/inc/array_intersect_key.inc:37 -msgid "Wrong parameter count for array_intersect_key()" -msgstr "" - #: src/etc/inc/interfaces.inc:1191 msgid "Wrong parameters used during interface_bring_down" msgstr "" @@ -25013,10 +24580,6 @@ msgstr "" msgid "XML configuration file not found. %s cannot continue booting." msgstr "" -#: src/etc/inc/xmlrpc_client.inc:1497 -msgid "XML error at line 1, check URL" -msgstr "" - #: src/etc/inc/xmlparse.inc:93 #: src/etc/inc/xmlparse_attr.inc:73 msgid "XML error: %1$s at line %2$d cannot occur more than once" @@ -25977,14 +25540,6 @@ msgstr "" msgid "and almost never equal to the destination port range (and should usually be" msgstr "" -#: src/etc/inc/pkg-utils.inc:706 -msgid "and its dependencies." -msgstr "" - -#: src/etc/inc/pkg-utils.inc:707 -msgid "and its dependencies... " -msgstr "" - #: src/www/services_dhcp.php:1089 msgid "and the UEFI 32bit filename " msgstr "" @@ -26030,10 +25585,6 @@ msgstr "" msgid "aren't allowed." msgstr "" -#: src/etc/inc/array_intersect_key.inc:45 -msgid "array_intersect_key() Argument #" -msgstr "" - #: src/www/system_advanced_firewall.php:231 msgid "as the name says, it is the normal optimization algorithm" msgstr "" @@ -26042,10 +25593,6 @@ msgstr "" msgid "association removed." msgstr "" -#: src/etc/inc/smtp.inc:290 -msgid "authenticated mechanism %1$s may not be used: %2$s" -msgstr "" - #: src/www/diag_authentication.php:46 msgid "authenticated successfully." msgstr "" @@ -26155,31 +25702,6 @@ msgstr "" msgid "confirmation" msgstr "" -#: src/etc/inc/smtp.inc:686 -msgid "connection is already established and the recipient is already set" -msgstr "" - -#: src/etc/inc/smtp.inc:366 -msgid "connection is already established" -msgstr "" - -#: src/etc/inc/smtp.inc:640 -msgid "connection is not in the initial state" -msgstr "" - -#: src/etc/inc/smtp.inc:698 -msgid "connection is not in the recipient setting state" -msgstr "" - -#: src/etc/inc/smtp.inc:757 -#: src/etc/inc/smtp.inc:768 -msgid "connection is not in the sending data state" -msgstr "" - -#: src/etc/inc/smtp.inc:727 -msgid "connection is not in the start sending data state" -msgstr "" - #: src/www/interfaces.php:2658 #: src/www/interfaces.php:2780 msgid "connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected." @@ -26206,18 +25728,6 @@ msgstr "" msgid "could not bring realif up -- variable not defined -- interface_gif_configure()" msgstr "" -#: src/etc/inc/smtp.inc:257 -msgid "could not connect to the host \"%1$s\": %2$s" -msgstr "" - -#: src/etc/inc/smtp.inc:446 -msgid "could not determine the SMTP to connect" -msgstr "" - -#: src/etc/inc/smtp.inc:234 -msgid "could not resolve host \"%s\"" -msgstr "" - #: src/www/guiconfig.inc:292 #: src/www/system_certmanager.php:654 #: src/www/vpn_ipsec_mobile.php:331 @@ -26416,10 +25926,6 @@ msgstr "" msgid "device not present! Is the modem attached to the system?" msgstr "" -#: src/etc/inc/smtp.inc:632 -msgid "direct delivery connection is already established and sender is already set" -msgstr "" - #: src/www/firewall_nat_1to1_edit.php:558 #: src/www/firewall_nat_edit.php:823 #: src/www/firewall_nat_edit.php:826 @@ -26435,10 +25941,6 @@ msgstr "" msgid "do not restore config.xml." msgstr "" -#: src/etc/inc/smtp.inc:238 -msgid "domain \"%s\" resolved to an address excluded to be valid" -msgstr "" - #: src/www/vpn_pptp.php:487 msgid "don't forget to " msgstr "" @@ -26469,29 +25971,6 @@ msgstr "" #: src/etc/inc/interfaces.inc:1105 #: src/etc/inc/interfaces.inc:1118 #: src/etc/inc/interfaces.inc:1978 -#: src/etc/inc/pkg-utils.inc:347 -#: src/etc/inc/pkg-utils.inc:635 -#: src/etc/inc/pkg-utils.inc:658 -#: src/etc/inc/pkg-utils.inc:736 -#: src/etc/inc/pkg-utils.inc:751 -#: src/etc/inc/pkg-utils.inc:785 -#: src/etc/inc/pkg-utils.inc:814 -#: src/etc/inc/pkg-utils.inc:821 -#: src/etc/inc/pkg-utils.inc:838 -#: src/etc/inc/pkg-utils.inc:854 -#: src/etc/inc/pkg-utils.inc:870 -#: src/etc/inc/pkg-utils.inc:977 -#: src/etc/inc/pkg-utils.inc:994 -#: src/etc/inc/pkg-utils.inc:1019 -#: src/etc/inc/pkg-utils.inc:1064 -#: src/etc/inc/pkg-utils.inc:1073 -#: src/etc/inc/pkg-utils.inc:1083 -#: src/etc/inc/pkg-utils.inc:1098 -#: src/etc/inc/pkg-utils.inc:1105 -#: src/etc/inc/pkg-utils.inc:1124 -#: src/etc/inc/pkg-utils.inc:1451 -#: src/etc/inc/pkg-utils.inc:1477 -#: src/etc/inc/pkg-utils.inc:1520 #: src/etc/inc/rrd.inc:922 #: src/etc/inc/services.inc:1298 #: src/etc/inc/services.inc:1678 @@ -26655,18 +26134,6 @@ msgstr "" msgid "error page" msgstr "" -#: src/etc/inc/meta.inc:132 -msgid "error: tag mismatch ( %1$s != %2$s ) in '%3$s'%4$s" -msgstr "" - -#: src/etc/inc/smtp.inc:222 -msgid "establishing SSL connections requires at least PHP version 4.3.0" -msgstr "" - -#: src/etc/inc/smtp.inc:225 -msgid "establishing SSL connections requires the OpenSSL extension enabled" -msgstr "" - #: src/www/system_camanager.php:528 #: src/www/system_camanager.php:538 #: src/www/system_camanager.php:548 @@ -26733,10 +26200,6 @@ msgstr "" msgid "failed!" msgstr "" -#: src/etc/inc/pkg-utils.inc:1444 -msgid "failed!nnInstallation aborted.n" -msgstr "" - #: src/www/system_usermanager_settings_test.php:72 #: src/www/system_usermanager_settings_test.php:75 #: src/www/system_usermanager_settings_test.php:78 @@ -26974,46 +26437,6 @@ msgstr "" msgid "is" msgstr "" -#: src/etc/inc/smtp.inc:266 -msgid "it is not possible to authenticate using the specified mechanism because the SASL library class is not loaded" -msgstr "" - -#: src/etc/inc/smtp.inc:681 -msgid "it is not possible to deliver directly to recipients of different domains" -msgstr "" - -#: src/etc/inc/smtp.inc:542 -msgid "it is not supported any of the authentication mechanisms required by the server" -msgstr "" - -#: src/etc/inc/smtp.inc:114 -msgid "it was not possible to read line from the SMTP server" -msgstr "" - -#: src/etc/inc/smtp.inc:136 -msgid "it was not possible to send a line to the SMTP server" -msgstr "" - -#: src/etc/inc/smtp.inc:150 -msgid "it was not possible to send data to the SMTP server" -msgstr "" - -#: src/etc/inc/smtp.inc:804 -msgid "it was not previously established a SMTP connection" -msgstr "" - -#: src/etc/inc/smtp.inc:662 -msgid "it was not specified a valid direct recipient" -msgstr "" - -#: src/etc/inc/smtp.inc:410 -msgid "it was not specified the POP3 authentication password" -msgstr "" - -#: src/etc/inc/smtp.inc:404 -msgid "it was not specified the POP3 authentication user" -msgstr "" - #: src/www/firewall_rules_edit.php:1387 #: src/www/firewall_rules_edit.php:1396 msgid "keep state" @@ -27055,10 +26478,6 @@ msgstr "" msgid "linkshare service curve defined but missing initial bandwidth (m1) value" msgstr "" -#: src/etc/inc/meta.inc:68 -msgid "list_phpfiles: unable to examine path %s\n" -msgstr "" - #: src/www/guiconfig.inc:1041 msgid "listing only first 10k items" msgstr "" @@ -27104,11 +26523,6 @@ msgstr "" msgid "matched log entries." msgstr "" -#: TODO: figure out what's going on with src/etc/inc/xmlrpc_server.inc:392 -#: src/etc/inc/xmlrpc_client.inc:1361 -msgid "mb_convert_encoding() is not available" -msgstr "" - #: src/www/interfaces_qinq_edit.php:263 msgid "members" msgstr "" @@ -27131,10 +26545,6 @@ msgstr "" msgid "minutes" msgstr "" -#: src/etc/inc/xmlrpc_client.inc:260 -msgid "missing top level xmlrpc element" -msgstr "" - #: src/www/load_balancer_relay_action_edit.php:124 msgid "modified '%s' action:" msgstr "" @@ -27364,10 +26774,6 @@ msgstr "" msgid "outgoing (as seen by firewall)" msgstr "" -#: src/etc/inc/pkg-utils.inc:639 -msgid "overwrite!" -msgstr "" - #: src/www/pkg_mgr_installed.php:105 msgid "packages" msgstr "" @@ -27469,10 +26875,6 @@ msgstr "" msgid "rate" msgstr "" -#: src/etc/inc/smtp.inc:108 -msgid "reached the end of data while reading from the SMTP server conection" -msgstr "" - #: src/www/status_captiveportal_voucher_rolls.php:95 msgid "ready" msgstr "" @@ -27650,10 +27052,6 @@ msgstr "" msgid "send Wake on LAN packet to this MAC address" msgstr "" -#: src/etc/inc/smtp.inc:478 -msgid "server does not require authentication" -msgstr "" - #: src/etc/inc/pfsense-utils.inc:431 msgid "setsockopt() failed, error: %s" msgstr "" @@ -27855,10 +27253,6 @@ msgstr "" msgid "type" msgstr "" -#: src/etc/inc/meta.inc:99 -msgid "unable to read %sn" -msgstr "" - #: src/www/services_captiveportal.php:928 msgid "unformatted:" msgstr "" @@ -27940,18 +27334,6 @@ msgstr "" msgid "virtual full time" msgstr "" -#: src/etc/inc/meta.inc:185 -msgid "warning: tag %1\$s has invalid data in '%2\$s'%3\$s" -msgstr "" - -#: src/etc/inc/meta.inc:163 -msgid "warning: tag %1$s has malformed data in '%2$s'%3$s" -msgstr "" - -#: src/etc/inc/meta.inc:143 -msgid "warning: tag %1$s has no data in '%2$s'%3$s" -msgstr "" - #: src/www/diag_defaults.php:67 msgid "webConfigurator admin password will be reset to" msgstr "" @@ -28016,10 +27398,6 @@ msgstr "" msgid "www.example.com" msgstr "" -#: src/etc/inc/xmlrpc_client.inc:268 -msgid "xmlrpc element %1$s cannot be child of %2$s" -msgstr "" - #: src/www/diag_routes.php:172 #: src/www/pkg_mgr_settings.php:114 #: src/www/services_captiveportal.php:828 @@ -28043,10 +27421,6 @@ msgstr "" msgid "The Captive Portal zone '%s' has Hard Timeout parameter set to a value bigger than Default lease time (%s)." msgstr "" -#: src/etc/inc/xmlrpc_client.inc:860 -msgid "send()'s %s parameter must be an XML_RPC_Message object." -msgstr "" - #: internationalize date() calls #: src/etc/inc/services.inc:2246 msgid "Created:" @@ -28106,12 +27480,6 @@ msgstr "" #msgid ($macformat),"n"; #msgstr "" -# TODO: unqouted vars gettext string, -# src/etc/inc/pkg-utils.inc:1402 -# src/etc/inc/pkg-utils.inc:1414 -#msgid ($msg) -#msgstr "" - # TODO: unqouted vars gettext string, # src/www/system_advanced_misc.php:213 # src/www/system_advanced_network.php:139 From 8efc78105e668c967ded515a446921450c6d10c1 Mon Sep 17 00:00:00 2001 From: "Isaac (.ike) Levy" Date: Wed, 22 Apr 2015 23:14:51 -0400 Subject: [PATCH 02/51] more lines removed Signed-off-by: Isaac (.ike) Levy --- src/share/locale/en/LC_MESSAGES/OPNsense.pot | 578 ------------------- 1 file changed, 578 deletions(-) diff --git a/src/share/locale/en/LC_MESSAGES/OPNsense.pot b/src/share/locale/en/LC_MESSAGES/OPNsense.pot index f9946a762..fd76bea19 100644 --- a/src/share/locale/en/LC_MESSAGES/OPNsense.pot +++ b/src/share/locale/en/LC_MESSAGES/OPNsense.pot @@ -104,11 +104,6 @@ msgstr "" msgid " update(s) are available." msgstr "" -#: src/www/pkg_mgr.php:254 -#: src/www/pkg_mgr_installed.php:203 -msgid " version to check its change log." -msgstr "" - #: src/www/diag_dump_states_sources.php:144 msgid "# Connections" msgstr "" @@ -282,10 +277,6 @@ msgstr "" msgid "%s made unknown change" msgstr "" -#: src/www/pkg_mgr_settings.php:89 -msgid "%s packages" -msgstr "" - #: src/etc/inc/config.console.inc:48 msgid "%s requires *AT LEAST* %s RAM to function correctly.%s" msgstr "" @@ -754,10 +745,6 @@ msgstr "" msgid "A valid FQDN for 'Peer identifier' must be specified." msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:93 -msgid "A valid Hostname must be specified. [%s]" -msgstr "" - #: src/www/services_unbound_domainoverride_edit.php:76 msgid "" "A valid IP address and port must be specified, for example " @@ -1243,10 +1230,6 @@ msgstr "" msgid "A valid value for 'Login Banner' must be specified." msgstr "" -#: src/www/pkg_mgr_settings.php:104 -msgid "A warning is printed on the Dashboard and in the package manager when an unofficial package server is in use." -msgstr "" - #: src/www/interfaces_ppps_edit.php:734 msgid "ACFComp" msgstr "" @@ -1564,10 +1547,6 @@ msgstr "" msgid "Adding MAC addresses as 'pass' MACs allows them access through the captive portal automatically without being taken to the portal page." msgstr "" -#: src/www/services_captiveportal_hostname.php:142 -msgid "Adding allowed Hostnames will allow a DNS hostname access to/from access through the captive portal without being taken to the portal page. This can be used for a web server serving images for the portal page or a DNS server on another network, for example. By specifying from addresses, it may be used to always allow pass-through access from a client behind the captive portal." -msgstr "" - #: src/www/services_captiveportal_ip.php:146 msgid "Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. This can be used for a web server serving images for the portal page or a DNS server on another network, for example." msgstr "" @@ -1901,20 +1880,10 @@ msgstr "" msgid "All Users" msgstr "" -#: src/www/services_captiveportal_hostname.php:146 -#: src/www/services_captiveportal_hostname.php:153 -msgid "All connections" -msgstr "" - #: src/www/firewall_rules.php:804 msgid "All incoming connections on this interface will be blocked until you add pass rules." msgstr "" -#: src/www/pkg_mgr_install.php:261 -#: src/www/pkg_mgr_install.php:262 -msgid "All packages reinstalled." -msgstr "" - #: src/www/services_ntpd_gps.php:425 msgid "All serial ports are listed, be sure to pick the port with the GPS attached." msgstr "" @@ -1925,7 +1894,6 @@ msgstr "" #: src/www/diag_smart.php:299 #: src/www/firewall_aliases.php:176 -#: src/www/pkg_mgr.php:171 msgid "All" msgstr "" @@ -2871,13 +2839,8 @@ msgstr "" msgid "Allow unprivileged access to tap(4) device nodes" msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:88 -msgid "Allowed Hostname" -msgstr "" - #: src/www/services_captiveportal.php:504 #: src/www/services_captiveportal_filemanager.php:150 -#: src/www/services_captiveportal_hostname.php:89 #: src/www/services_captiveportal_ip.php:90 #: src/www/services_captiveportal_mac.php:156 #: src/www/services_captiveportal_vouchers.php:447 @@ -2890,7 +2853,6 @@ msgstr "" #: src/www/services_captiveportal.php:502 #: src/www/services_captiveportal_filemanager.php:148 -#: src/www/services_captiveportal_hostname.php:88 #: src/www/services_captiveportal_ip.php:88 #: src/www/services_captiveportal_mac.php:154 #: src/www/services_captiveportal_vouchers.php:445 @@ -3060,7 +3022,6 @@ msgstr "" #: src/www/firewall_rules.php:354 #: src/www/guiconfig.inc:285 -#: src/www/headjs.php:131 msgid "Apply changes" msgstr "" @@ -3069,14 +3030,9 @@ msgid "Apply the action immediately on match." msgstr "" #: src/www/javascript/datepicker/js/datepicker.js:66 -#: src/www/javascript/jquery/jquery-ui-1.11.1.min.js:6 msgid "April" msgstr "" -#: src/www/halt.php:56 -msgid "Are you sure you want to halt the system?" -msgstr "" - #: src/www/diag_defaults.php:69 msgid "Are you sure you want to proceed?" msgstr "" @@ -3147,7 +3103,6 @@ msgid "Attributes" msgstr "" #: src/www/javascript/datepicker/js/datepicker.js:70 -#: src/www/javascript/jquery/jquery-ui-1.11.1.min.js:6 msgid "August" msgstr "" @@ -3310,11 +3265,6 @@ msgstr "" msgid "Available Consumers" msgstr "" -#: src/www/pkg_mgr.php:130 -#: src/www/pkg_mgr_installed.php:104 -msgid "Available Packages" -msgstr "" - #: src/www/foot.inc:25 msgid "Available Widgets" msgstr "" @@ -3323,22 +3273,11 @@ msgstr "" msgid "Available network ports:" msgstr "" -#: src/www/pkg_mgr_install.php:98 -msgid "Available packages" -msgstr "" - #: src/www/services_dhcp.php:791 #: src/www/services_dhcpv6.php:557 msgid "Available range" msgstr "" -#: src/www/pkg_mgr_installed.php:148 -#: src/www/pkg_mgr_installed.php:150 -#: src/www/pkg_mgr_installed.php:157 -#: src/www/pkg_mgr_installed.php:159 -msgid "Available" -msgstr "" - #: src/www/system_gateways_edit.php:813 msgid "Average Delay Replies Qty" msgstr "" @@ -3415,7 +3354,6 @@ msgstr "" msgid "Bandwidth cannot be negative." msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:201 #: src/www/services_captiveportal_ip_edit.php:220 #: src/www/services_captiveportal_mac_edit.php:238 msgid "Bandwidth down" @@ -3446,7 +3384,6 @@ msgstr "" msgid "Bandwidth must be an integer." msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:195 #: src/www/services_captiveportal_ip_edit.php:213 #: src/www/services_captiveportal_mac_edit.php:230 msgid "Bandwidth up" @@ -3483,7 +3420,6 @@ msgstr "" msgid "Base DN:" msgstr "" -#: src/www/pkg_mgr_settings.php:116 #: src/www/system_firmware_settings.php:153 msgid "Base URL:" msgstr "" @@ -3518,10 +3454,6 @@ msgstr "" msgid "Beginning firmware upgrade" msgstr "" -#: src/www/pkg_mgr_install.php:169 -msgid "Beginning package installation." -msgstr "" - #: src/www/firewall_shaper_layer7.php:484 msgid "Behaviour" msgstr "" @@ -3588,18 +3520,6 @@ msgstr "" msgid "Boolean" msgstr "" -#: src/www/diag_nanobsd.php:131 -msgid "Bootup information" -msgstr "" - -#: src/www/diag_nanobsd.php:143 -msgid "Bootup slice is currently:" -msgstr "" - -#: src/www/diag_nanobsd.php:140 -msgid "Bootup" -msgstr "" - #: src/etc/inc/shaper.inc:2426 msgid "Borrow from other queues when available" msgstr "" @@ -3625,7 +3545,6 @@ msgstr "" #: src/www/interfaces.php:3176 #: src/www/interfaces.php:3186 #: src/www/interfaces.php:3195 -#: src/www/services_captiveportal_hostname_edit.php:170 msgid "Both" msgstr "" @@ -4061,8 +3980,6 @@ msgstr "" #: src/www/services_captiveportal.php:56 #: src/www/services_captiveportal_filemanager.php:59 -#: src/www/services_captiveportal_hostname.php:49 -#: src/www/services_captiveportal_hostname_edit.php:46 #: src/www/services_captiveportal_ip.php:48 #: src/www/services_captiveportal_ip_edit.php:47 #: src/www/services_captiveportal_mac.php:52 @@ -4079,7 +3996,6 @@ msgstr "" #: src/www/services_captiveportal.php:500 #: src/www/services_captiveportal_filemanager.php:146 -#: src/www/services_captiveportal_hostname.php:86 #: src/www/services_captiveportal_ip.php:86 #: src/www/services_captiveportal_mac.php:152 #: src/www/services_captiveportal_vouchers.php:443 @@ -4094,11 +4010,6 @@ msgstr "" msgid "Captiveportal" msgstr "" -#: src/www/pkg_mgr.php:201 -#: src/www/pkg_mgr_installed.php:118 -msgid "Category" -msgstr "" - #: src/www/status_interfaces.php:235 msgid "Cell Current Down" msgstr "" @@ -4470,10 +4381,6 @@ msgstr "" msgid "Clear" msgstr "" -#: src/www/pkg_mgr.php:254 -msgid "Click " -msgstr "" - #: src/www/system_firmware.php:236 msgid "Click \"Enable firmware upload\" to begin." msgstr "" @@ -4495,24 +4402,6 @@ msgstr "" msgid "Click individual date to select that date only. Click the appropriate weekday Header to select all occurrences of that weekday." msgstr "" -#: src/www/pkg_mgr_installed.php:203 -msgid "" -"Click on \".ucfirst($pkg['name']).\" version to check its change log." -msgstr "" - -#: src/www/pkg_mgr.php:245 -msgid "Click on package name to access its website." -msgstr "" - -#: src/www/pkg_mgr.php:270 -msgid "" -"Click package info for more details about \".ucfirst($index['name']).\" package." -msgstr "" - -#: src/www/pkg_mgr_installed.php:205 -msgid "Click package info for more details about \".ucfirst($pkg['name']).\" package." -msgstr "" - #: src/www/firewall_rules.php:806 msgid "Click the" msgstr "" @@ -4995,10 +4884,6 @@ msgstr "" msgid "Could not create new queue/discipline!" msgstr "" -#: src/www/pkg_mgr_install.php:208 -msgid "Could not find %s." -msgstr "" - #: src/etc/inc/filter.inc:2343 msgid "Could not find IPv4 gateway for interface (%s)." msgstr "" @@ -5217,10 +5102,6 @@ msgstr "" msgid "Creating reflection rule for %s..." msgstr "" -#: src/www/pkg_mgr_install.php:219 -msgid "Creating restore point before package installation." -msgstr "" - #: src/etc/inc/rrd.inc:896 msgid "Creating rrd update script" msgstr "" @@ -5370,7 +5251,6 @@ msgid "DHCP service events" msgstr "" #: src/www/diag_logs_dhcp.php:44 -#: src/www/diag_logs_tabs.php:31 #: src/www/interfaces.php:1340 #: src/www/services_dhcp_edit.php:314 msgid "DHCP" @@ -5598,7 +5478,6 @@ msgid "Debug info range" msgstr "" #: src/www/javascript/datepicker/js/datepicker.js:74 -#: src/www/javascript/jquery/jquery-ui-1.11.1.min.js:6 msgid "December" msgstr "" @@ -5836,10 +5715,6 @@ msgstr "" #: src/www/load_balancer_relay_protocol_edit.php:69 #: src/www/load_balancer_relay_protocol_edit.php:220 #: src/www/load_balancer_virtual_server_edit.php:173 -#: src/www/pkg_mgr.php:204 -#: src/www/pkg_mgr_installed.php:120 -#: src/www/services_captiveportal_hostname.php:107 -#: src/www/services_captiveportal_hostname_edit.php:189 #: src/www/services_captiveportal_ip.php:107 #: src/www/services_captiveportal_ip_edit.php:205 #: src/www/services_captiveportal_mac.php:174 @@ -6037,10 +5912,6 @@ msgstr "" msgid "Destination server" msgstr "" -#: src/www/diag_nanobsd.php:199 -msgid "Destination slice:" -msgstr "" - #: src/www/firewall_rules.php:120 #: src/www/firewall_rules_edit.php:988 msgid "Destination unreachable" @@ -6111,7 +5982,6 @@ msgstr "" #: src/www/diag_dump_states.php:59 #: src/www/diag_dump_states_sources.php:53 #: src/www/diag_gmirror.php:33 -#: src/www/diag_nanobsd.php:36 #: src/www/diag_ndp.php:91 #: src/www/diag_packet_capture.php:75 #: src/www/diag_patterns.php:52 @@ -6125,7 +5995,6 @@ msgstr "" #: src/www/diag_testport.php:32 #: src/www/diag_traceroute.php:32 #: src/www/fbegin.inc:446 -#: src/www/halt.php:35 #: src/www/reboot.php:34 #: src/www/system_firmware_auto.php:47 #: src/www/system_firmware_restorefullbackup.php:89 @@ -6188,7 +6057,6 @@ msgstr "" #: src/www/firewall_rules_edit.php:932 #: src/www/load_balancer_relay_action_edit.php:107 #: src/www/load_balancer_relay_action_edit.php:444 -#: src/www/services_captiveportal_hostname_edit.php:166 msgid "Direction" msgstr "" @@ -6668,7 +6536,6 @@ msgstr "" msgid "Do you really want to delete this access list?" msgstr "" -#: src/www/services_captiveportal_hostname.php:134 #: src/www/services_captiveportal_ip.php:138 msgid "Do you really want to delete this address?" msgstr "" @@ -6749,10 +6616,6 @@ msgstr "" msgid "Do you really want to delete this interface?" msgstr "" -#: src/www/pkg.php:456 -msgid "Do you really want to delete this item?" -msgstr "" - #: src/www/firewall_nat_npt.php:155 #: src/www/services_dhcp.php:1249 #: src/www/services_dhcpv6.php:881 @@ -6824,10 +6687,6 @@ msgid "" "data." msgstr "" -#: src/www/pkg.php:187 -msgid "Do you really want to save changes?" -msgstr "" - #: src/etc/rc.initial.setlanip:106 msgid "Do you want to enable the %s server on %s?" msgstr "" @@ -6936,10 +6795,6 @@ msgid "" msgstr "" #: src/etc/inc/filter.inc:390 -#: src/www/restart_httpd.php:41 -#: src/www/restart_httpd.php:44 -#: src/www/restart_httpd.php:47 -#: src/www/restart_httpd.php:50 msgid "Done" msgstr "" @@ -6973,7 +6828,6 @@ msgstr "" msgid "Download current page" msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:98 #: src/www/services_captiveportal_ip_edit.php:101 #: src/www/services_captiveportal_mac_edit.php:112 msgid "Download speed needs to be an integer" @@ -7050,22 +6904,6 @@ msgstr "" msgid "Duplicate Connections" msgstr "" -#: src/www/diag_nanobsd.php:193 -msgid "Duplicate bootup slice to alternate" -msgstr "" - -#: src/www/diag_nanobsd.php:196 -msgid "Duplicate bootup slice" -msgstr "" - -#: src/www/diag_nanobsd.php:207 -msgid "Duplicate slice" -msgstr "" - -#: src/www/diag_nanobsd.php:72 -msgid "Duplicating slice. Please wait, this will take a moment..." -msgstr "" - #: src/etc/inc/pfsense-utils.inc:2554 msgid "Dutch" msgstr "" @@ -7205,10 +7043,6 @@ msgstr "" msgid "ERROR: Could not parse /usr/local/www/wizards/%s file." msgstr "" -#: src/www/pkg.php:55 -msgid "ERROR: No package defined." -msgstr "" - #: src/www/pkg_edit.php:60 msgid "ERROR: No valid package defined." msgstr "" @@ -7384,10 +7218,6 @@ msgstr "" msgid "Edit alias" msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:46 -msgid "Edit allowed Hostname" -msgstr "" - #: src/www/services_captiveportal_ip_edit.php:47 msgid "Edit allowed IP address" msgstr "" @@ -8007,10 +7837,6 @@ msgstr "" msgid "Enter a description (name) for the interface here." msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:204 -msgid "Enter a download limit to be enforced on this Hostname in Kbit/s" -msgstr "" - #: src/www/services_captiveportal_ip_edit.php:223 msgid "Enter a download limit to be enforced on this IP address in Kbit/s" msgstr "" @@ -8039,10 +7865,6 @@ msgstr "" msgid "Enter a single URL containing a list of Port numbers and/or Port ranges. After saving %s will download the URL." msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:198 -msgid "Enter a upload limit to be enforced on this Hostname in Kbit/s" -msgstr "" - #: src/www/services_captiveportal_ip_edit.php:216 msgid "Enter a upload limit to be enforced on this IP address in Kbit/s" msgstr "" @@ -8682,10 +8504,6 @@ msgstr "" msgid "External subnet" msgstr "" -#: src/www/pkg_mgr_install.php:272 -msgid "FAILED!" -msgstr "" - #: src/www/diag_smart.php:69 msgid "FAILED" msgstr "" @@ -8747,7 +8565,6 @@ msgstr "" #: src/www/services_captiveportal.php:506 #: src/www/services_captiveportal_filemanager.php:152 -#: src/www/services_captiveportal_hostname.php:91 #: src/www/services_captiveportal_ip.php:92 #: src/www/services_captiveportal_mac.php:158 #: src/www/services_captiveportal_vouchers.php:449 @@ -8873,7 +8690,6 @@ msgid "Firewall state table" msgstr "" #: src/www/diag_logs_filter.php:107 -#: src/www/diag_logs_tabs.php:30 #: src/www/fbegin.inc:410 #: src/www/firewall_aliases.php:142 #: src/www/firewall_aliases_edit.php:38 @@ -9036,10 +8852,6 @@ msgstr "" msgid "Forcefully reloading IPsec" msgstr "" -#: src/www/restart_httpd.php:42 -msgid "Forcing all PHP file permissions to 0755" -msgstr "" - #: src/www/diag_gmirror.php:235 msgid "Forget Disconnected Disks" msgstr "" @@ -9086,8 +8898,6 @@ msgstr "" msgid "From e-mail address" msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:170 -#: src/www/services_captiveportal_hostname_edit.php:178 #: src/www/system_gateways_edit.php:772 #: src/www/system_gateways_edit.php:784 msgid "From" @@ -9559,10 +9369,6 @@ msgstr "" msgid "Halt System" msgstr "" -#: src/www/halt.php:35 -msgid "Halt system" -msgstr "" - #: src/etc/inc/upgrade_config.inc:603 msgid "Handling of non-IP packets which are not passed to pfil (see if_bridge(4))" msgstr "" @@ -9962,9 +9768,6 @@ msgstr "" #: src/www/diag_arp.php:327 #: src/www/diag_ndp.php:144 #: src/www/interfaces.php:1949 -#: src/www/services_captiveportal_hostname.php:106 -#: src/www/services_captiveportal_hostname_edit.php:182 -#: src/www/services_captiveportal_hostname_edit.php:186 #: src/www/services_dhcp.php:1213 #: src/www/services_dhcp_edit.php:397 #: src/www/services_dhcpv6.php:850 @@ -10234,7 +10037,6 @@ msgstr "" #: src/www/diag_ipsec_leases.php:32 #: src/www/diag_ipsec_sad.php:33 #: src/www/diag_ipsec_spd.php:33 -#: src/www/diag_logs_tabs.php:33 #: src/www/fbegin.inc:221 #: src/www/fbegin.inc:237 #: src/www/vpn_ipsec.php:205 @@ -10872,10 +10674,6 @@ msgid "" "enter it here twice." msgstr "" -#: src/www/diag_nanobsd.php:81 -msgid "If you would like to boot from this newly duplicated slice please set it using the bootup information area." -msgstr "" - #: src/www/diag_logs_filter.php:301 #: src/www/diag_logs_filter_dynamic.php:111 #: src/www/firewall_nat.php:225 @@ -11089,53 +10887,18 @@ msgid "Insert my local MAC address" msgstr "" #: TODO: does this even work? -#: src/www/pkg_mgr.php:282 msgid "Install \".ucfirst($index['name']).\" package." msgstr "" -#: src/www/pkg_mgr_install.php:44 -msgid "Install Package" -msgstr "" - -#: src/www/pkg_mgr_install.php:282 -msgid "Installation completed. Please check to make sure that the package is configured from the respective menu then start the package." -msgstr "" - -#: src/www/pkg_mgr_install.php:280 -msgid "Installation completed." -msgstr "" - -#: src/www/pkg_mgr_install.php:273 -msgid "Installation halted." -msgstr "" - -#: src/www/pkg_mgr_install.php:272 -msgid "Installation of" -msgstr "" #: src/etc/inc/filter.inc:3274 msgid "Installed 15 minute filter reload for Time Based Rules" msgstr "" -#: src/www/pkg_mgr.php:131 -#: src/www/pkg_mgr_installed.php:108 -#: src/www/pkg_mgr_settings.php:90 -msgid "Installed Packages" -msgstr "" - #: src/etc/inc/services.inc:2342 msgid "Installed cron job for %s" msgstr "" -#: src/www/pkg_mgr_install.php:99 -msgid "Installed packages" -msgstr "" - -#: src/www/pkg_mgr_installed.php:151 -#: src/www/pkg_mgr_installed.php:160 -msgid "Installed" -msgstr "" - #: src/etc/inc/config.lib.inc:612 msgid "Installing configuration ...." msgstr "" @@ -11686,10 +11449,6 @@ msgstr "" msgid "Kbps" msgstr "" -#: src/www/diag_nanobsd.php:184 -msgid "Keep media mounted read/write at all times." -msgstr "" - #: src/www/interfaces.php:3098 msgid "Key 1:" msgstr "" @@ -11979,7 +11738,6 @@ msgid "Lease Type" msgstr "" #: src/www/diag_ipsec_leases.php:32 -#: src/www/diag_ipsec_tabs.php:29 msgid "Leases" msgstr "" @@ -12148,7 +11906,6 @@ msgid "Load Balance" msgstr "" #: src/www/diag_logs_relayd.php:41 -#: src/www/diag_logs_tabs.php:36 #: src/www/fbegin.inc:206 #: src/www/fbegin.inc:238 #: src/www/load_balancer_monitor.php:77 @@ -12324,10 +12081,6 @@ msgstr "" msgid "Log type" msgstr "" -#: src/www/pkg_mgr_install.php:200 -msgid "Log was not retrievable." -msgstr "" - #: src/www/firewall_rules_edit.php:1219 msgid "Log" msgstr "" @@ -12353,10 +12106,6 @@ msgstr "" msgid "Logs are held in constant-size circular log files. This field controls how large each log file is, and thus how many entries may exist inside the log. By default this is approximately 500KB per log file, and there are nearly 20 such log files." msgstr "" -#: src/www/diag_ipsec_tabs.php:32 -msgid "Logs" -msgstr "" - #: src/www/diag_smart.php:351 #: src/www/diag_system_pftop.php:128 msgid "Long" @@ -12406,7 +12155,6 @@ msgstr "" #: src/www/services_captiveportal.php:501 #: src/www/services_captiveportal_filemanager.php:147 -#: src/www/services_captiveportal_hostname.php:87 #: src/www/services_captiveportal_ip.php:87 #: src/www/services_captiveportal_mac.php:153 #: src/www/services_captiveportal_vouchers.php:444 @@ -12691,10 +12439,6 @@ msgstr "" msgid "Mbps" msgstr "" -#: src/www/diag_nanobsd.php:154 -msgid "Media Read/Write Status" -msgstr "" - #: src/www/status_interfaces.php:322 msgid "Media" msgstr "" @@ -12936,14 +12680,6 @@ msgstr "" msgid "More Information:" msgstr "" -#: src/www/restart_httpd.php:45 -msgid "Mounting file systems read only" -msgstr "" - -#: src/www/restart_httpd.php:39 -msgid "Mounting file systems read/write" -msgstr "" - #: src/www/interfaces_ppps_edit.php:206 msgid "Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface." msgstr "" @@ -13171,10 +12907,6 @@ msgstr "" msgid "NOTE: This schedule is in use so the name may not be modified!" msgstr "" -#: src/www/diag_nanobsd.php:177 -msgid "NOTE: This setting is only temporary, and can be switched dynamically in the background." -msgstr "" - #: src/www/vpn_l2tp.php:336 #: src/www/vpn_pppoe_edit.php:448 #: src/www/vpn_pptp.php:370 @@ -13204,7 +12936,6 @@ msgid "NOTE: leave blank to use the system default DNS servers - this interface' msgstr "" #: src/www/diag_gmirror.php:176 -#: src/www/diag_nanobsd.php:123 #: src/www/interfaces.php:3435 #: src/www/interfaces.php:3444 #: src/www/interfaces_groups_edit.php:326 @@ -13277,7 +13008,6 @@ msgid "NTP time server" msgstr "" #: src/www/diag_logs_ntpd.php:41 -#: src/www/diag_logs_tabs.php:38 #: src/www/fbegin.inc:207 #: src/www/fbegin.inc:239 #: src/www/services_ntpd.php:168 @@ -13339,8 +13069,6 @@ msgstr "" #: src/www/load_balancer_virtual_server_edit.php:61 #: src/www/load_balancer_virtual_server_edit.php:66 #: src/www/load_balancer_virtual_server_edit.php:167 -#: src/www/pkg_mgr.php:198 -#: src/www/pkg_mgr_installed.php:117 #: src/www/services_captiveportal_filemanager.php:189 #: src/www/services_igmpproxy.php:96 #: src/www/status_gateways.php:71 @@ -13365,11 +13093,6 @@ msgstr "" msgid "NanoBSD Boot Slice" msgstr "" -#: src/www/diag_nanobsd.php:134 -msgid "NanoBSD Image size" -msgstr "" - -#: src/www/diag_nanobsd.php:36 #: src/www/fbegin.inc:292 msgid "NanoBSD" msgstr "" @@ -13646,15 +13369,6 @@ msgid "" "No output received, or connection failed. Try with \"Show Remote Text\" unchecked first." msgstr "" -#: src/www/pkg_mgr.php:238 -#: src/www/pkg_mgr_installed.php:188 -msgid "No package info, check the forum" -msgstr "" - -#: src/www/pkg_mgr_install.php:266 -msgid "No packages are installed." -msgstr "" - #: src/etc/inc/authgui.inc:66 msgid "No page assigned to this user! Click here to logout." msgstr "" @@ -13707,8 +13421,6 @@ msgstr "" #: src/www/crash_reporter.php:63 #: src/www/crash_reporter.php:118 #: src/www/diag_defaults.php:74 -#: src/www/halt.php:60 -#: src/www/pkg.php:422 #: src/www/reboot.php:58 #: src/www/system_firmware.php:214 msgid "No" @@ -14043,7 +13755,6 @@ msgstr "" #: src/www/load_balancer_virtual_server_edit.php:289 #: src/www/services_captiveportal.php:1071 #: src/www/services_captiveportal_filemanager.php:219 -#: src/www/services_captiveportal_hostname.php:140 #: src/www/services_captiveportal_ip.php:144 #: src/www/services_captiveportal_mac.php:207 #: src/www/services_captiveportal_vouchers.php:611 @@ -14322,7 +14033,6 @@ msgstr "" #: src/etc/inc/system.inc:1931 #: src/www/diag_backup.php:176 #: src/www/diag_logs_openvpn.php:30 -#: src/www/diag_logs_tabs.php:37 #: src/www/diag_packet_capture.php:97 #: src/www/fbegin.inc:222 #: src/www/fbegin.inc:240 @@ -14378,10 +14088,6 @@ msgstr "" msgid "Orphan mode allows the system clock to be used when no other clocks are available. The number here specifies the stratum reported during orphan mode and should normally be set to a number high enough to insure that any other servers available to clients are preferred over this server. (default: 12)." msgstr "" -#: src/www/pkg_mgr.php:179 -msgid "Other Categories" -msgstr "" - #: src/www/firewall_nat_out_edit.php:703 msgid "Other Subnet (Enter Below)" msgstr "" @@ -14391,7 +14097,6 @@ msgid "Other Subnet:" msgstr "" #: src/www/firewall_virtual_ip_edit.php:361 -#: src/www/pkg_mgr.php:179 msgid "Other" msgstr "" @@ -14429,10 +14134,6 @@ msgstr "" msgid "Output R and W characters to the console for each packet read and write, uppercase is used for TCP/UDP packets and lowercase is used for TUN/TAP packets" msgstr "" -#: src/www/diag_ipsec_tabs.php:28 -msgid "Overview" -msgstr "" - #: src/www/vpn_ipsec.php:246 msgid "P1 Description" msgstr "" @@ -14494,7 +14195,6 @@ msgid "PPP configuration" msgstr "" #: src/www/diag_logs_ppp.php:41 -#: src/www/diag_logs_tabs.php:34 #: src/www/interfaces.php:1340 #: src/www/interfaces_ppps_edit.php:377 #: src/www/status_interfaces.php:161 @@ -14676,54 +14376,15 @@ msgstr "" msgid "Package Functions" msgstr "" -#: src/www/pkg_mgr_install.php:100 -msgid "Package Installer" -msgstr "" - #: src/www/fbegin.inc:242 msgid "Package Logs" msgstr "" #: src/www/diag_backup.php:177 #: src/www/fbegin.inc:332 -#: src/www/pkg_mgr.php:47 -#: src/www/pkg_mgr.php:88 -#: src/www/pkg_mgr_install.php:44 -#: src/www/pkg_mgr_installed.php:41 -#: src/www/pkg_mgr_installed.php:70 msgid "Package Manager" msgstr "" -#: src/www/pkg_mgr_settings.php:109 -#: src/www/pkg_mgr_settings.php:112 -msgid "Package Repository URL" -msgstr "" - -#: src/www/pkg_mgr_settings.php:51 -#: src/www/pkg_mgr_settings.php:91 -msgid "Package Settings" -msgstr "" - -#: src/www/pkg_mgr_install.php:224 -#: src/www/pkg_mgr_install.php:225 -msgid "Package deleted." -msgstr "" - -#: src/www/pkg_mgr.php:235 -#: src/www/pkg_mgr_installed.php:184 -msgid "Package info" -msgstr "" - -#: src/www/pkg_mgr_install.php:235 -#: src/www/pkg_mgr_install.php:236 -msgid "Package reinstallation failed." -msgstr "" - -#: src/www/pkg_mgr_install.php:239 -#: src/www/pkg_mgr_install.php:240 -msgid "Package reinstalled." -msgstr "" - #: src/www/system_advanced_misc.php:580 msgid "Package settings" msgstr "" @@ -15030,10 +14691,6 @@ msgstr "" msgid "Periodic DHCP Leases Backup" msgstr "" -#: src/www/diag_nanobsd.php:215 -msgid "Periodic Data Backup" -msgstr "" - #: src/www/system_advanced_misc.php:518 msgid "Periodic RRD Backup" msgstr "" @@ -15360,7 +15017,6 @@ msgid "Portal Auth events" msgstr "" #: src/www/diag_logs_auth.php:40 -#: src/www/diag_logs_tabs.php:32 msgid "Portal Auth" msgstr "" @@ -16080,10 +15736,6 @@ msgstr "" msgid "RRD dump failed exited with %1$s, the error is: %2$s" msgstr "" -#: src/www/diag_nanobsd.php:218 -msgid "RRD/DHCP Backup" -msgstr "" - #: src/www/status_interfaces.php:373 msgid "RSSI" msgstr "" @@ -16166,14 +15818,6 @@ msgstr "" msgid "Read Community String" msgstr "" -#: src/www/diag_nanobsd.php:172 -msgid "Read-Only" -msgstr "" - -#: src/www/diag_nanobsd.php:168 -msgid "Read/Write" -msgstr "" - #: src/www/status_openvpn.php:162 #: src/www/status_openvpn.php:232 msgid "Real Address" @@ -16303,14 +15947,6 @@ msgstr "" msgid "Regulatory settings" msgstr "" -#: src/www/pkg_mgr_installed.php:213 -msgid "Reinstall ".ucfirst($pkg['name'])." package." -msgstr "" - -#: src/www/pkg_mgr_installed.php:216 -msgid "Reinstall ".ucfirst($pkg['name'])."'s GUI components." -msgstr "" - #: src/www/diag_backup.php:803 msgid "Reinstall packages" msgstr "" @@ -16676,14 +16312,6 @@ msgstr "" msgid "Restart HTTPD" msgstr "" -#: src/www/restart_httpd.php:31 -msgid "Restarting httpd" -msgstr "" - -#: src/www/restart_httpd.php:48 -msgid "Restarting mini_httpd" -msgstr "" - #: src/etc/rc.restore_config_backup:93 msgid "Restore Backup from Configuration History" msgstr "" @@ -16960,7 +16588,6 @@ msgid "S.M.A.R.T. Monitor Tools" msgstr "" #: src/www/diag_ipsec_sad.php:33 -#: src/www/diag_ipsec_tabs.php:30 msgid "SAD" msgstr "" @@ -17019,7 +16646,6 @@ msgid "SNMP" msgstr "" #: src/www/diag_ipsec_spd.php:33 -#: src/www/diag_ipsec_tabs.php:31 msgid "SPD" msgstr "" @@ -17092,7 +16718,6 @@ msgstr "" #: src/www/diag_confbak.php:222 #: src/www/diag_logs_settings.php:445 -#: src/www/diag_nanobsd.php:185 #: src/www/diag_smart.php:233 #: src/www/firewall_aliases_edit.php:749 #: src/www/firewall_aliases_import.php:213 @@ -17125,9 +16750,7 @@ msgstr "" #: src/www/load_balancer_relay_protocol_edit.php:282 #: src/www/load_balancer_setting.php:155 #: src/www/pkg_edit.php:437 -#: src/www/pkg_mgr_settings.php:131 #: src/www/services_captiveportal.php:1065 -#: src/www/services_captiveportal_hostname_edit.php:209 #: src/www/services_captiveportal_ip_edit.php:230 #: src/www/services_captiveportal_mac_edit.php:249 #: src/www/services_captiveportal_vouchers.php:605 @@ -17203,10 +16826,6 @@ msgstr "" msgid "Save" msgstr "" -#: src/www/pkg.php:186 -msgid "Saving changes..." -msgstr "" - #: src/www/widgets/widgets/traffic_graphs.widget.php:137 msgid "Scale follow" msgstr "" @@ -17767,8 +17386,6 @@ msgstr "" #: src/www/load_balancer_virtual_server_edit.php:132 #: src/www/services_captiveportal.php:56 #: src/www/services_captiveportal_filemanager.php:59 -#: src/www/services_captiveportal_hostname.php:49 -#: src/www/services_captiveportal_hostname_edit.php:46 #: src/www/services_captiveportal_ip.php:48 #: src/www/services_captiveportal_ip_edit.php:47 #: src/www/services_captiveportal_mac.php:52 @@ -18025,10 +17642,6 @@ msgstr "" msgid "Setting hard disk standby... " msgstr "" -#: src/www/diag_nanobsd.php:56 -msgid "Setting slice information, please wait..." -msgstr "" - #: src/www/interfaces.php:3226 msgid "Setting this option will enable 802.1x authentication." msgstr "" @@ -18066,7 +17679,6 @@ msgid "Setting up pass/block rules %s" msgstr "" #: src/www/diag_logs_settings.php:171 -#: src/www/diag_logs_tabs.php:39 #: src/www/load_balancer_monitor.php:108 #: src/www/load_balancer_pool.php:119 #: src/www/load_balancer_setting.php:85 @@ -18365,10 +17977,6 @@ msgstr "" msgid "Some network adapters do not support or work well in promiscuous mode." msgstr "" -#: src/www/pkg_mgr_install.php:196 -msgid "Something is wrong on the request." -msgstr "" - #: src/etc/inc/interfaces.inc:2167 msgid "Sorry but we could not find a required assigned ip address on the interface for the virtual IP address %s." msgstr "" @@ -18863,7 +18471,6 @@ msgstr "" #: src/www/diag_logs_wireless.php:42 #: src/www/easyrule.php:77 #: src/www/fbegin.inc:437 -#: src/www/pkg_mgr.php:203 #: src/www/status_captiveportal_expire.php:49 #: src/www/status_captiveportal_test.php:49 #: src/www/status_captiveportal_voucher_rolls.php:48 @@ -19006,7 +18613,6 @@ msgstr "" #: src/www/firewall_rules_edit.php:1240 #: src/www/firewall_rules_edit.php:1716 #: src/www/firewall_virtual_ip_edit.php:474 -#: src/www/halt.php:59 #: src/www/interfaces.php:3322 #: src/www/interfaces_assign.php:556 #: src/www/interfaces_bridge_edit.php:606 @@ -19022,11 +18628,9 @@ msgstr "" #: src/www/load_balancer_relay_protocol_edit.php:282 #: src/www/load_balancer_setting.php:155 #: src/www/load_balancer_virtual_server_edit.php:280 -#: src/www/pkg_mgr_settings.php:131 #: src/www/reboot.php:57 #: src/www/services_captiveportal.php:1065 #: src/www/services_captiveportal_filemanager.php:173 -#: src/www/services_captiveportal_hostname_edit.php:209 #: src/www/services_captiveportal_ip_edit.php:230 #: src/www/services_captiveportal_mac_edit.php:249 #: src/www/services_captiveportal_vouchers.php:605 @@ -19205,14 +18809,6 @@ msgstr "" msgid "Swedish" msgstr "" -#: src/www/diag_nanobsd.php:170 -msgid "Switch to Read-Only" -msgstr "" - -#: src/www/diag_nanobsd.php:174 -msgid "Switch to Read/Write" -msgstr "" - #: src/www/graph.php:109 msgid "Switch to bytes/s" msgstr "" @@ -19245,10 +18841,6 @@ msgstr "" msgid "Syslog" msgstr "" -#: src/www/diag_nanobsd.php:220 -msgid "System > Advanced, Miscellaneous tab" -msgstr "" - #: src/www/fbegin.inc:278 msgid "System Activity" msgstr "" @@ -19321,15 +18913,8 @@ msgid "System will be configured as a DHCP server on the default LAN interface" msgstr "" #: src/www/diag_backup.php:182 -#: src/www/diag_logs_tabs.php:29 #: src/www/fbegin.inc:332 #: src/www/fbegin.inc:392 -#: src/www/pkg_mgr.php:47 -#: src/www/pkg_mgr.php:88 -#: src/www/pkg_mgr_install.php:44 -#: src/www/pkg_mgr_installed.php:41 -#: src/www/pkg_mgr_installed.php:70 -#: src/www/pkg_mgr_settings.php:51 #: src/www/status_rrd_graph_img.php:38 #: src/www/status_rrd_graph_settings.php:40 #: src/www/status_rrd_graph_tabs.php:4 @@ -19381,10 +18966,6 @@ msgstr "" msgid "System: Firmware: Auto Update" msgstr "" -#: src/www/pkg_mgr_settings.php:119 -msgid "System: Packages" -msgstr "" - #: src/www/diag_logs_filter_dynamic.php:144 msgid "TCP Flags" msgstr "" @@ -19909,10 +19490,6 @@ msgstr "" msgid "The bogons database has been updated." msgstr "" -#: src/www/diag_nanobsd.php:65 -msgid "The boot slice has been set to" -msgstr "" - #: src/www/services_captiveportal_mac.php:145 msgid "The captive portal MAC address configuration has been changed.
You must apply the changes in order for them to take effect." msgstr "" @@ -19977,10 +19554,6 @@ msgid "" "You may include" msgstr "" -#: src/www/pkg_mgr_settings.php:101 -msgid "The contents of unofficial packages servers cannot be verified and may contain malicious files." -msgstr "" - #: src/www/interfaces.php:2168 msgid "The current DUID is: '%s'" msgstr "" @@ -20525,15 +20098,10 @@ msgstr "" msgid "The options on this page are intended for use by advanced users only. This page is for managing existing mirrors, not creating new mirrors." msgstr "" -#: src/www/diag_nanobsd.php:125 #: src/www/system_advanced_tabs.php:3 msgid "The options on this page are intended for use by advanced users only." msgstr "" -#: src/www/pkg_mgr_settings.php:102 -msgid "The package server settings should remain at their default values to ensure that verifiable and trusted packages are recevied." -msgstr "" - #: src/www/diag_packet_capture.php:370 msgid "The packet capture file was last updated:" msgstr "" @@ -20674,10 +20242,6 @@ msgstr "" msgid "The settings have been applied. The firewall rules are now reloading in the background.
You can also %s monitor %s the reload progress" msgstr "" -#: src/www/diag_nanobsd.php:81 -msgid "The slice has been duplicated." -msgstr "" - #: src/www/diag_resetstate.php:46 msgid "The source tracking table has been flushed successfully." msgstr "" @@ -20749,10 +20313,6 @@ msgstr "" msgid "The system has been reset to factory defaults and is now rebooting. This may take a few minutes, depending on your hardware." msgstr "" -#: src/www/halt.php:48 -msgid "The system is halting now. This may take one minute." -msgstr "" - #: src/www/interfaces_assign.php:422 msgid "The system is now rebooting. Please wait." msgstr "" @@ -20962,15 +20522,6 @@ msgstr "" msgid "Theme" msgstr "" -#: src/www/pkg_mgr.php:213 -#: src/www/pkg_mgr.php:288 -msgid "There are currently no packages available for installation." -msgstr "" - -#: src/www/pkg_mgr_installed.php:227 -msgid "There are no packages currently installed." -msgstr "" - #: src/www/vpn_ipsec_phase1.php:213 msgid "There is a Phase 2 using IPv4, you cannot use IPv6." msgstr "" @@ -20995,10 +20546,6 @@ msgstr "" msgid "There was an error performing the chosen mirror operation. Check the System Log for details." msgstr "" -#: src/www/diag_nanobsd.php:83 -msgid "There was an error while duplicating the slice. Operation aborted." -msgstr "" - #: src/etc/inc/filter.inc:3587 msgid "There was an error while parsing the package filter rules for %s." msgstr "" @@ -21129,10 +20676,6 @@ msgstr "" msgid "These options enable additional messages from NTP to be written to the System Log" msgstr "" -#: src/www/diag_nanobsd.php:220 -msgid "These options have been relocated to" -msgstr "" - #: src/www/system_advanced_misc.php:440 msgid "" "These settings have moved to VPN > IPsec on the Advanced Settings tab." @@ -21497,10 +21040,6 @@ msgstr "" msgid "This is usually" msgstr "" -#: src/www/pkg_mgr_settings.php:119 -msgid "This is where %s will check for packages when the" -msgstr "" - #: src/www/system_firmware_settings.php:156 msgid "This is where" msgstr "" @@ -21673,10 +21212,6 @@ msgstr "" msgid "This option will suppress ARP log messages when multiple interfaces reside on the same broadcast domain" msgstr "" -#: src/www/pkg_mgr_settings.php:100 -msgid "This page allows an alternate package repository to be configured, primarily for temporary use as a testing mechanism." -msgstr "" - #: src/www/diag_testport.php:92 msgid "This page allows you to perform a simple TCP connection test to determine if a host is up and accepting connections on a given port. This test does not function for UDP since there is no way to reliably determine if a UDP port accepts connections in this manner." msgstr "" @@ -21814,10 +21349,6 @@ msgstr "" msgid "This will disable the autoedge status of interfaces." msgstr "" -#: src/www/diag_nanobsd.php:206 -msgid "This will duplicate the bootup slice to the alternate slice. Use this if you would like to duplicate the known good working boot partition to the alternate." -msgstr "" - #: src/www/system_gateways_edit.php:741 msgid "This will force this gateway to be considered Down" msgstr "" @@ -21834,10 +21365,6 @@ msgstr "" msgid "This will select the above gateway as the default gateway" msgstr "" -#: src/www/diag_nanobsd.php:144 -msgid "This will switch the bootup slice to the alternate slice." -msgstr "" - #: src/www/system_advanced_network.php:238 #: src/www/system_advanced_network.php:249 #: src/www/system_advanced_network.php:260 @@ -21857,7 +21384,6 @@ msgid "Threshold" msgstr "" #: src/www/firewall_schedule_edit.php:861 -#: src/www/javascript/jquery/jquery-ui-1.11.1.min.js:6 msgid "Thu" msgstr "" @@ -21985,8 +21511,6 @@ msgstr "" msgid "To view the differences between an older configuration and a newer configuration, select the older configuration using the left column of radio options and select the newer configuration in the right column, then press the Diff button." msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:170 -#: src/www/services_captiveportal_hostname_edit.php:179 #: src/www/system_gateways_edit.php:775 #: src/www/system_gateways_edit.php:787 msgid "To" @@ -22320,10 +21844,6 @@ msgstr "" msgid "Unable to open /conf/config.xml for writing in write_config()" msgstr "" -#: src/www/pkg_mgr.php:73 -msgid "Unable to retrieve package info from %s. Cached data will be used." -msgstr "" - #: src/etc/rc.restore_config_backup:79 #: src/www/diag_confbak.php:54 msgid "Unable to revert to the selected configuration." @@ -22525,7 +22045,6 @@ msgstr "" msgid "Upload layer7 pattern file" msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:96 #: src/www/services_captiveportal_ip_edit.php:98 #: src/www/services_captiveportal_mac_edit.php:110 msgid "Upload speed needs to be an integer" @@ -22619,10 +22138,6 @@ msgstr "" msgid "Use a different management port on clients. The default port is 166. Specify a different port if the client machines need to select from multiple OpenVPN links." msgstr "" -#: src/www/pkg_mgr_settings.php:114 -msgid "Use a non-official server for packages" -msgstr "" - #: src/www/diag_routes.php:192 msgid "Use a regular expression to filter IP address or hostnames." msgstr "" @@ -22700,11 +22215,6 @@ msgid "" "be set or cleared for this rule to match." msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:178 -#: src/www/services_captiveportal_hostname_edit.php:179 -msgid "Use" -msgstr "" - #: src/www/vpn_pppoe_edit.php:546 msgid "User (s)" msgstr "" @@ -22941,7 +22451,6 @@ msgstr "" msgid "VPN PPTP" msgstr "" -#: src/www/diag_logs_tabs.php:35 #: src/www/diag_logs_vpn.php:30 #: src/www/fbegin.inc:428 #: src/www/vpn_ipsec.php:205 @@ -23024,7 +22533,6 @@ msgid "Verify SSL peer" msgstr "" #: src/www/diag_confbak.php:254 -#: src/www/pkg_mgr_installed.php:119 #: src/www/widgets/widgets/system_information.widget.php:106 msgid "Version" msgstr "" @@ -23047,10 +22555,6 @@ msgstr "" msgid "View current page" msgstr "" -#: src/www/diag_nanobsd.php:231 -msgid "View previous upgrade log" -msgstr "" - #: src/www/firewall_rules_edit.php:867 msgid "View the NAT rule" msgstr "" @@ -23063,10 +22567,6 @@ msgstr "" msgid "View type:" msgstr "" -#: src/www/diag_nanobsd.php:228 -msgid "View upgrade log" -msgstr "" - #: src/www/diag_smart.php:320 #: src/www/diag_smart.php:424 msgid "View" @@ -23186,7 +22686,6 @@ msgstr "" #: src/www/services_captiveportal.php:505 #: src/www/services_captiveportal.php:655 #: src/www/services_captiveportal_filemanager.php:151 -#: src/www/services_captiveportal_hostname.php:90 #: src/www/services_captiveportal_ip.php:91 #: src/www/services_captiveportal_mac.php:157 #: src/www/services_captiveportal_vouchers.php:83 @@ -24663,9 +24162,6 @@ msgstr "" #: src/www/diag_defaults.php:47 #: src/www/diag_defaults.php:59 #: src/www/diag_defaults.php:73 -#: src/www/halt.php:47 -#: src/www/halt.php:59 -#: src/www/pkg.php:424 #: src/www/reboot.php:47 #: src/www/reboot.php:57 #: src/www/system_firmware.php:213 @@ -25064,7 +24560,6 @@ msgid "" msgstr "" #: src/www/firewall_aliases_import.php:188 -#: src/www/services_captiveportal_hostname_edit.php:192 #: src/www/services_captiveportal_ip_edit.php:208 #: src/www/services_captiveportal_mac_edit.php:225 #: src/www/services_captiveportal_zones_edit.php:115 @@ -25518,7 +25013,6 @@ msgstr "" msgid "all" msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:105 #: src/www/services_captiveportal_ip_edit.php:108 msgid "already allowed" msgstr "" @@ -25571,8 +25065,6 @@ msgstr "" #: src/www/firewall_rules_edit.php:1188 #: src/www/firewall_rules_edit.php:1201 #: src/www/interfaces.php:3040 -#: src/www/services_captiveportal_hostname.php:145 -#: src/www/services_captiveportal_hostname.php:152 msgid "any" msgstr "" @@ -26265,10 +25757,6 @@ msgstr "" msgid "found on top of the generated/printed vouchers. WARNING: Changing this number for an existing Roll will mark all vouchers as unused again" msgstr "" -#: src/www/services_captiveportal_hostname.php:153 -msgid "from" -msgstr "" - #: src/www/firewall_nat_edit.php:621 #: src/www/firewall_nat_edit.php:742 #: src/www/firewall_rules_edit.php:1085 @@ -26361,10 +25849,6 @@ msgstr "" msgid "incoming (as seen by firewall)" msgstr "" -#: src/www/pkg_mgr_install.php:205 -msgid "installation completed." -msgstr "" - #: src/www/diag_arp.php:363 msgid "instead of ARP" msgstr "" @@ -26774,19 +26258,10 @@ msgstr "" msgid "outgoing (as seen by firewall)" msgstr "" -#: src/www/pkg_mgr_installed.php:105 -msgid "packages" -msgstr "" - #: src/www/diag_packet_capture.php:255 msgid "packet capture" msgstr "" -#: src/www/pkg_mgr_settings.php:119 -#: src/www/system_firmware_settings.php:156 -msgid "page is viewed." -msgstr "" - #: src/www/firewall_rules_edit.php:1224 #: src/www/services_captiveportal.php:1044 #: src/www/system_advanced_firewall.php:317 @@ -26841,10 +26316,6 @@ msgstr "" msgid "phase2 for %s" msgstr "" -#: src/www/pkg_mgr.php:266 -msgid "platform" -msgstr "" - #: src/www/load_balancer_setting.php:145 msgid "prefork" msgstr "" @@ -27056,10 +26527,6 @@ msgstr "" msgid "setsockopt() failed, error: %s" msgstr "" -#: src/www/pkg_mgr_install.php:280 -msgid "setup instructions" -msgstr "" - #: src/www/services_captiveportal.php:925 msgid "singledash:" msgstr "" @@ -27133,11 +26600,6 @@ msgstr "" msgid "that has been granted secure shell access." msgstr "" -#: src/www/services_captiveportal_hostname.php:146 -#: src/www/services_captiveportal_hostname.php:153 -msgid "the Hostname are allowed" -msgstr "" - #: src/www/diag_defaults.php:59 msgid "the firewall will:" msgstr "" @@ -27167,14 +26629,6 @@ msgstr "" msgid "timeout" msgstr "" -#: src/www/services_captiveportal_hostname_edit.php:179 -msgid "to allow access from all clients (even non-authenticated ones) behind the portal to this Hostname" -msgstr "" - -#: src/www/services_captiveportal_hostname_edit.php:178 -msgid "to always allow an Hostname through the captive portal (without authentication)" -msgstr "" - #: src/www/interfaces.php:2619 msgid "to create a PPP configuration." msgstr "" @@ -27213,7 +26667,6 @@ msgstr "" #: src/www/diag_dump_states_sources.php:177 #: src/www/firewall_nat_edit.php:649 #: src/www/firewall_nat_edit.php:772 -#: src/www/services_captiveportal_hostname.php:146 #: src/www/services_dhcp.php:839 #: src/www/services_dhcpv6.php:596 #: src/www/services_dhcpv6.php:603 @@ -27399,7 +26852,6 @@ msgid "www.example.com" msgstr "" #: src/www/diag_routes.php:172 -#: src/www/pkg_mgr_settings.php:114 #: src/www/services_captiveportal.php:828 #: src/www/services_captiveportal.php:873 #: src/www/services_captiveportal.php:897 @@ -27441,32 +26893,12 @@ msgstr "" msgid "$_POST['Submit']) == \"No\"" msgstr "" -# TODO: unqouted gettext string, -# src/www/pkg_mgr.php:174 -#msgid ($category) -#msgstr "" - -# TODO: unqouted gettext string, -# src/www/pkg.php:437 -#msgid ($column['listmodeoff']). $column['suffix']; -#msgstr "" - -# TODO: unqouted gettext string, -# src/www/pkg.php:434 -#msgid ($column['listmodeon']). $column['suffix']; -#msgstr "" - # TODO: unqouted gettext string, # src/www/status_interfaces.php:76 # src/www/system_advanced_firewall.php:516 #msgid ($ifdesc);?> #msgstr "" -# TODO: unqouted gettext string, -# src/www/pkg_mgr.php:249 -#msgid ($index['category']).''."n"; -#msgstr "" - # TODO: unqouted gettext string, # src/www/services_captiveportal.php:915 # src/www/services_captiveportal.php:917: @@ -27492,11 +26924,6 @@ msgstr "" #msgid ($text) { #msgstr "" -# TODO: unqouted vars gettext string, -# src/www/pkg.php:49 -#msgid ($title_msg) -#msgstr "" - # TODO: unqouted vars gettext string, # src/etc/inc/notices.inc:361: #msgid sprintf("%s (%s) - Notification", $g['product_name'], $hostname) @@ -27527,11 +26954,6 @@ msgstr "" #msgid (sprintf("How often that an ICMP probe will be sent in seconds. Default is %d.", $apinger_default['interval']));?>

#msgstr "" -# TODO: vars cleanup, does this even work: -# src/www/pkg_mgr_install.php:276 -#msgid (sprintf("Installation of %s completed.", $pkgid)); update_status($status_a); -#msgstr "" - # TODO: vars cleanup, does this even work: # src/www/system_gateways_edit.php:778 #msgid (sprintf("Low and high thresholds for latency in milliseconds. Default is %d/%d.", $apinger_default['latencylow'], $apinger_default['latencyhigh']));?> From b6c7aa537b6aa823c144f727f0745e73d27166c0 Mon Sep 17 00:00:00 2001 From: "Isaac (.ike) Levy" Date: Thu, 23 Apr 2015 00:12:04 -0400 Subject: [PATCH 03/51] changed or deleted files, more to come Signed-off-by: Isaac (.ike) Levy --- src/share/locale/en/LC_MESSAGES/OPNsense.pot | 361 ++++--------------- 1 file changed, 62 insertions(+), 299 deletions(-) diff --git a/src/share/locale/en/LC_MESSAGES/OPNsense.pot b/src/share/locale/en/LC_MESSAGES/OPNsense.pot index fd76bea19..179fad120 100644 --- a/src/share/locale/en/LC_MESSAGES/OPNsense.pot +++ b/src/share/locale/en/LC_MESSAGES/OPNsense.pot @@ -138,10 +138,6 @@ msgstr "" msgid "#2" msgstr "" -#: src/www/system_firmware_restorefullbackup.php:77 -msgid "$filename has been deleted." -msgstr "" - #: src/www/status_dhcp_leases.php:381 msgid "$mac - send Wake on LAN packet to this MAC address" msgstr "" @@ -618,7 +614,7 @@ msgstr "" msgid "A IPv4 subnet can not be over 32 bits." msgstr "" -#: src/www/system.php:151 +#: src/www/system_general.php:151 msgid "A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'." msgstr "" @@ -787,7 +783,7 @@ msgstr "" msgid "A valid IP address for 'WINS Server #2' must be specified." msgstr "" -#: src/www/system.php:108 +#: src/www/system_general.php:108 msgid "A valid IP address must be specified for DNS server $dnscounter." msgstr "" @@ -1653,7 +1649,7 @@ msgid "" "If not specified, heuristics based on the interface " msgstr "" -#: src/www/system_advanced_tabs.php:9 +#: src/www/system_advanced_tabs.inc:9 msgid "Admin Access" msgstr "" @@ -1901,7 +1897,7 @@ msgstr "" msgid "Allocate only one IP per client (topology subnet), rather than an isolated subnet per client (topology net30)." msgstr "" -#: src/www/system.php:386 +#: src/www/system_general.php:386 msgid "Allow DNS server list to be overridden by DHCP/PPP on WAN" msgstr "" @@ -2967,10 +2963,6 @@ msgstr "" msgid "An invalid subnet or alias was specified. [%s/%s]" msgstr "" -#: src/www/system_firmware.php:93 -msgid "An upgrade is currently in progress.

The firewall will reboot when the operation is complete." -msgstr "" - #: src/www/system_groupmanager.php:119 msgid "Another entry with the same group name already exists." msgstr "" @@ -3188,9 +3180,8 @@ msgstr "" msgid "Auto PTP ports" msgstr "" -#: src/www/system_firmware_auto.php:47 #: src/www/system_firmware_check.php:98 -#: src/www/system_firmware_tabs.php:33 +#: src/www/system_firmware_tabs.inc:33 msgid "Auto Update" msgstr "" @@ -3210,10 +3201,6 @@ msgstr "" msgid "Auto sync on update" msgstr "" -#: src/www/system_firmware_auto.php:200 -msgid "Auto upgrade aborted." -msgstr "" - #: src/www/interfaces.php:2880 #: src/www/interfaces.php:2927 #: src/www/interfaces.php:2939 @@ -3450,10 +3437,6 @@ msgid "" "increase significantly." msgstr "" -#: src/www/system_firmware_auto.php:103 -msgid "Beginning firmware upgrade" -msgstr "" - #: src/www/firewall_shaper_layer7.php:484 msgid "Behaviour" msgstr "" @@ -3668,7 +3651,7 @@ msgstr "" msgid "By default NTP will listen for all supported NMEA sentences. Here one or more sentences to listen for may be specified." msgstr "" -#: src/www/system.php:401 +#: src/www/system_general.php:401 msgid "" "By default localhost (127.0.0.1) will be used as the first DNS server where the DNS Forwarder or DNS Resolver is enabled and set to listen on Localhost, so system can use the local DNS service to perform lookups. " "Checking this box omits localhost from the list of DNS servers." @@ -4042,7 +4025,7 @@ msgstr "" msgid "Cell Upstream" msgstr "" -#: src/www/status_rrd_graph_tabs.php:23 +#: src/www/status_rrd_graph_tabs.inc:23 msgid "Cellular" msgstr "" @@ -4243,7 +4226,7 @@ msgid "" "These are valid for TCP and UDP protocols only." msgstr "" -#: src/www/system.php:463 +#: src/www/system_general.php:463 msgid "Choose a language for the webConfigurator" msgstr "" @@ -4381,14 +4364,6 @@ msgstr "" msgid "Clear" msgstr "" -#: src/www/system_firmware.php:236 -msgid "Click \"Enable firmware upload\" to begin." -msgstr "" - -#: src/www/system_firmware.php:257 -msgid "Click \"Upgrade firmware\" to start the upgrade process." -msgstr "" - #: src/www/interfaces.php:2613 #: src/www/interfaces.php:2618 #: src/www/interfaces.php:2722 @@ -4908,10 +4883,6 @@ msgstr "" msgid "Could not locate any defined CARP interfaces." msgstr "" -#: src/www/system_firmware_restorefullbackup.php:165 -msgid "Could not locate any previous backups." -msgstr "" - #: src/etc/rc.openvpn:91 msgid "Could not obtain openvpn lock for executing rc.openvpn for more than 10 seconds continuing..." msgstr "" @@ -5169,7 +5140,7 @@ msgstr "" #: src/www/interfaces.php:2676 #: src/www/interfaces_ppps_edit.php:616 -#: src/www/status_rrd_graph_tabs.php:38 +#: src/www/status_rrd_graph_tabs.inc:38 msgid "Custom" msgstr "" @@ -5367,7 +5338,7 @@ msgstr "" msgid "DNS Resolver" msgstr "" -#: src/www/system.php:322 +#: src/www/system_general.php:322 msgid "DNS Server" msgstr "" @@ -5391,7 +5362,7 @@ msgstr "" #: src/www/services_dhcp_edit.php:438 #: src/www/services_dhcpv6.php:618 #: src/www/services_router_advertisements.php:356 -#: src/www/system.php:316 +#: src/www/system_general.php:316 #: src/www/vpn_pppoe_edit.php:466 msgid "DNS servers" msgstr "" @@ -5417,12 +5388,6 @@ msgstr "" msgid "DNSSEC" msgstr "" -#: src/www/system_firmware.php:274 -msgid "" -"DO NOT abort the firmware upgrade once it " -"has started. The firewall will reboot automatically after " -msgstr "" - #: src/www/services_dhcpv6_edit.php:100 #: src/www/services_dhcpv6_edit.php:201 msgid "DUID Identifier" @@ -5451,7 +5416,6 @@ msgid "Data" msgstr "" #: src/www/diag_confbak.php:253 -#: src/www/system_firmware_restorefullbackup.php:128 msgid "Date" msgstr "" @@ -5625,7 +5589,6 @@ msgstr "" #: src/www/diag_tables.php:170 #: src/www/firewall_shaper_layer7.php:571 #: src/www/services_dhcpv6.php:797 -#: src/www/system_firmware_restorefullbackup.php:154 msgid "Delete" msgstr "" @@ -5996,8 +5959,6 @@ msgstr "" #: src/www/diag_traceroute.php:32 #: src/www/fbegin.inc:446 #: src/www/reboot.php:34 -#: src/www/system_firmware_auto.php:47 -#: src/www/system_firmware_restorefullbackup.php:89 msgid "Diagnostics" msgstr "" @@ -6135,10 +6096,6 @@ msgstr "" msgid "Disable concurrent logins" msgstr "" -#: src/www/system_firmware.php:239 -msgid "Disable firmware upload" -msgstr "" - #: src/www/system_advanced_network.php:245 msgid "Disable hardware TCP segmentation offload" msgstr "" @@ -6252,7 +6209,6 @@ msgstr "" #: src/www/system_advanced_firewall.php:461 #: src/www/system_advanced_misc.php:522 #: src/www/system_advanced_misc.php:538 -#: src/www/system_firmware.php:112 #: src/www/vpn_ipsec_phase1.php:883 msgid "Disable" msgstr "" @@ -6438,7 +6394,7 @@ msgstr "" msgid "Do not strip away parts of the username after the @ symbol, e.g. user@host becomes user when unchecked." msgstr "" -#: src/www/system.php:309 +#: src/www/system_general.php:309 msgid "Do not use 'local' as a domain name. It will cause local hosts running mDNS (avahi, bonjour, etc.) to be unable to resolve local hosts not running mDNS." msgstr "" @@ -6446,7 +6402,7 @@ msgstr "" msgid "Do not use state mechanisms to keep track. This is only useful if you're doing advanced queueing in certain situations. Please check the documentation." msgstr "" -#: src/www/system.php:398 +#: src/www/system_general.php:398 msgid "Do not use the DNS Forwarder as a DNS server for the firewall" msgstr "" @@ -6544,10 +6500,6 @@ msgstr "" msgid "Do you really want to delete this alias? All elements that still use it will become invalid (e.g. filter rules)!" msgstr "" -#: src/www/system_firmware_restorefullbackup.php:153 -msgid "Do you really want to delete this backup?" -msgstr "" - #: src/www/interfaces_bridge.php:155 msgid "Do you really want to delete this bridge?" msgstr "" @@ -6691,10 +6643,6 @@ msgstr "" msgid "Do you want to enable the %s server on %s?" msgstr "" -#: src/www/system_firmware.php:205 -msgid "Do you want to install this image anyway (on your own risk)?" -msgstr "" - #: src/etc/rc.initial.setlanip:416 msgid "Do you want to revert to HTTP as the webConfigurator protocol?" msgstr "" @@ -6749,8 +6697,8 @@ msgstr "" #: src/www/services_unbound_host_edit.php:72 #: src/www/services_unbound_host_edit.php:209 #: src/www/services_unbound_host_edit.php:245 -#: src/www/system.php:91 -#: src/www/system.php:305 +#: src/www/system_general.php:91 +#: src/www/system_general.php:305 msgid "Domain" msgstr "" @@ -6840,26 +6788,9 @@ msgstr "" #: src/www/diag_backup.php:239 #: src/www/diag_tables.php:158 #: src/www/diag_tables.php:167 -#: src/www/system_firmware_restorefullbackup.php:157 msgid "Download" msgstr "" -#: src/www/system_firmware_auto.php:200 -msgid "Downloaded SHA256" -msgstr "" - -#: src/www/system_firmware_auto.php:199 -msgid "Downloading complete but sha256 does not match." -msgstr "" - -#: src/www/system_firmware_auto.php:126 -msgid "Downloading current version information" -msgstr "" - -#: src/www/system_firmware_auto.php:155 -msgid "Downloading updates" -msgstr "" - #: src/www/services_igmpproxy_edit.php:189 msgid "Downstream Interface" msgstr "" @@ -7545,11 +7476,6 @@ msgstr "" msgid "Enable falling edge PPS signal processing (default: rising edge)." msgstr "" -#: src/www/system_firmware.php:234 -#: src/www/system_firmware.php:236 -msgid "Enable firmware upload" -msgstr "" - #: src/www/services_ntpd_pps.php:188 msgid "Enable kernel PPS clock discipline (default: disabled)." msgstr "" @@ -7642,7 +7568,6 @@ msgstr "" #: src/www/services_snmp.php:370 #: src/www/services_snmp.php:372 #: src/www/services_unbound.php:215 -#: src/www/system_firmware.php:110 #: src/www/vpn_ipsec_phase1.php:884 msgid "Enable" msgstr "" @@ -7767,7 +7692,7 @@ msgstr "" msgid "Enter 0 to never expire sessions. NOTE: This is a security risk!" msgstr "" -#: src/www/system.php:374 +#: src/www/system_general.php:374 msgid "" "Enter IP addresses to be used by the system for DNS resolution. " "These are also used for the DHCP service, DNS forwarder and for PPTP VPN " @@ -8536,10 +8461,6 @@ msgstr "" msgid "Failed to delete Certificate %s from CRL %s" msgstr "" -#: src/www/system_firmware.php:78 -msgid "Failed to write file to disk" -msgstr "" - #: src/www/status_dhcp_leases.php:295 #: src/www/status_dhcpv6_leases.php:382 msgid "Failover Group" @@ -8579,14 +8500,6 @@ msgstr "" msgid "File to upload:" msgstr "" -#: src/www/system_firmware.php:80 -msgid "File upload stopped by extension" -msgstr "" - -#: src/www/system_firmware_restorefullbackup.php:127 -msgid "Filename" -msgstr "" - #: src/www/status_filter_reload.php:33 msgid "Filter Reload Status" msgstr "" @@ -8645,7 +8558,7 @@ msgstr "" msgid "Firewall (Dynamic View)" msgstr "" -#: src/www/system_advanced_tabs.php:10 +#: src/www/system_advanced_tabs.inc:10 msgid "Firewall / NAT" msgstr "" @@ -8736,18 +8649,7 @@ msgstr "" msgid "Firmware Branch" msgstr "" -#: src/www/system_firmware.php:251 -msgid "Firmware image file ($type):" -msgstr "" - -#: src/www/system_firmware.php:159 -msgid "Firmware image missing or other error, please try again %s." -msgstr "" - #: src/www/fbegin.inc:159 -#: src/www/system_firmware.php:88 -#: src/www/system_firmware.php:166 -#: src/www/system_firmware_auto.php:47 #: src/www/system_firmware_check.php:98 #: src/www/system_firmware_settings.php:64 msgid "Firmware" @@ -9157,7 +9059,7 @@ msgid "General Settings" msgstr "" #: src/www/fbegin.inc:160 -#: src/www/system.php:264 +#: src/www/system_general.php:264 msgid "General Setup" msgstr "" @@ -9778,8 +9680,8 @@ msgstr "" #: src/www/services_rfc2136_edit.php:70 #: src/www/services_rfc2136_edit.php:163 #: src/www/status_dhcp_leases.php:332 -#: src/www/system.php:91 -#: src/www/system.php:294 +#: src/www/system_general.php:91 +#: src/www/system_general.php:294 #: src/www/widgets/widgets/dyn_dns_status.widget.php:76 msgid "Hostname" msgstr "" @@ -10442,7 +10344,7 @@ msgid "" "" msgstr "" -#: src/www/system.php:389 +#: src/www/system_general.php:389 msgid "" "If this option is set, %s will " "use DNS servers assigned by a DHCP/PPP server on WAN " @@ -10689,10 +10591,6 @@ msgstr "" msgid "Ignoring IPsec reload since there are no tunnels on interface %s" msgstr "" -#: src/www/system_firmware.php:136 -msgid "Image upload failed (out of memory?)" -msgstr "" - #: src/www/status_rrd_graph_img.php:38 msgid "Image viewer" msgstr "" @@ -10730,7 +10628,7 @@ msgstr "" msgid "In Use" msgstr "" -#: src/www/system.php:379 +#: src/www/system_general.php:379 msgid "" "In addition, optionally select the gateway for each DNS server. " "When using multiple WAN connections there should be at least one unique DNS server per gateway." @@ -11358,10 +11256,6 @@ msgstr "" msgid "Invert Acct-Input-Octets and Acct-Output-Octets" msgstr "" -#: src/www/system_firmware.php:224 -msgid "Invoke" -msgstr "" - #: src/etc/rc.restore_config_backup:67 msgid "Is this the backup you wish to restore?" msgstr "" @@ -11639,7 +11533,7 @@ msgstr "" msgid "Lagg protocol" msgstr "" -#: src/www/system.php:450 +#: src/www/system_general.php:450 msgid "Language" msgstr "" @@ -12262,15 +12156,10 @@ msgstr "" msgid "Manual Outbound NAT rule generation" msgstr "" -#: src/www/system_firmware.php:88 -#: src/www/system_firmware_tabs.php:32 +#: src/www/system_firmware_tabs.inc:32 msgid "Manual Update" msgstr "" -#: src/www/system_firmware.php:224 -msgid "Manual Upgrade" -msgstr "" - #: src/www/firewall_nat_out.php:300 msgid "Mappings:" msgstr "" @@ -12568,14 +12457,10 @@ msgstr "" msgid "Mirror" msgstr "" -#: src/www/system_advanced_tabs.php:12 +#: src/www/system_advanced_tabs.inc:12 msgid "Miscellaneous" msgstr "" -#: src/www/system_firmware.php:76 -msgid "Missing a temporary folder" -msgstr "" - #: src/etc/inc/easyrule.inc:357 msgid "Missing destination port:" msgstr "" @@ -12941,7 +12826,7 @@ msgstr "" #: src/www/interfaces_groups_edit.php:326 #: src/www/load_balancer_virtual_server_edit.php:211 #: src/www/load_balancer_virtual_server_edit.php:230 -#: src/www/system_advanced_tabs.php:3 +#: src/www/system_advanced_tabs.inc:3 #: src/www/system_firmware_settings.php:158 #: src/www/system_routes_edit.php:408 msgid "NOTE:" @@ -13003,7 +12888,7 @@ msgstr "" msgid "NTP should prefer this clock (default: enabled)." msgstr "" -#: src/www/system.php:438 +#: src/www/system_general.php:438 msgid "NTP time server" msgstr "" @@ -13019,7 +12904,7 @@ msgstr "" msgid "NTP" msgstr "" -#: src/www/system.php:298 +#: src/www/system_general.php:298 msgid "Name of the firewall host, without domain part" msgstr "" @@ -13109,10 +12994,6 @@ msgstr "" msgid "Need private RSA key to print vouchers" msgstr "" -#: src/www/system_firmware_auto.php:200 -msgid "Needed SHA256" -msgstr "" - #: src/www/firewall_nat_out_edit.php:177 msgid "Negating destination address of \"any\" is invalid." msgstr "" @@ -13184,7 +13065,7 @@ msgstr "" msgid "Network-specific wireless configuration" msgstr "" -#: src/www/system_advanced_tabs.php:11 +#: src/www/system_advanced_tabs.inc:11 msgid "Networking" msgstr "" @@ -13313,10 +13194,6 @@ msgstr "" msgid "No entry exists yet!" msgstr "" -#: src/www/system_firmware.php:74 -msgid "No file was uploaded" -msgstr "" - #: src/www/firewall_rules.php:801 msgid "No floating rules are currently defined." msgstr "" @@ -13422,7 +13299,6 @@ msgstr "" #: src/www/crash_reporter.php:118 #: src/www/diag_defaults.php:74 #: src/www/reboot.php:58 -#: src/www/system_firmware.php:214 msgid "No" msgstr "" @@ -13797,7 +13673,7 @@ msgstr "" msgid "Notification Name" msgstr "" -#: src/www/system_advanced_tabs.php:14 +#: src/www/system_advanced_tabs.inc:14 msgid "Notifications" msgstr "" @@ -14461,7 +14337,7 @@ msgid "Packets matching this rule will be mapped to the IP address given here." msgstr "" #: src/www/status_rrd_graph_settings.php:42 -#: src/www/status_rrd_graph_tabs.php:8 +#: src/www/status_rrd_graph_tabs.inc:8 msgid "Packets" msgstr "" @@ -14679,10 +14555,6 @@ msgstr "" msgid "Perform Self-tests" msgstr "" -#: src/www/system_firmware.php:254 -msgid "Perform full backup prior to upgrade" -msgstr "" - #: src/www/status_rrd_graph.php:506 msgid "Period:" msgstr "" @@ -15487,7 +15359,7 @@ msgid "Qlimit must be positive." msgstr "" #: src/www/status_rrd_graph_settings.php:43 -#: src/www/status_rrd_graph_tabs.php:10 +#: src/www/status_rrd_graph_tabs.inc:10 msgid "Quality" msgstr "" @@ -15565,14 +15437,14 @@ msgstr "" msgid "Queue" msgstr "" -#: src/www/status_rrd_graph_tabs.php:15 +#: src/www/status_rrd_graph_tabs.inc:15 msgid "QueueDrops" msgstr "" #: src/www/fbegin.inc:243 #: src/www/status_queues.php:111 #: src/www/status_rrd_graph_settings.php:44 -#: src/www/status_rrd_graph_tabs.php:13 +#: src/www/status_rrd_graph_tabs.inc:13 msgid "Queues" msgstr "" @@ -16320,7 +16192,7 @@ msgstr "" msgid "Restore Backup" msgstr "" -#: src/www/system_firmware_tabs.php:35 +#: src/www/system_firmware_tabs.inc:35 msgid "Restore Full Backup" msgstr "" @@ -16358,18 +16230,10 @@ msgstr "" msgid "Restore from Configuration Backup" msgstr "" -#: src/www/system_firmware_restorefullbackup.php:89 -msgid "Restore full backup" -msgstr "" - #: src/www/diag_backup.php:241 msgid "Restore version" msgstr "" -#: src/www/system_firmware_restorefullbackup.php:175 -msgid "Restore" -msgstr "" - #: src/etc/inc/pfsense-utils.inc:502 #: src/etc/inc/pfsense-utils.inc:526 msgid "Restored %s of config file (maybe from CARP partner)" @@ -16781,7 +16645,7 @@ msgstr "" #: src/www/services_wol_edit.php:164 #: src/www/status_lb_pool.php:221 #: src/www/status_rrd_graph_settings.php:192 -#: src/www/system.php:497 +#: src/www/system_general.php:497 #: src/www/system_advanced_admin.php:581 #: src/www/system_advanced_firewall.php:529 #: src/www/system_advanced_misc.php:594 @@ -17035,7 +16899,7 @@ msgstr "" msgid "Select the interface(s) to enable for captive portal." msgstr "" -#: src/www/system.php:420 +#: src/www/system_general.php:420 msgid "Select the location closest to you" msgstr "" @@ -17684,7 +17548,7 @@ msgstr "" #: src/www/load_balancer_setting.php:85 #: src/www/load_balancer_setting.php:113 #: src/www/load_balancer_virtual_server.php:118 -#: src/www/status_rrd_graph_tabs.php:40 +#: src/www/status_rrd_graph_tabs.inc:40 #: src/www/system_authservers.php:451 #: src/www/system_firmware_settings.php:64 #: src/www/system_groupmanager.php:249 @@ -17944,7 +17808,6 @@ msgstr "" #: src/www/diag_system_pftop.php:131 #: src/www/diag_system_pftop.php:146 #: src/www/services_captiveportal_filemanager.php:190 -#: src/www/system_firmware_restorefullbackup.php:129 msgid "Size" msgstr "" @@ -18661,15 +18524,12 @@ msgstr "" #: src/www/status_lb_pool.php:221 #: src/www/status_rrd_graph.php:537 #: src/www/status_rrd_graph_settings.php:192 -#: src/www/system.php:497 +#: src/www/system_general.php:497 #: src/www/system_advanced_admin.php:581 #: src/www/system_advanced_firewall.php:529 #: src/www/system_advanced_misc.php:594 #: src/www/system_advanced_network.php:273 #: src/www/system_advanced_sysctl.php:223 -#: src/www/system_firmware.php:234 -#: src/www/system_firmware.php:239 -#: src/www/system_firmware.php:256 #: src/www/system_firmware_settings.php:261 #: src/www/system_gateway_groups_edit.php:342 #: src/www/system_gateways_edit.php:862 @@ -18868,7 +18728,7 @@ msgstr "" msgid "System Sounds" msgstr "" -#: src/www/system_advanced_tabs.php:13 +#: src/www/system_advanced_tabs.inc:13 msgid "System Tunables" msgstr "" @@ -18917,10 +18777,10 @@ msgstr "" #: src/www/fbegin.inc:392 #: src/www/status_rrd_graph_img.php:38 #: src/www/status_rrd_graph_settings.php:40 -#: src/www/status_rrd_graph_tabs.php:4 -#: src/www/system.php:62 -#: src/www/system.php:264 -#: src/www/system.php:289 +#: src/www/status_rrd_graph_tabs.inc:4 +#: src/www/system_general.php:62 +#: src/www/system_general.php:264 +#: src/www/system_general.php:289 #: src/www/system_advanced_admin.php:268 #: src/www/system_advanced_firewall.php:219 #: src/www/system_advanced_misc.php:225 @@ -18931,8 +18791,6 @@ msgstr "" #: src/www/system_camanager.php:41 #: src/www/system_certmanager.php:44 #: src/www/system_crlmanager.php:35 -#: src/www/system_firmware.php:88 -#: src/www/system_firmware.php:166 #: src/www/system_firmware_check.php:98 #: src/www/system_firmware_settings.php:64 #: src/www/system_gateway_groups.php:89 @@ -19596,7 +19454,7 @@ msgstr "" msgid "The destination port range overlaps with an existing entry." msgstr "" -#: src/www/system.php:99 +#: src/www/system_general.php:99 msgid "The domain may only contain the characters a-z, 0-9, '-' and '.'." msgstr "" @@ -19722,16 +19580,10 @@ msgid "The field 'WINS Server #2' must contain a valid IP address" msgstr "" #: src/www/diag_backup.php:614 -#: src/www/system_firmware_restorefullbackup.php:116 msgid "The firewall configuration has been changed." msgstr "" -#: src/www/system_firmware_restorefullbackup.php:85 -msgid "The firewall is currently restoring $filename" -msgstr "" - #: src/www/diag_backup.php:614 -#: src/www/system_firmware_restorefullbackup.php:116 msgid "The firewall is now rebooting." msgstr "" @@ -19754,10 +19606,6 @@ msgstr "" msgid "The firewall will reboot after restoring the configuration." msgstr "" -#: src/www/system_firmware.php:156 -msgid "The firmware is now being updated. The firewall will reboot automatically." -msgstr "" - #: src/etc/inc/pfsense-utils.inc:1844 #: src/etc/inc/pfsense-utils.inc:1876 msgid "The following file could not be read {$f2p} from {$temp_filename}" @@ -19874,7 +19722,7 @@ msgstr "" msgid "The hostname cannot end with a hyphen according to RFC952" msgstr "" -#: src/www/system.php:96 +#: src/www/system_general.php:96 msgid "The hostname may only contain the characters a-z, 0-9 and '-'." msgstr "" @@ -19892,11 +19740,6 @@ msgstr "" msgid "The idle timeout value must be an integer." msgstr "" -#: src/www/system_firmware.php:143 -#: src/www/system_firmware_auto.php:187 -msgid "The image file is corrupt." -msgstr "" - #: src/www/firewall_virtual_ip_edit.php:120 msgid "The interface chosen for the VIP has no IPv4 or IPv6 address configured so it cannot be used as a parent for the VIP." msgstr "" @@ -20098,7 +19941,7 @@ msgstr "" msgid "The options on this page are intended for use by advanced users only. This page is for managing existing mirrors, not creating new mirrors." msgstr "" -#: src/www/system_advanced_tabs.php:3 +#: src/www/system_advanced_tabs.inc:3 msgid "The options on this page are intended for use by advanced users only." msgstr "" @@ -20333,7 +20176,7 @@ msgstr "" msgid "The test was not performed because it is supported only for ldap based backends." msgstr "" -#: src/www/system.php:144 +#: src/www/system_general.php:144 msgid "The time update interval must be either 0 (disabled) or between 6 and 1440." msgstr "" @@ -20376,23 +20219,6 @@ msgstr "" msgid "The uploaded file does not appear to contain an encrypted OPNsense configuration." msgstr "" -#:rc/www/system_firmware.php:70 -msgid "" -"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" -msgstr "" - -#: src/www/system_firmware.php:68 -msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini" -msgstr "" - -#: src/www/system_firmware.php:72 -msgid "The uploaded file was only partially uploaded" -msgstr "" - -#: src/www/system_firmware.php:133 -msgid "The uploaded image file is not for this platform." -msgstr "" - #: src/www/services_dyndns_edit.php:119 #: src/www/system_usermanager.php:188 #: src/www/vpn_l2tp_users_edit.php:82 @@ -20518,7 +20344,7 @@ msgstr "" msgid "The zone name can only contain letters, digits, and underscores (_)." msgstr "" -#: src/www/system.php:468 +#: src/www/system_general.php:468 msgid "Theme" msgstr "" @@ -21068,14 +20894,6 @@ msgstr "" msgid "This may be useful if, for some reason, you want ntpd to prefer a different clock" msgstr "" -#: src/www/system_firmware.php:201 -msgid "" -"This means that the image you uploaded " -"is not an official/supported image and may lead to unexpected behavior or security " -"compromises. Only install images that come from sources that you trust, and make sure " -"that the image has not been tampered with." -msgstr "" - #: src/www/load_balancer_monitor_edit.php:84 msgid "This monitor name has already been used. Monitor names must be unique." msgstr "" @@ -21333,7 +21151,7 @@ msgstr "" msgid "This will be used if the field is left blank." msgstr "" -#: src/www/system.php:489 +#: src/www/system_general.php:489 msgid "This will change the look and feel of" msgstr "" @@ -21452,7 +21270,7 @@ msgstr "" msgid "Time to live for when a delegation is considered to be lame. The default is 15 minutes." msgstr "" -#: src/www/system.php:408 +#: src/www/system_general.php:408 msgid "Time zone" msgstr "" @@ -21597,7 +21415,7 @@ msgid "Traffic shaping is not configured." msgstr "" #: src/www/status_rrd_graph_settings.php:41 -#: src/www/status_rrd_graph_tabs.php:6 +#: src/www/status_rrd_graph_tabs.inc:6 msgid "Traffic" msgstr "" @@ -21831,11 +21649,6 @@ msgstr "" msgid "Unable to change mode to %s. You may already have the maximum number of wireless clones supported in this mode." msgstr "" -#: src/www/system_firmware_auto.php:141 -#: src/www/system_firmware_auto.php:150 -msgid "Unable to check for updates." -msgstr "" - #: src/www/firewall_aliases_edit.php:167 msgid "Unable to fetch usable data." msgstr "" @@ -21886,10 +21699,6 @@ msgstr "" msgid "Unknown pass error." msgstr "" -#: src/www/system_firmware.php:82 -msgid "Unknown upload error" -msgstr "" - #: src/etc/rc.restore_config_backup:16 #: src/www/diag_confbak.php:278 #: src/www/widgets/widgets/gateways.widget.php:119 @@ -21941,14 +21750,6 @@ msgstr "" msgid "Update URL" msgstr "" -#: src/www/system_firmware_auto.php:188 -msgid "Update cannot continue" -msgstr "" - -#: src/www/system_firmware_auto.php:181 -msgid "Update cannot continue. You can disable this check on the Updater Settings tab." -msgstr "" - #: src/www/diag_routes.php:198 #: src/www/system_certmanager.php:397 #: src/www/system_certmanager.php:996 @@ -21971,7 +21772,7 @@ msgstr "" msgid "Updated" msgstr "" -#: src/www/system_firmware_tabs.php:34 +#: src/www/system_firmware_tabs.inc:34 msgid "Updater Settings" msgstr "" @@ -21989,19 +21790,10 @@ msgstr "" msgid "Upgrade Now" msgstr "" -#: src/www/system_firmware.php:256 -#: src/www/system_firmware.php:257 -msgid "Upgrade firmware" -msgstr "" - #: src/www/system_firmware_check.php:86 msgid "Upgrade pkg and recheck, there maybe other updates available." msgstr "" -#: src/www/system_firmware.php:114 -msgid "Upgrade" -msgstr "" - #: src/etc/inc/upgrade_config.inc:1212 msgid "Upgraded Dyndns %s" msgstr "" @@ -22142,7 +21934,7 @@ msgstr "" msgid "Use a regular expression to filter IP address or hostnames." msgstr "" -#: src/www/system.php:443 +#: src/www/system_general.php:443 msgid "" "Use a space to separate multiple hosts (only one " "required). Remember to set up at least one DNS server " @@ -22163,7 +21955,7 @@ msgstr "" msgid "Use calculated value." msgstr "" -#: src/www/system.php:324 +#: src/www/system_general.php:324 msgid "Use gateway" msgstr "" @@ -22837,10 +22629,6 @@ msgstr "" msgid "Warning: this will terminate all current l2tp sessions!" msgstr "" -#: src/www/system_firmware.php:271 -msgid "Warning:" -msgstr "" - #: src/etc/inc/priv.defs.inc:432 msgid "WebCfg - AJAX: Get Service Providers" msgstr "" @@ -24019,7 +23807,7 @@ msgstr "" #: src/www/interfaces_wireless.php:66 #: src/www/interfaces_wireless.php:93 #: src/www/interfaces_wireless_edit.php:138 -#: src/www/status_rrd_graph_tabs.php:19 +#: src/www/status_rrd_graph_tabs.inc:19 #: src/www/status_wireless.php:31 msgid "Wireless" msgstr "" @@ -24164,7 +23952,6 @@ msgstr "" #: src/www/diag_defaults.php:73 #: src/www/reboot.php:47 #: src/www/reboot.php:57 -#: src/www/system_firmware.php:213 msgid "Yes" msgstr "" @@ -24180,10 +23967,6 @@ msgstr "" msgid "You are editing an existing entry and modifying the interface is not allowed." msgstr "" -#: src/www/system_firmware_auto.php:167 -msgid "You are on the latest version." -msgstr "" - #: src/www/firewall_shaper_layer7.php:54 msgid "You can add new layer7 protocol patterns by simply uploading the file" msgstr "" @@ -24258,7 +24041,7 @@ msgstr "" msgid "You can not assign a IPv6 gateway group on IPv4 Address Family rule" msgstr "" -#: src/www/system.php:135 +#: src/www/system_general.php:135 msgid "You can not assign a gateway to DNS '%s' server which is on a directly connected network." msgstr "" @@ -24279,11 +24062,11 @@ msgstr "" msgid "You can not assign the IPv6 Gateway to a IPv4 Filter rule" msgstr "" -#: src/www/system.php:117 +#: src/www/system_general.php:117 msgid "You can not specify IPv4 gateway '{$_POST[$dnsgwname]}' for IPv6 DNS server '{$_POST[$dnsname]}'" msgstr "" -#: src/www/system.php:114 +#: src/www/system_general.php:114 msgid "You can not specify IPv6 gateway '{$_POST[$dnsgwname]}' for IPv4 DNS server '{$_POST[$dnsname]}'" msgstr "" @@ -24694,10 +24477,6 @@ msgstr "" msgid "You must provide a valid URL." msgstr "" -#: src/www/system_firmware.php:259 -msgid "You must reboot the system before you can upgrade the firmware." -msgstr "" - #: src/www/vpn_openvpn_server.php:238 msgid "You must select a Backend for Authentication if the server mode requires User Auth." msgstr "" @@ -25429,10 +25208,6 @@ msgstr "" msgid "disabled route to" msgstr "" -#: src/www/system_firmware_restorefullbackup.php:173 -msgid "do not restore config.xml." -msgstr "" - #: src/www/vpn_pptp.php:487 msgid "don't forget to " msgstr "" @@ -25481,10 +25256,6 @@ msgstr "" msgid "done.%s" msgstr "" -#: src/www/system_firmware_auto.php:165 -msgid "download complete." -msgstr "" - #: src/www/firewall_nat_edit.php:782 #: src/www/services_dnsmasq_domainoverride_edit.php:140 #: src/www/services_dnsmasq_domainoverride_edit.php:147 @@ -25496,8 +25267,8 @@ msgstr "" #: src/www/services_unbound_host_edit.php:205 #: src/www/services_unbound_host_edit.php:213 #: src/www/services_unbound_host_edit.php:221 -#: src/www/system.php:300 -#: src/www/system.php:311 +#: src/www/system_general.php:300 +#: src/www/system_general.php:311 msgid "e.g." msgstr "" @@ -26094,7 +25865,7 @@ msgstr "" msgid "move selected rules to end" msgstr "" -#: src/www/system.php:311 +#: src/www/system_general.php:311 msgid "mycorp.com, home, office, private, etc." msgstr "" @@ -27015,14 +26786,6 @@ msgid "" "end of the returned results are removed before comparison.");?> msgstr "" -#: src/www/system_firmware_auto.php:202 -msgid "is now upgrading." -msgstr "" - -#: src/www/system_firmware_auto.php:202 -msgid "The firewall will reboot once the operation is completed." -msgstr "" - # TODO: These lines need clarification in the source: # src/www/interfaces.php:1931 # src/www/interfaces.php:2092 From 766fc2971585f73746066cbbe7173596dda66e7a Mon Sep 17 00:00:00 2001 From: "Isaac (.ike) Levy" Date: Thu, 23 Apr 2015 00:58:22 -0400 Subject: [PATCH 04/51] Playing catch-up: moved/deleted files corrected. Still tracking down lines which have changed, very close to being caught up. Signed-off-by: Isaac (.ike) Levy --- src/share/locale/en/LC_MESSAGES/OPNsense.pot | 29 ++++++++------------ 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/share/locale/en/LC_MESSAGES/OPNsense.pot b/src/share/locale/en/LC_MESSAGES/OPNsense.pot index 179fad120..540cc58a2 100644 --- a/src/share/locale/en/LC_MESSAGES/OPNsense.pot +++ b/src/share/locale/en/LC_MESSAGES/OPNsense.pot @@ -1676,9 +1676,9 @@ msgstr "" msgid "Advanced Resolver Options" msgstr "" -#: src/www/vpn_ipsec_phase1.php:528 -#: src/www/vpn_ipsec_phase2.php:490 -#: src/www/vpn_ipsec_tabs.php:6 +#: src/www/vpn_ipsec_phase1.php:535 +#: src/www/vpn_ipsec_phase2.php:495 +#: src/www/vpn_ipsec_tabs.inc:6 msgid "Advanced Settings" msgstr "" @@ -3773,11 +3773,6 @@ msgstr "" msgid "CARP" msgstr "" -#: src/www/system_manager_tabs.php:5 -#: src/www/system_tabs.php:4 -msgid "CAs" -msgstr "" - #: src/www/vpn_l2tp.php:391 msgid "CHAP" msgstr "" @@ -4085,8 +4080,7 @@ msgstr "" msgid "Certificate Revocation List data" msgstr "" -#: src/www/system_manager_tabs.php:7 -#: src/www/system_tabs.php:6 +#: src/www/system_certificates_tabs.inc:8 msgid "Certificate Revocation" msgstr "" @@ -4116,10 +4110,10 @@ msgstr "" msgid "Certificate" msgstr "" +#: src/www/fbegin.inc:129 #: src/www/system_camanager.php:601 +#: src/www/system_certificates_tabs.inc:6 #: src/www/system_crlmanager.php:549 -#: src/www/system_manager_tabs.php:6 -#: src/www/system_tabs.php:5 msgid "Certificates" msgstr "" @@ -12486,7 +12480,7 @@ msgstr "" #: src/www/vpn_ipsec_phase1.php:526 #: src/www/vpn_ipsec_phase2.php:488 -#: src/www/vpn_ipsec_tabs.php:4 +#: src/www/vpn_ipsec_tabs.inc:4 msgid "Mobile clients" msgstr "" @@ -14952,7 +14946,7 @@ msgstr "" #: src/www/vpn_ipsec_phase1.php:527 #: src/www/vpn_ipsec_phase2.php:489 -#: src/www/vpn_ipsec_tabs.php:5 +#: src/www/vpn_ipsec_tabs.inc:5 msgid "Pre-Shared Keys" msgstr "" @@ -21525,9 +21519,10 @@ msgstr "" msgid "Tunnel to..." msgstr "" -#: src/www/vpn_ipsec_phase1.php:525 -#: src/www/vpn_ipsec_phase2.php:487 -#: src/www/vpn_ipsec_tabs.php:3 +#: src/www/vpn_ipsec_phase1.php:532 +#: src/www/vpn_ipsec_phase2.php:492 +#: src/www/vpn_ipsec_tabs.inc:3 +#: src/www/widgets/widgets/ipsec.widget.php:42 msgid "Tunnels" msgstr "" From d1acd5757ee4d3056da41fc19c75446191cc669e Mon Sep 17 00:00:00 2001 From: "Isaac (.ike) Levy" Date: Thu, 23 Apr 2015 01:02:25 -0400 Subject: [PATCH 05/51] minor .pot header update Signed-off-by: Isaac (.ike) Levy --- src/share/locale/en/LC_MESSAGES/OPNsense.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/locale/en/LC_MESSAGES/OPNsense.pot b/src/share/locale/en/LC_MESSAGES/OPNsense.pot index 540cc58a2..641af7189 100644 --- a/src/share/locale/en/LC_MESSAGES/OPNsense.pot +++ b/src/share/locale/en/LC_MESSAGES/OPNsense.pot @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 15.x releases\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-03-15 18:00-0400\n" -"PO-Revision-Date: 2015-04-17 00:00-0400\n" +"PO-Revision-Date: 2015-04-23 00:00-0400\n" "Last-Translator: Isaac (.ike) Levy \n" "Language-Team: ENGLISH \n" "Language: EN\n" From 41dcdcfb2ffdb5d6abd8329163ff23023ab58941 Mon Sep 17 00:00:00 2001 From: "Isaac (.ike) Levy" Date: Thu, 23 Apr 2015 01:39:39 -0400 Subject: [PATCH 06/51] more removed lines Signed-off-by: Isaac (.ike) Levy --- src/share/locale/en/LC_MESSAGES/OPNsense.pot | 68 -------------------- 1 file changed, 68 deletions(-) diff --git a/src/share/locale/en/LC_MESSAGES/OPNsense.pot b/src/share/locale/en/LC_MESSAGES/OPNsense.pot index 641af7189..ff274d343 100644 --- a/src/share/locale/en/LC_MESSAGES/OPNsense.pot +++ b/src/share/locale/en/LC_MESSAGES/OPNsense.pot @@ -159,11 +159,6 @@ msgstr "" msgid "%1$s is not a valid %2$s alias." msgstr "" -#: src/etc/inc/config.lib.inc:187 -#: src/etc/inc/config.lib.inc:188 -msgid "%1$s is restoring the configuration %2$s" -msgstr "" - #: src/www/firewall_rules_edit.php:396 msgid "%s is not a valid end source port. It must be a port alias or integer between 1 and 65535." msgstr "" @@ -273,10 +268,6 @@ msgstr "" msgid "%s made unknown change" msgstr "" -#: src/etc/inc/config.console.inc:48 -msgid "%s requires *AT LEAST* %s RAM to function correctly.%s" -msgstr "" - #: src/www/vpn_ipsec_phase2.php:544 #: src/www/vpn_ipsec_phase2.php:579 msgid "%s subnet" @@ -4589,10 +4580,6 @@ msgstr "" msgid "Config" msgstr "" -#: src/etc/inc/config.lib.inc:71 -msgid "Config.xml unlocked." -msgstr "" - #: src/www/diag_confbak.php:256 msgid "Configuration Change" msgstr "" @@ -4857,10 +4844,6 @@ msgstr "" msgid "Could not find IPv4 gateway for interface (%s)." msgstr "" -#: src/etc/inc/config.lib.inc:224 -msgid "Could not find a usable configuration file! Exiting...." -msgstr "" - #: src/www/system_usermanager_settings_test.php:47 msgid "Could not find settings for %s%s" msgstr "" @@ -5142,10 +5125,6 @@ msgstr "" msgid "Czech" msgstr "" -#: src/etc/inc/config.console.inc:47 -msgid "DANGER! WARNING! ACHTUNG!" -msgstr "" - #: src/www/vpn_openvpn_server.php:1021 msgid "DH Parameters Length" msgstr "" @@ -6253,10 +6232,6 @@ msgstr "" msgid "Disconnect" msgstr "" -#: src/etc/inc/config.lib.inc:284 -msgid "Disk is dirty. Running fsck -y" -msgstr "" - #: src/www/diag_logs_settings.php:288 msgid "Disk space currently used by log files: " msgstr "" @@ -6911,10 +6886,6 @@ msgstr "" msgid "ERROR! Could not connect to server %s." msgstr "" -#: src/etc/inc/config.inc:65 -msgid "ERROR! Could not convert m0n0wall -> pfsense in config.xml" -msgstr "" - #: src/etc/inc/auth.inc:808 msgid "ERROR! ldap_get_user_ous() backed selected with no LDAP authentication server defined." msgstr "" @@ -11206,10 +11177,6 @@ msgstr "" msgid "Invalid monitor chosen." msgstr "" -#: src/etc/inc/config.lib.inc:74 -msgid "Invalid password entered. Please try again." -msgstr "" - #: src/etc/inc/easyrule.inc:347 msgid "Invalid protocol for pass rule:" msgstr "" @@ -11588,10 +11555,6 @@ msgstr "" msgid "Last config change" msgstr "" -#: src/etc/inc/config.lib.inc:221 -msgid "Last known config found and restored. Please double check your configuration file for accuracy." -msgstr "" - #: src/www/system_gateways_edit.php:770 msgid "Latency thresholds" msgstr "" @@ -13152,21 +13115,6 @@ msgstr "" msgid "No callback function for getURL" msgstr "" -#: src/etc/inc/config.lib.inc:99 -#: src/etc/inc/config.lib.inc:100 -#: src/etc/inc/config.lib.inc:211 -#: src/etc/inc/config.lib.inc:232 -#: src/etc/inc/config.lib.inc:233 -msgid "No config.xml found, attempting last known config restore." -msgstr "" - -#: src/etc/inc/config.lib.inc:103 -#: src/etc/inc/config.lib.inc:128 -#: src/etc/inc/config.lib.inc:138 -#: src/etc/inc/config.lib.inc:236 -msgid "No config.xml found, attempting to restore factory config." -msgstr "" - #: src/www/diag_testport.php:94 msgid "No data is transmitted to the remote host during this test, it will only attempt to open a connection and optionally display the data sent back from the server." msgstr "" @@ -13815,10 +13763,6 @@ msgstr "" msgid "Online" msgstr "" -#: src/etc/inc/config.console.inc:49 -msgid "Only (%s) MB RAM has been detected, with (%s) available to %s.%s" -msgstr "" - #: src/www/interfaces_qinq_edit.php:314 msgid "Only QinQ capable interfaces will be shown." msgstr "" @@ -15010,10 +14954,6 @@ msgstr "" msgid "Press to continue." msgstr "" -#: src/etc/inc/config.console.inc:50 -msgid "Press ENTER to continue." -msgstr "" - #: src/www/vpn_openvpn_csc.php:501 msgid "Prevent this client from receiving any server-defined client settings" msgstr "" @@ -21805,10 +21745,6 @@ msgstr "" msgid "Upgrading m0n0wall configuration to OPNsense." msgstr "" -#: src/etc/inc/config.inc:62 -msgid "Upgrading m0n0wall configuration to pfSense... " -msgstr "" - #: src/www/diag_patterns.php:32 #: src/www/diag_patterns.php:87 msgid "Upload Pattern file" @@ -23858,10 +23794,6 @@ msgstr "" msgid "Wrong parameters used during interface_bring_down" msgstr "" -#: src/etc/inc/config.lib.inc:215 -msgid "XML configuration file not found. %s cannot continue booting." -msgstr "" - #: src/etc/inc/xmlparse.inc:93 #: src/etc/inc/xmlparse_attr.inc:73 msgid "XML error: %1$s at line %2$d cannot occur more than once" From 54a2bcdb1bf630390b434f1509c5d1a7eda12e5b Mon Sep 17 00:00:00 2001 From: "Isaac (.ike) Levy" Date: Thu, 23 Apr 2015 01:49:04 -0400 Subject: [PATCH 07/51] new lines Signed-off-by: Isaac (.ike) Levy --- src/share/locale/en/LC_MESSAGES/OPNsense.pot | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/share/locale/en/LC_MESSAGES/OPNsense.pot b/src/share/locale/en/LC_MESSAGES/OPNsense.pot index ff274d343..c77643704 100644 --- a/src/share/locale/en/LC_MESSAGES/OPNsense.pot +++ b/src/share/locale/en/LC_MESSAGES/OPNsense.pot @@ -8457,10 +8457,6 @@ msgstr "" msgid "File Manager" msgstr "" -#: src/etc/inc/config.lib.inc:295 -msgid "File system is dirty. Launching FSCK for /" -msgstr "" - #: src/www/diag_patterns.php:79 msgid "File to upload:" msgstr "" @@ -22421,7 +22417,7 @@ msgstr "" msgid "WAN interface will be set to obtain an address automatically from a DHCP server" msgstr "" -#: src/etc/inc/config.lib.inc:485 +#: src/etc/inc/config.lib.inc:180 msgid "WARNING: Config contents could not be save. Could not open file!" msgstr "" @@ -26730,3 +26726,16 @@ msgstr "" # src/www/interfaces.php:2288 # src/www/interfaces.php:2317 # src/www/interfaces.php:2288 + +#: src/etc/inc/config.lib.inc:157 +msgid "WARNING: User" +msgstr "" + +#: src/etc/inc/config.lib.inc:157 +msgid "may not write config (user-config-readonly set)" +msgstr "" + +#: src/etc/inc/config.lib.inc:169 +msgid "WARNING: Corrupt config!" +msgstr "" + From a73e3e37cdb2d00a7251f58301ce9140af62865a Mon Sep 17 00:00:00 2001 From: "Isaac (.ike) Levy" Date: Thu, 23 Apr 2015 01:51:25 -0400 Subject: [PATCH 08/51] minor typo Signed-off-by: Isaac (.ike) Levy --- src/etc/inc/config.lib.inc | 2 +- src/share/locale/en/LC_MESSAGES/OPNsense.pot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index a2b2481da..57b8e9bf0 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -177,7 +177,7 @@ function write_config($desc = 'Unknown', $backup = true) $cnf->save($revision_info, $backup); } catch (OPNsense\Core\ConfigException $e) { // write failure - log_error(gettext("WARNING: Config contents could not be save. Could not open file!")); + log_error(gettext("WARNING: Config contents could not be saved. Could not open file!")); file_notice('config.xml', sprintf("%s\n", gettext('Unable to open /conf/config.xml for writing in write_config()'))); return -1; } diff --git a/src/share/locale/en/LC_MESSAGES/OPNsense.pot b/src/share/locale/en/LC_MESSAGES/OPNsense.pot index c77643704..395b9033c 100644 --- a/src/share/locale/en/LC_MESSAGES/OPNsense.pot +++ b/src/share/locale/en/LC_MESSAGES/OPNsense.pot @@ -22418,7 +22418,7 @@ msgid "WAN interface will be set to obtain an address automatically from a DHCP msgstr "" #: src/etc/inc/config.lib.inc:180 -msgid "WARNING: Config contents could not be save. Could not open file!" +msgid "WARNING: Config contents could not be saved. Could not open file!" msgstr "" #: src/etc/inc/util.inc:86 From 38b1ba20d89430813efa3fda5170adab05f6e106 Mon Sep 17 00:00:00 2001 From: "Isaac (.ike) Levy" Date: Thu, 23 Apr 2015 01:59:48 -0400 Subject: [PATCH 09/51] more changed lines Signed-off-by: Isaac (.ike) Levy --- src/share/locale/en/LC_MESSAGES/OPNsense.pot | 37 -------------------- 1 file changed, 37 deletions(-) diff --git a/src/share/locale/en/LC_MESSAGES/OPNsense.pot b/src/share/locale/en/LC_MESSAGES/OPNsense.pot index 395b9033c..2844d9bee 100644 --- a/src/share/locale/en/LC_MESSAGES/OPNsense.pot +++ b/src/share/locale/en/LC_MESSAGES/OPNsense.pot @@ -151,10 +151,6 @@ msgstr "" msgid "%1$s (%2$s/%3$s) active and good for %4$d Minutes" msgstr "" -#: src/etc/inc/config.lib.inc:666 -msgid "%1$s at line %2$d" -msgstr "" - #: src/www/firewall_aliases_edit.php:281 msgid "%1$s is not a valid %2$s alias." msgstr "" @@ -4169,10 +4165,6 @@ msgstr "" msgid "Checking ..." msgstr "" -#: src/etc/inc/filter.inc:3576 -msgid "Checking for %1$s PF hooks in package %2$s" -msgstr "" - #: src/www/system_advanced_network.php:246 msgid "Checking this option will disable hardware TCP segmentation offloading (TSO, TSO4, TSO6). This offloading is broken in some hardware drivers, and may impact performance with some specific NICs." msgstr "" @@ -10758,14 +10750,6 @@ msgstr "" msgid "Installed cron job for %s" msgstr "" -#: src/etc/inc/config.lib.inc:612 -msgid "Installing configuration ...." -msgstr "" - -#: src/etc/inc/config.lib.inc:610 -msgid "Installing configuration..." -msgstr "" - #: src/www/diag_dump_states.php:162 msgid "Int" msgstr "" @@ -14702,10 +14686,6 @@ msgstr "" msgid "Plr must be a value between 0 and 1." msgstr "" -#: src/etc/inc/filter.inc:387 -msgid "Plugins completed." -msgstr "" - #: src/www/firewall_rules_edit.php:1308 msgid "Policy filtering" msgstr "" @@ -15016,10 +14996,6 @@ msgstr "" msgid "Processing down interface states" msgstr "" -#: src/etc/inc/filter.inc:3582 -msgid "Processing early %1$s rules for package %2$s" -msgstr "" - #: src/www/crash_reporter.php:95 msgid "Processing..." msgstr "" @@ -16361,10 +16337,6 @@ msgstr "" msgid "Run ''net stop dnscache'', ''net start dnscache'', ''ipconfig /flushdns'' and ''ipconfig /registerdns'' on connection initiation. This is known to kick Windows into recognizing pushed DNS servers." msgstr "" -#: src/etc/inc/filter.inc:385 -msgid "Running plugins (pf)" -msgstr "" - #: src/etc/inc/filter.inc:381 msgid "Running plugins" msgstr "" @@ -19257,11 +19229,6 @@ msgstr "" msgid "The average packet loss probes qty needs to be positive." msgstr "" -#: src/etc/inc/config.lib.inc:713 -#: src/etc/inc/config.lib.inc:715 -msgid "The backup cache file %s is corrupted. Unlinking." -msgstr "" - #: src/www/vpn_openvpn_client.php:231 msgid "The bandwidth limit must be a positive numeric value." msgstr "" @@ -23813,10 +23780,6 @@ msgstr "" msgid "XML error: no %s object found!" msgstr "" -#: src/etc/inc/config.lib.inc:660 -msgid "XML error: unable to open file" -msgstr "" - #: src/etc/inc/pfsense-utils.inc:640 msgid "XMLRPC communication error: %s" msgstr "" From 6b3bff0f6d51f5d12fa5e9c665dfbb4ff811614b Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 23 Apr 2015 21:54:48 +0200 Subject: [PATCH 10/51] src: start to prune varrun_path foo Style and sanity splatter all over while at it. --- src/etc/inc/auth.inc | 63 ++++++++++++++++++----------------- src/etc/inc/captiveportal.inc | 25 ++++++++------ 2 files changed, 47 insertions(+), 41 deletions(-) diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index ff8dd33c8..e6e22ba47 100644 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -203,7 +203,7 @@ function index_groups() $groupindex = array(); - if (is_array($config['system']['group'])) { + if (isset($config['system']['group'])) { $i = 0; foreach($config['system']['group'] as $groupent) { $groupindex[$groupent['name']] = $i; @@ -261,7 +261,7 @@ function &getGroupEntryByGID($gid) { global $config; - if (is_array($config['system']['group'])) { + if (isset($config['system']['group'])) { foreach ($config['system']['group'] as & $group) { if ($group['gid'] == $gid) { return $group; @@ -518,7 +518,8 @@ function local_user_get_groups($user, $all = false) global $config; $groups = array(); - if (!is_array($config['system']['group'])) { + + if (!isset($config['system']['group'])) { return $groups; } @@ -540,8 +541,9 @@ function local_user_set_groups($user, $new_groups = null) { global $config, $groupindex; - if (!is_array($config['system']['group'])) + if (!isset($config['system']['group'])) { return; + } $cur_groups = local_user_get_groups($user, true); $mod_groups = array(); @@ -680,33 +682,31 @@ function ldap_test_connection($authcfg) function ldap_setup_caenv($authcfg) { - global $g; - require_once("certs.inc"); unset($caref); + if (empty($authcfg['ldap_caref']) || !strstr($authcfg['ldap_urltype'], "SSL")) { putenv('LDAPTLS_REQCERT=never'); return; - } else { - $caref = lookup_ca($authcfg['ldap_caref']); - if (!$caref) { - log_error(sprintf(gettext("LDAP: Could not lookup CA by reference for host %s."), $authcfg['ldap_caref'])); - /* XXX: Prevent for credential leaking since we cannot setup the CA env. Better way? */ - putenv('LDAPTLS_REQCERT=hard'); - return; - } - if (!is_dir("{$g['varrun_path']}/certs")) - @mkdir("{$g['varrun_path']}/certs"); - if (file_exists("{$g['varrun_path']}/certs/{$caref['refid']}.ca")) - @unlink("{$g['varrun_path']}/certs/{$caref['refid']}.ca"); - file_put_contents("{$g['varrun_path']}/certs/{$caref['refid']}.ca", base64_decode($caref['crt'])); - @chmod("{$g['varrun_path']}/certs/{$caref['refid']}.ca", 0600); - putenv('LDAPTLS_REQCERT=hard'); - /* XXX: Probably even the hashed link should be created for this? */ - putenv("LDAPTLS_CACERTDIR={$g['varrun_path']}/certs"); - putenv("LDAPTLS_CACERT={$g['varrun_path']}/certs/{$caref['refid']}.ca"); } + + $caref = lookup_ca($authcfg['ldap_caref']); + if (!$caref) { + log_error(sprintf(gettext("LDAP: Could not lookup CA by reference for host %s."), $authcfg['ldap_caref'])); + /* XXX: Prevent for credential leaking since we cannot setup the CA env. Better way? */ + putenv('LDAPTLS_REQCERT=hard'); + return; + } + + @mkdir("/var/run/certs"); + @unlink("/var/run/certs/{$caref['refid']}.ca"); + file_put_contents("/var/run/certs/{$caref['refid']}.ca", base64_decode($caref['crt'])); + @chmod("/var/run/certs/{$caref['refid']}.ca", 0600); + putenv('LDAPTLS_REQCERT=hard'); + /* XXX: Probably even the hashed link should be created for this? */ + putenv("LDAPTLS_CACERTDIR=/var/run/certs"); + putenv("LDAPTLS_CACERT=/var/run/certs/{$caref['refid']}.ca"); } function ldap_test_bind($authcfg) @@ -1261,12 +1261,14 @@ function auth_get_authserver_list() { return $list; } -function getUserGroups($username, $authcfg) { +function getUserGroups($username, $authcfg) +{ global $config; $allowed_groups = array(); + $member_groups = array(); - switch($authcfg['type']) { + switch ($authcfg['type']) { case 'ldap': $allowed_groups = @ldap_get_groups($username, $authcfg); break; @@ -1278,11 +1280,12 @@ function getUserGroups($username, $authcfg) { break; } - $member_groups = array(); - if (is_array($config['system']['group'])) { - foreach ($config['system']['group'] as $group) - if (in_array($group['name'], $allowed_groups)) + if (isset($config['system']['group'])) { + foreach ($config['system']['group'] as $group) { + if (in_array($group['name'], $allowed_groups)) { $member_groups[] = $group['name']; + } + } } return $member_groups; diff --git a/src/etc/inc/captiveportal.inc b/src/etc/inc/captiveportal.inc index f006395fa..b82127635 100644 --- a/src/etc/inc/captiveportal.inc +++ b/src/etc/inc/captiveportal.inc @@ -405,7 +405,7 @@ function captiveportal_configure_zone($cpcfg) { } else captiveportal_syslog("Reconfiguring captive portal({$cpcfg['zone']})."); /* kill any running minicron */ - killbypid("{$g['varrun_path']}/cp_prunedb_{$cpzone}.pid"); + killbypid("/var/run/cp_prunedb_{$cpzone}.pid"); /* initialize minicron interval value */ $croninterval = $cpcfg['croninterval'] ? $cpcfg['croninterval'] : 60; @@ -521,19 +521,23 @@ EOD; captiveportal_write_elements(); /* kill any running mini_httpd */ - killbypid("{$g['varrun_path']}/lighty-{$cpzone}-CaptivePortal.pid"); - killbypid("{$g['varrun_path']}/lighty-{$cpzone}-CaptivePortal-SSL.pid"); + killbypid("/var/run/lighty-{$cpzone}-CaptivePortal.pid"); + killbypid("/var/run/lighty-{$cpzone}-CaptivePortal-SSL.pid"); /* start up the webserving daemon */ captiveportal_init_webgui_zone($cpcfg); /* Kill any existing prunecaptiveportal processes */ - if (file_exists("{$g['varrun_path']}/cp_prunedb_{$cpzone}.pid")) - killbypid("{$g['varrun_path']}/cp_prunedb_{$cpzone}.pid"); + killbypid("/var/run/cp_prunedb_{$cpzone}.pid"); /* start pruning process (interval defaults to 60 seconds) */ - mwexec("/usr/local/bin/minicron $croninterval {$g['varrun_path']}/cp_prunedb_{$cpzone}.pid " . - "/usr/local/etc/rc.prunecaptiveportal {$cpzone}"); + mwexecf( + '/usr/local/bin/minicron %s %s %s %s', + $croninterval, + "/var/run/cp_prunedb_{$cpzone}.pid", + '/usr/local/etc/rc.prunecaptiveportal', + $cpzone + ); /* generate radius server database */ unlink_if_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db"); @@ -546,9 +550,9 @@ EOD; } } else { - killbypid("{$g['varrun_path']}/lighty-{$cpzone}-CaptivePortal.pid"); - killbypid("{$g['varrun_path']}/lighty-{$cpzone}-CaptivePortal-SSL.pid"); - killbypid("{$g['varrun_path']}/cp_prunedb_{$cpzone}.pid"); + killbypid("/var/run/lighty-{$cpzone}-CaptivePortal.pid"); + killbypid("/var/run/lighty-{$cpzone}-CaptivePortal-SSL.pid"); + killbypid("/var/run/cp_prunedb_{$cpzone}.pid"); @unlink("{$g['varetc_path']}/captiveportal_{$cpzone}.html"); @unlink("{$g['varetc_path']}/captiveportal-{$cpzone}-error.html"); @unlink("{$g['varetc_path']}/captiveportal-{$cpzone}-logout.html"); @@ -567,7 +571,6 @@ EOD; /* Release allocated pipes for this zone */ captiveportal_free_dnrules(); - if (empty($config['captiveportal'])) set_single_sysctl("net.link.ether.ipfw", "0"); else { From 1ae3cd2d26c36d0cc1293f48a4aa0ddf73b521d4 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 07:22:43 +0200 Subject: [PATCH 11/51] src: more path pruning --- src/etc/inc/filter.inc | 34 +++++++++++++-------------- src/etc/inc/gwlb.inc | 43 ++++++++++++++++++---------------- src/www/diag_logs_settings.php | 2 +- src/www/system_general.php | 4 ++-- 4 files changed, 43 insertions(+), 40 deletions(-) diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index a3fe8c3d6..9beeb471f 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -100,14 +100,13 @@ function flowtable_configure() { } } -function filter_pflog_start($kill_first = false) +function filter_pflog_start() { - global $config, $g; - - if (!file_exists("{$g['varrun_path']}/filterlog.pid") || - !isvalidpid("{$g['varrun_path']}/filterlog.pid")) { - mwexec("/usr/local/sbin/filterlog -i pflog0 -p {$g['varrun_path']}/filterlog.pid"); + if (isvalidpid('/var/run/filterlog.pid')) { + return; } + + mwexec('/usr/local/sbin/filterlog -i pflog0 -p /var/run/filterlog.pid'); } /* reload filter async */ @@ -321,31 +320,32 @@ function filter_configure_sync($delete_states_if_needed = true) } # If we are not using bogonsv6 then we can remove any bogonsv6 table from the running pf (if the table is not there, the kill is still fine). - if (!is_bogonsv6_used()) - $_grbg = exec("/sbin/pfctl -t bogonsv6 -T kill 2>/dev/null"); + if (!is_bogonsv6_used()) { + $_grbg = exec('/sbin/pfctl -t bogonsv6 -T kill 2>/dev/null'); + } update_filter_reload_status(gettext("Starting up layer7 daemon")); layer7_start_l7daemon(); - if(!empty($filterdns)) { - @file_put_contents("{$g['varetc_path']}/filterdns.conf", implode("", $filterdns)); + if (!empty($filterdns)) { + @file_put_contents('/var/etc/filterdns.conf', implode('', $filterdns)); unset($filterdns); - if (isvalidpid("{$g['varrun_path']}/filterdns.pid")) { - killbypid("{$g['varrun_path']}/filterdns.pid", 'HUP'); + if (isvalidpid('/var/run/filterdns.pid')) { + killbypid('/var/run/filterdns.pid', 'HUP'); } else { /* * FilterDNS has three debugging levels. The default choosen is 1. * Availabe are level 2 and greater then 2. */ - if (isset($config['system']['aliasesresolveinterval']) && is_numeric($config['system']['aliasesresolveinterval'])) + if (isset($config['system']['aliasesresolveinterval']) && is_numeric($config['system']['aliasesresolveinterval'])) { $resolve_interval = $config['system']['aliasesresolveinterval']; - else + } else { $resolve_interval = 300; - mwexec("/usr/local/sbin/filterdns -p {$g['varrun_path']}/filterdns.pid -i {$resolve_interval} -c {$g['varetc_path']}/filterdns.conf -d 1"); + } + mwexec("/usr/local/sbin/filterdns -p /var/run/filterdns.pid -i {$resolve_interval} -c /var/etc/filterdns.conf -d 1"); } } else { - killbypid("{$g['varrun_path']}/filterdns.pid"); - @unlink("{$g['varrun_path']}/filterdns.pid"); + killbypid('/var/run/filterdns.pid'); } /* run items scheduled for after filter configure run */ diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc index a347d18da..071e79f47 100644 --- a/src/etc/inc/gwlb.inc +++ b/src/etc/inc/gwlb.inc @@ -48,20 +48,22 @@ function return_apinger_defaults() { * Creates monitoring configuration file and * adds appropriate static routes. */ -function setup_gateways_monitor() { +function setup_gateways_monitor() +{ global $config, $g; $gateways_arr = return_gateways_array(); if (!is_array($gateways_arr)) { log_error("No gateways to monitor. Apinger will not be run."); - killbypid("{$g['varrun_path']}/apinger.pid"); - @unlink("{$g['varrun_path']}/apinger.status"); + killbypid('/var/run/apinger.pid'); + @unlink('/var/run/apinger.status'); return; } $apinger_debug = ""; - if (isset($config['system']['apinger_debug'])) + if (isset($config['system']['apinger_debug'])) { $apinger_debug = "debug on"; + } $apinger_default = return_apinger_defaults(); $apingerconfig = << $_POST['timezone']) { - filter_pflog_start(true); +if ($pconfig['timezone'] <> $_POST['timezone']) { + filter_pflog_start(); } $timezonelist = array_map( From 537ba265ea45c79daadf2a71b477f1ed220c7f39 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 07:43:02 +0200 Subject: [PATCH 12/51] src: prune for style and path --- src/etc/inc/pfsense-utils.inc | 130 +++++++++++++++++++++------------- 1 file changed, 82 insertions(+), 48 deletions(-) diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 74e4877c2..dbe6dda39 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -110,27 +110,28 @@ function get_dns_servers() { * NOTES * This function only supports the fxp driver's loadable microcode. ******/ -function enable_hardware_offloading($interface) { - global $g, $config; +function enable_hardware_offloading($interface) +{ + global $config; - if(isset($config['system']['do_not_use_nic_microcode'])) + if (isset($config['system']['do_not_use_nic_microcode'])) { return; + } /* translate wan, lan, opt -> real interface if needed */ $int = get_real_interface($interface); - if(empty($int)) + if (empty($int)) { return; - $int_family = preg_split("/[0-9]+/", $int); + } + $int_family = preg_split('/[0-9]+/', $int); $supported_ints = array('fxp'); if (in_array($int_family, $supported_ints)) { - if(does_interface_exist($int)) + if (does_interface_exist($int)) { pfSense_interface_flags($int, IFF_LINK0); + } } - - return; } - /****f* legacy/is_schedule_inuse * NAME * checks to see if a schedule is currently in use by a rule @@ -141,16 +142,23 @@ function enable_hardware_offloading($interface) { * NOTES * ******/ -function is_schedule_inuse($schedule) { - global $g, $config; +function is_schedule_inuse($schedule) +{ + global $config; + + if ($schedule == '') { + return false; + } - if($schedule == "") return false; /* loop through firewall rules looking for schedule in use */ - if(is_array($config['filter']['rule'])) - foreach($config['filter']['rule'] as $rule) { - if($rule['sched'] == $schedule) + if (isset($config['filter']['rule'])) { + foreach ($config['filter']['rule'] as $rule) { + if ($rule['sched'] == $schedule) { return true; + } } + } + return false; } @@ -164,20 +172,27 @@ function is_schedule_inuse($schedule) { * NOTES * ******/ -function setup_polling() { - global $g, $config; +function setup_polling() +{ + global $config; - if (isset($config['system']['polling'])) + if (isset($config['system']['polling'])) { set_single_sysctl("kern.polling.idle_poll", "1"); - else + } else { set_single_sysctl("kern.polling.idle_poll", "0"); + } - if($config['system']['polling_each_burst']) + if ($config['system']['polling_each_burst']) { set_single_sysctl("kern.polling.each_burst", $config['system']['polling_each_burst']); - if($config['system']['polling_burst_max']) + } + + if ($config['system']['polling_burst_max']) { set_single_sysctl("kern.polling.burst_max", $config['system']['polling_burst_max']); - if($config['system']['polling_user_frac']) + } + + if ($config['system']['polling_user_frac']) { set_single_sysctl("kern.polling.user_frac", $config['system']['polling_user_frac']); + } } function set_language($lang) @@ -296,8 +311,10 @@ function add_text_to_file($file, $text, $replace = false) { /* * after_sync_bump_adv_skew(): create skew values by 1S */ -function after_sync_bump_adv_skew() { - global $config, $g; +function after_sync_bump_adv_skew() +{ + global $config; + $processed_skew = 1; $a_vip = &$config['virtualip']['vip']; foreach ($a_vip as $vipent) { @@ -306,8 +323,10 @@ function after_sync_bump_adv_skew() { $vipent['advskew'] = $vipent['advskew']+1; } } - if($processed_skew == 1) + + if ($processed_skew == 1) { write_config(gettext("After synch increase advertising skew")); + } } /* @@ -513,8 +532,9 @@ function rmdir_recursive($path,$follow_links=false) { /* * check_firmware_version(): Check whether the current firmware installed is the most recently released. */ -function check_firmware_version($tocheck = "all", $return_php = true) { - global $g, $config; +function check_firmware_version($tocheck = "all", $return_php = true) +{ + global $config; $xmlrpcfqdn = preg_replace('(https?://)', '', '/xmlrpc.php'); $ip = gethostbyname($xmlrpcfqdn); @@ -547,8 +567,9 @@ function check_firmware_version($tocheck = "all", $return_php = true) { /* * host_firmware_version(): Return the versions used in this install */ -function host_firmware_version($tocheck = "") { - global $g, $config; +function host_firmware_version($tocheck = "") +{ + global $config; $os_version = trim(substr(php_uname("r"), 0, strpos(php_uname("r"), '-'))); @@ -585,8 +606,9 @@ function strncpy(&$dst, $src, $length) { * RESULT * none ******/ -function reload_interfaces_sync() { - global $config, $g; +function reload_interfaces_sync() +{ + global $config; /* parse config.xml again */ $config = parse_config(); @@ -631,7 +653,7 @@ function reload_interfaces() { * none ******/ function reload_all_sync() { - global $config, $g; + global $config; /* parse config.xml again */ $config = parse_config(); @@ -676,7 +698,7 @@ function reload_all_sync() { function setup_serial_port($when = 'save', $path = '') { - global $g, $config; + global $config; $prefix = ""; if (($when == "upgrade") && (!empty($path)) && is_dir($path.'/boot/')) $prefix = "/tmp/{$path}"; @@ -926,8 +948,9 @@ function get_ppp_uptime($port){ } //returns interface information -function get_interface_info($ifdescr) { - global $config, $g; +function get_interface_info($ifdescr) +{ + global $config; $ifinfo = array(); if (empty($config['interfaces'][$ifdescr])) @@ -1079,7 +1102,7 @@ function get_interface_info($ifdescr) { break; } - if (file_exists("{$g['varrun_path']}/{$link_type}_{$ifdescr}.pid")) { + if (file_exists("/var/run/{$link_type}_{$ifdescr}.pid")) { $sec = trim(`/usr/local/sbin/ppp-uptime.sh {$ifinfo['if']}`); $ifinfo['ppp_uptime'] = convert_seconds_to_hms($sec); } @@ -1296,12 +1319,15 @@ function compare_hostname_to_dnscache($hostname) { /* * load_crypto() - Load crypto modules if enabled in config. */ -function load_crypto() { - global $config, $g; +function load_crypto() +{ + global $config; + $crypto_modules = array('glxsb', 'aesni'); - if (!in_array($config['system']['crypto_hardware'], $crypto_modules)) + if (!in_array($config['system']['crypto_hardware'], $crypto_modules)) { return false; + } if (!empty($config['system']['crypto_hardware']) && !is_module_loaded($config['system']['crypto_hardware'])) { log_error("Loading {$config['system']['crypto_hardware']} cryptographic accelerator module."); @@ -1312,12 +1338,15 @@ function load_crypto() { /* * load_thermal_hardware() - Load temperature monitor kernel module */ -function load_thermal_hardware() { - global $config, $g; +function load_thermal_hardware() +{ + global $config; + $thermal_hardware_modules = array('coretemp', 'amdtemp'); - if (!in_array($config['system']['thermal_hardware'], $thermal_hardware_modules)) + if (!in_array($config['system']['thermal_hardware'], $thermal_hardware_modules)) { return false; + } if (!empty($config['system']['thermal_hardware']) && !is_module_loaded($config['system']['thermal_hardware'])) { log_error("Loading {$config['system']['thermal_hardware']} thermal monitor module."); @@ -1326,12 +1355,14 @@ function load_thermal_hardware() { } -function get_freebsd_version() { +function get_freebsd_version() +{ $version = explode(".", php_uname("r")); return $version[0]; } -function download_file($url, $destination, $verify_ssl = false, $connect_timeout = 60, $timeout = 0) { +function download_file($url, $destination, $verify_ssl = false, $connect_timeout = 60, $timeout = 0) +{ global $config, $g; $fp = fopen($destination, "wb"); @@ -1443,9 +1474,11 @@ if(!function_exists("split")) { function update_alias_names_upon_change($section, $field, $new_alias_name, $origname) { - global $g, $config, $pconfig; - if(!$origname) + global $config, $pconfig; + + if (!$origname) { return; + } $sectionref = &$config; foreach($section as $sectionname) { @@ -1474,8 +1507,9 @@ function update_alias_names_upon_change($section, $field, $new_alias_name, $orig } } -function update_alias_url_data() { - global $config, $g; +function update_alias_url_data() +{ + global $config; $updated = false; From 9cf9152cef8fc20c1f1844d7445042a2ba7ea4c7 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 08:00:05 +0200 Subject: [PATCH 13/51] src: varrun_path assimilation; resistance is futile --- src/etc/inc/rrd.inc | 11 ++++------ src/etc/inc/system.inc | 50 +++++++++++++++++++----------------------- 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc index 813db5ab4..4f705873e 100644 --- a/src/etc/inc/rrd.inc +++ b/src/etc/inc/rrd.inc @@ -287,7 +287,7 @@ function enable_rrd_graphing() { $rrdupdatesh .= "\n"; $rrdupdatesh .= "export TERM=dumb\n"; $rrdupdatesh .= "\n"; - $rrdupdatesh .= 'echo $$ > ' . $g['varrun_path'] . '/updaterrd.sh.pid'; + $rrdupdatesh .= 'echo $$ > /var/run/updaterrd.sh.pid'; $rrdupdatesh .= "\n"; $rrdupdatesh .= "counter=1\n"; $rrdupdatesh .= "while [ \"\$counter\" -ne 0 ]\n"; @@ -920,10 +920,7 @@ function create_gateway_quality_rrd($rrd_file) { unset($rrdtool, $rrdinterval, $valid, $rrd_file); } -function kill_traffic_collector() { - global $g; - - killbypid("{$g['varrun_path']}/updaterrd.sh.pid"); +function kill_traffic_collector() +{ + killbypid('/var/run/updaterrd.sh.pid'); } - -?> diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 918d4c46c..5732f8de8 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -302,7 +302,7 @@ function system_hosts_generate() * Do not remove this because dhcpleases monitors with kqueue * it needs to be * killed before writing to hosts files. */ - killbypid("{$g['varrun_path']}/dhcpleases.pid"); + killbypid('/var/run/dhcpleases.pid'); $fd = fopen('/etc/hosts', 'w'); if (!$fd) { @@ -334,8 +334,8 @@ function system_dhcpleases_configure() if (!file_exists("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases")) { @touch("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"); } - if (isvalidpid("{$g['varrun_path']}/dhcpleases.pid")) { - killbypid("{$g['varrun_path']}/dhcpleases.pid", 'HUP'); + if (isvalidpid('/var/run/dhcpleases.pid')) { + killbypid('/var/run/dhcpleases.pid', 'HUP'); } else { /* To ensure we do not start multiple instances of dhcpleases, perform some clean-up first. */ killbyname('dhcpleases'); @@ -356,7 +356,7 @@ function system_dhcpleases_configure() ); } } else { - killbypid("{$g['varrun_path']}/dhcpleases.pid"); + killbypid('/var/run/dhcpleases.pid'); } } @@ -552,14 +552,13 @@ function system_staticroutes_configure($interface = "", $update_dns = false) { file_put_contents("{$g['varetc_path']}/filterdns-route.hosts", $hostnames); unset($hostnames); - if (isvalidpid("{$g['varrun_path']}/filterdns-route.pid")) { - killbypid("{$g['varrun_path']}/filterdns-route.pid", 'HUP'); + if (isvalidpid('/var/run/filterdns-route.pid')) { + killbypid('/var/run/filterdns-route.pid', 'HUP'); } else { - mwexec("/usr/local/sbin/filterdns -p {$g['varrun_path']}/filterdns-route.pid -i {$interval} -c {$g['varetc_path']}/filterdns-route.hosts -d 1"); + mwexec("/usr/local/sbin/filterdns -p /var/run/filterdns-route.pid -i {$interval} -c {$g['varetc_path']}/filterdns-route.hosts -d 1"); } } else { - killbypid("{$g['varrun_path']}/filterdns-route.pid"); - @unlink("{$g['varrun_path']}/filterdns-route.pid"); + killbypid('/var/run/filterdns-route.pid'); } } unset($filterdns_list); @@ -775,14 +774,15 @@ EOD; $syslogd_extra = "-f {$g['varetc_path']}/syslog.conf {$sourceip}"; } - if (isvalidpid("{$g['varrun_path']}/syslog.pid")) { - killbypid("{$g['varrun_path']}/syslog.pid", 'HUP'); + if (isvalidpid('/var/run/syslog.pid')) { + killbypid('/var/run/syslog.pid', 'HUP'); } else { - $retval = mwexec_bg("/usr/local/sbin/syslogd -s -c -c -l {$g['dhcpd_chroot_path']}/var/run/log -P {$g['varrun_path']}/syslog.pid {$syslogd_extra}"); + $retval = mwexec_bg("/usr/local/sbin/syslogd -s -c -c -l {$g['dhcpd_chroot_path']}/var/run/log -P /var/run/syslog.pid {$syslogd_extra}"); } - if (file_exists("/var/run/booting")) + if (file_exists("/var/run/booting")) { echo gettext("done.") . "\n"; + } return $retval; } @@ -850,12 +850,10 @@ function system_webgui_start() "cert.pem", "ca.pem"); /* kill any running lighttpd */ - killbypid("{$g['varrun_path']}/lighty-webConfigurator.pid"); + killbypid('/var/run/lighty-webConfigurator.pid'); sleep(1); - @unlink("{$g['varrun_path']}/lighty-webConfigurator.pid"); - /* regenerate the php.ini files in case the setup has changed */ mwexec('/usr/local/etc/rc.php_ini_setup'); @@ -1104,7 +1102,7 @@ EOD; #server.error-handler-404 = "/error-handler.php" ## to help the rc.scripts -server.pid-file = "{$g['varrun_path']}/{$pid_file}" +server.pid-file = "/var/run/{$pid_file}" ## virtual directory listings server.dir-listing = "disable" @@ -1568,8 +1566,8 @@ function system_ntp_configure($start_ntpd = true) } /* open configuration for wrting or bail */ - if (!@file_put_contents("{$g['varetc_path']}/ntpd.conf", $ntpcfg)) { - log_error("Could not open {$g['varetc_path']}/ntpd.conf for writing"); + if (!@file_put_contents('/var/etc/ntpd.conf', $ntpcfg)) { + log_error("Could not open /var/etc/ntpd.conf for writing"); return; } @@ -1578,21 +1576,19 @@ function system_ntp_configure($start_ntpd = true) return; /* if ntpd is running, kill it */ - while (isvalidpid("{$g['varrun_path']}/ntpd.pid")) { - killbypid("{$g['varrun_path']}/ntpd.pid"); + while (isvalidpid('/var/run/ntpd.pid')) { + killbypid('/var/run/ntpd.pid'); + usleep(200 * 1000); } - @unlink("{$g['varrun_path']}/ntpd.pid"); /* if /var/empty does not exist, create it */ - if(!is_dir("/var/empty")) - mkdir("/var/empty", 0775, true); + @mkdir('/var/empty', 0775, true); - /* start opentpd, set time now and use /var/etc/ntpd.conf */ - mwexec("/usr/local/sbin/ntpd -g -c {$g['varetc_path']}/ntpd.conf -p {$g['varrun_path']}/ntpd.pid", false, true); + /* start opentpd, set time now and use new config */ + mwexec('/usr/local/sbin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid', false, true); // Note that we are starting up log_error("NTPD is starting up."); - return; } function system_halt($sync = false) From a97af9329b4eb6d7cf1a6931b511eb01b1ed603b Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 08:37:50 +0200 Subject: [PATCH 14/51] src: the same procedure as every year (path pruning) --- src/etc/inc/interfaces.inc | 359 +++++++++++++++++++------------------ 1 file changed, 189 insertions(+), 170 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 71283c13b..81441c437 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -230,24 +230,24 @@ This block of code is only entered for OPTx interfaces that are configured for P function interfaces_loopback_configure() { - global $g; - - if(file_exists("/var/run/booting")) { + if (file_exists("/var/run/booting")) { echo gettext("Configuring loopback interface..."); } pfSense_interface_setaddress("lo0", "127.0.0.1"); interfaces_bring_up("lo0"); - if(file_exists("/var/run/booting")) { + if (file_exists("/var/run/booting")) { echo gettext("done.") . "\n"; } return 0; } -function interfaces_vlan_configure($realif = "") { - global $config, $g; +function interfaces_vlan_configure($realif = '') +{ + global $config; + if(file_exists("/var/run/booting")) echo gettext("Configuring VLAN interfaces..."); if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { @@ -266,7 +266,7 @@ function interfaces_vlan_configure($realif = "") { } function interface_vlan_configure(&$vlan) { - global $config, $g; + global $config; if (!is_array($vlan)) { log_error(gettext("VLAN: called with wrong options. Problems with config!")); @@ -308,7 +308,7 @@ function interface_vlan_configure(&$vlan) { } function interface_qinq_configure(&$vlan, $fd = NULL) { - global $config, $g; + global $config; if (!is_array($vlan)) { log_error(sprintf(gettext("QinQ compat VLAN: called with wrong options. Problems with config!%s"), "\n")); @@ -386,7 +386,7 @@ function interface_qinq_configure(&$vlan, $fd = NULL) { } function interfaces_qinq_configure() { - global $config, $g; + global $config; if(file_exists("/var/run/booting")) echo gettext("Configuring QinQ interfaces..."); if (is_array($config['qinqs']['qinqentry']) && count($config['qinqs']['qinqentry'])) { @@ -400,7 +400,7 @@ function interfaces_qinq_configure() { } function interface_qinq2_configure(&$qinq, $fd, $macaddr) { - global $config, $g; + global $config; if (!is_array($qinq)) { log_error(sprintf(gettext("QinQ compat VLAN: called with wrong options. Problems with config!%s"), "\n")); @@ -429,7 +429,7 @@ function interface_qinq2_configure(&$qinq, $fd, $macaddr) { } function interfaces_create_wireless_clones() { - global $config, $g; + global $config; if(file_exists("/var/run/booting")) echo gettext("Creating wireless clone interfaces..."); @@ -495,7 +495,7 @@ function interfaces_bridge_configure($checkmember = 0, $realif = '') } function interface_bridge_configure(&$bridge, $checkmember = 0) { - global $config, $g; + global $config; if (!is_array($bridge)) return; @@ -747,7 +747,7 @@ function interface_bridge_add_member($bridgeif, $interface) { } function interfaces_lagg_configure($realif = "") { - global $config, $g; + global $config; if(file_exists("/var/run/booting")) echo gettext("Configuring LAGG interfaces..."); $i = 0; @@ -767,7 +767,7 @@ function interfaces_lagg_configure($realif = "") { } function interface_lagg_configure(&$lagg) { - global $config, $g; + global $config; if (!is_array($lagg)) return -1; @@ -881,7 +881,7 @@ function interfaces_gre_configure($checkparent = 0, $realif = "") { /* NOTE: $grekey is not used but useful for passing this function to array_walk. */ function interface_gre_configure(&$gre, $grekey = "") { - global $config, $g; + global $config; if (!is_array($gre)) return -1; @@ -964,7 +964,7 @@ function interfaces_gif_configure($checkparent = 0, $realif = "") { /* NOTE: $gifkey is not used but useful for passing this function to array_walk. */ function interface_gif_configure(&$gif, $gifkey = "") { - global $config, $g; + global $config; if (!is_array($gif)) return -1; @@ -1054,7 +1054,7 @@ function interface_gif_configure(&$gif, $gifkey = "") { function interfaces_configure() { - global $config, $g; + global $config; /* Set up our loopback interface */ interfaces_loopback_configure(); @@ -1183,38 +1183,39 @@ function interfaces_configure() return 0; } -function interface_reconfigure($interface = "wan", $reloadall = false) { +function interface_reconfigure($interface = 'wan', $reloadall = false) +{ interface_bring_down($interface); interface_configure($interface, $reloadall); } -function interface_vip_bring_down($vip) { - global $g; - +function interface_vip_bring_down($vip) +{ $vipif = get_real_interface($vip['interface']); switch ($vip['mode']) { - case "proxyarp": - if (file_exists("{$g['varrun_path']}/choparp_{$vipif}.pid")) - killbypid("{$g['varrun_path']}/choparp_{$vipif}.pid"); + case 'proxyarp': + killbypid("/var/run/choparp_{$vipif}.pid"); break; - case "ipalias": + case 'ipalias': if (does_interface_exist($vipif)) { - if (is_ipaddrv6($vip['subnet'])) + if (is_ipaddrv6($vip['subnet'])) { mwexec("/sbin/ifconfig {$vipif} inet6 " . escapeshellarg($vip['subnet']) . " -alias"); - else + } else { pfSense_interface_deladdress($vipif, $vip['subnet']); + } } break; case "carp": /* XXX: Is enough to delete ip address? */ - if (does_interface_exist($vipif)) + if (does_interface_exist($vipif)) { pfSense_interface_deladdress($vipif, $vip['subnet']); + } break; } } function interface_bring_down($interface = "wan", $destroy = false, $ifacecfg = false) { - global $config, $g; + global $config; if (!isset($config['interfaces'][$interface])) return; @@ -1266,11 +1267,11 @@ function interface_bring_down($interface = "wan", $destroy = false, $ifacecfg = configd_run("interface reconfigure {$interface}"); break; } - if (file_exists("{$g['varrun_path']}/{$ppp['type']}_{$interface}.pid")) { - killbypid("{$g['varrun_path']}/{$ppp['type']}_{$interface}.pid"); + if (isvalidpid("/var/run/{$ppp['type']}_{$interface}.pid")) { + killbypid("/var/run/{$ppp['type']}_{$interface}.pid"); sleep(2); } - unlink_if_exists("{$g['varetc_path']}/mpd_{$interface}.conf"); + @unlink("/var/etc/mpd_{$interface}.conf"); break; } } @@ -1278,7 +1279,7 @@ function interface_bring_down($interface = "wan", $destroy = false, $ifacecfg = break; case "dhcp": kill_dhclient_process($realif); - unlink_if_exists("{$g['varetc_path']}/dhclient_{$interface}.conf"); + @unlink("/var/etc/dhclient_{$interface}.conf"); if(does_interface_exist("$realif")) { mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " delete", true); interface_ipalias_cleanup($interface); @@ -1307,7 +1308,7 @@ function interface_bring_down($interface = "wan", $destroy = false, $ifacecfg = exec('/bin/kill ' . $pidv6); } sleep(3); - unlink_if_exists("{$g['varetc_path']}/dhcp6c_{$interface}.conf"); + @unlink("/var/etc/dhcp6c_{$interface}.conf"); if (does_interface_exist($realifv6)) { $ip6 = find_interface_ipv6($realifv6); if (is_ipaddrv6($ip6) && $ip6 != "::") @@ -1365,14 +1366,13 @@ function interface_bring_down($interface = "wan", $destroy = false, $ifacecfg = mwexec("/sbin/pfctl -i " . escapeshellarg($realif) . " -Fs"); } - /* remove interface up file if it exists */ - unlink_if_exists("/tmp/{$realif}up"); - unlink_if_exists("{$g['vardb_path']}/{$interface}ip"); - unlink_if_exists("{$g['vardb_path']}/{$interface}ipv6"); - unlink_if_exists("/tmp/{$realif}_router"); - unlink_if_exists("/tmp/{$realif}_routerv6"); - unlink_if_exists("{$g['varetc_path']}/nameserver_{$realif}"); - unlink_if_exists("{$g['varetc_path']}/searchdomain_{$realif}"); + @unlink("/var/db/{$interface}ip"); + @unlink("/var/db/{$interface}ipv6"); + @unlink("/var/etc/nameserver_{$realif}"); + @unlink("/var/etc/searchdomain_{$realif}"); + @unlink("/tmp/{$realif}up"); + @unlink("/tmp/{$realif}_router"); + @unlink("/tmp/{$realif}_routerv6"); /* hostapd and wpa_supplicant do not need to be running when the interface is down. * They will also use 100% CPU if running after the wireless clone gets deleted. */ @@ -1428,10 +1428,11 @@ function interfaces_ptpid_next() { return $ptpid; } -function getMPDCRONSettings($pppif) { +function getMPDCRONSettings($pppif) +{ global $config; - $cron_cmd_file = "{$g['varetc_path']}/pppoe_restart_{$pppif}"; + $cron_cmd_file = "/var/etc/pppoe_restart_{$pppif}"; if (is_array($config['cron']['item'])) { foreach ($config['cron']['item'] as $i => $item) { if (stripos($item['command'], $cron_cmd_file) !== false) @@ -1443,10 +1444,10 @@ function getMPDCRONSettings($pppif) { } function handle_pppoe_reset($post_array) { - global $config, $g; + global $config; $pppif = "{$post_array['type']}{$post_array['ptpid']}"; - $cron_cmd_file = "{$g['varetc_path']}/pppoe_restart_{$pppif}"; + $cron_cmd_file = "/var/etc/pppoe_restart_{$pppif}"; if (!is_array($config['cron']['item'])) $config['cron']['item'] = array(); @@ -1455,14 +1456,17 @@ function handle_pppoe_reset($post_array) { // reset cron items if necessary and return if (empty($post_array['pppoe-reset-type'])) { - if (isset($itemhash)) + if (isset($itemhash)) { unset($config['cron']['item'][$itemhash['ID']]); - killbypid("{$g['varrun_path']}/cron.pid", 'HUP'); + } + killbypid('/var/run/cron.pid', 'HUP'); return; } - if (empty($itemhash)) + if (empty($itemhash)) { $itemhash = array(); + } + $item = array(); if (isset($post_array['pppoe-reset-type']) && $post_array['pppoe-reset-type'] == "custom") { $item['minute'] = $post_array['pppoe_resetminute']; @@ -1524,8 +1528,9 @@ function handle_pppoe_reset($post_array) { * This function can configure PPPoE, MLPPP (PPPoE), PPTP. * It writes the mpd config file to /var/etc every time the link is opened. */ -function interface_ppps_configure($interface) { - global $config, $g; +function interface_ppps_configure($interface) +{ + global $config; /* Return for unassigned interfaces. This is a minimum requirement. */ if (empty($config['interfaces'][$interface])) @@ -1535,12 +1540,12 @@ function interface_ppps_configure($interface) { return 0; // mpd5 requires a /var/spool/lock directory for PPP modem links. - if(!is_dir("/var/spool/lock")) { - mkdir("/var/spool/lock", 0777, true); - } + @mkdir("/var/spool/lock", 0777, true); + // mpd5 modem chat script expected in the same directory as the mpd_xxx.conf files - if (!file_exists("{$g['varetc_path']}/mpd.script")) - @symlink("/usr/local/sbin/mpd.script", "{$g['varetc_path']}/mpd.script"); + if (!file_exists('/var/etc/mpd.script')) { + symlink('/usr/local/sbin/mpd.script', '/var/etc/mpd.script'); + } if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) { foreach ($config['ppps']['ppp'] as $pppid => $ppp) { @@ -1563,8 +1568,9 @@ function interface_ppps_configure($interface) { $descr = isset($ifcfg['descr']) ? $ifcfg['descr'] : strtoupper($interface); echo "starting {$pppif} link..."; // Do not re-configure the interface if we are booting and it's already been started - if(file_exists("{$g['varrun_path']}/{$ppp['type']}_{$interface}.pid")) + if (isvalidproc("/var/run/{$ppp['type']}_{$interface}.pid")) { return 0; + } } $ports = explode(',',$ppp['ports']); @@ -1886,9 +1892,9 @@ EOD; /* Generate mpd.conf. If mpd_[interface].conf exists in the conf path, then link to it instead of generating a fresh conf file. */ if (file_exists("/conf/mpd_{$interface}.conf")) - @symlink("/conf/mpd_{$interface}.conf", "{$g['varetc_path']}/mpd_{$interface}.conf"); + @symlink("/conf/mpd_{$interface}.conf", "/var/etc/mpd_{$interface}.conf"); else { - $fd = fopen("{$g['varetc_path']}/mpd_{$interface}.conf", "w"); + $fd = fopen("/var/etc/mpd_{$interface}.conf", "w"); if (!$fd) { log_error(sprintf(gettext("Error: cannot open mpd_%s.conf in interface_ppps_configure().%s"), $interface, "\n")); return 0; @@ -1911,13 +1917,12 @@ EOD; } /* clean up old lock files */ - foreach($ports as $port) { - if(file_exists("{$g['var_path']}/spool/lock/LCK..{$port}")) - unlink("{$g['var_path']}/spool/lock/LCK..{$port}"); + foreach ($ports as $port) { + @unlink("/var/spool/lock/LCK..{$port}"); } /* fire up mpd */ - mwexec("/usr/local/sbin/mpd5 -b -k -d {$g['varetc_path']} -f mpd_{$interface}.conf -p {$g['varrun_path']}/" . + mwexec("/usr/local/sbin/mpd5 -b -k -d /var/etc -f mpd_{$interface}.conf -p /var/run/" . escapeshellarg($ppp['type']) . "_{$interface}.pid -s ppp " . escapeshellarg($ppp['type']) . "client"); // Check for PPPoE periodic reset request @@ -1960,7 +1965,7 @@ EOD; function interfaces_carp_setup() { - global $g, $config; + global $config; if (file_exists("/var/run/booting")) { echo gettext("Configuring CARP settings..."); @@ -2026,15 +2031,14 @@ function interfaces_carp_setup() function interface_proxyarp_configure($interface = '') { - global $config, $g; + global $config; /* kill any running choparp */ if (empty($interface)) - killbyname("choparp"); + killbyname('choparp'); else { $vipif = get_real_interface($interface); - if (file_exists("{$g['varrun_path']}/choparp_{$vipif}.pid")) - killbypid("{$g['varrun_path']}/choparp_{$vipif}.pid"); + killbypid("/var/run/choparp_{$vipif}.pid"); } $paa = array(); @@ -2090,16 +2094,18 @@ function interface_proxyarp_configure($interface = '') } } -function interface_ipalias_cleanup($interface, $inet = "inet4") { - global $g, $config; +function interface_ipalias_cleanup($interface, $inet = 'inet4') +{ + global $config; - if (is_array($config['virtualip']['vip'])) { + if (isset($config['virtualip']['vip'])) { foreach ($config['virtualip']['vip'] as $vip) { - if ($vip['mode'] == "ipalias" && $vip['interface'] == $interface) { - if ($inet == "inet6" && is_ipaddrv6($vip['subnet'])) + if ($vip['mode'] == 'ipalias' && $vip['interface'] == $interface) { + if ($inet == 'inet6' && is_ipaddrv6($vip['subnet'])) { interface_vip_bring_down($vip); - else if ($inet == "inet4" && is_ipaddrv4($vip['subnet'])) + } elseif ($inet == 'inet4' && is_ipaddrv4($vip['subnet'])) { interface_vip_bring_down($vip); + } } } } @@ -2107,10 +2113,11 @@ function interface_ipalias_cleanup($interface, $inet = "inet4") { function interfaces_vips_configure($interface = '') { - global $g, $config; + global $config; $paa = array(); - if(is_array($config['virtualip']['vip'])) { + + if (isset($config['virtualip']['vip'])) { $carp_setuped = false; $anyproxyarp = false; foreach ($config['virtualip']['vip'] as $vip) { @@ -2163,7 +2170,7 @@ function interface_ipalias_configure(&$vip) { function interface_carp_configure(&$vip) { - global $config, $g; + global $config; if ($vip['mode'] != 'carp') { return; @@ -2217,8 +2224,10 @@ function interface_carp_configure(&$vip) return $realif; } -function interface_wireless_clone($realif, $wlcfg) { - global $config, $g; +function interface_wireless_clone($realif, $wlcfg) +{ + global $config; + /* Check to see if interface has been cloned as of yet. * If it has not been cloned then go ahead and clone it. */ @@ -2281,8 +2290,9 @@ function interface_wireless_clone($realif, $wlcfg) { return true; } -function interface_sync_wireless_clones(&$ifcfg, $sync_changes = false) { - global $config, $g; +function interface_sync_wireless_clones(&$ifcfg, $sync_changes = false) +{ + global $config; $shared_settings = array('standard', 'turbo', 'protmode', 'txpower', 'channel', 'diversity', 'txantenna', 'rxantenna', 'distance', @@ -2523,7 +2533,7 @@ function interface_wireless_configure($if, &$wl, &$wlcfg) { case 'bss': if (isset($wlcfg['wpa']['enable'])) { $wpa .= << /tmp/{$wanif}_output 2> /tmp/{$wanif}_error_output"); + mwexec("/sbin/dhclient -c /var/etc/dhclient_{$interface}.conf {$wanif} > /tmp/{$wanif}_output 2> /tmp/{$wanif}_error_output"); return 0; } @@ -4038,41 +4052,47 @@ function DHCP_Config_File_Substitutions($wancfg, $wanif, $dhclientconf) { return $dhclientconf; } -function interfaces_group_setup() { +function interfaces_group_setup() +{ global $config; - if (!is_array($config['ifgroups']['ifgroupentry'])) + if (!isset($config['ifgroups']['ifgroupentry'])) { return; - - foreach ($config['ifgroups']['ifgroupentry'] as $groupar) - interface_group_setup($groupar); - - return; -} - -function interface_group_setup(&$groupname /* The parameter is an array */) { - global $config; - - if (!is_array($groupname)) - return; - $members = explode(" ", $groupname['members']); - foreach($members as $ifs) { - $realif = get_real_interface($ifs); - if ($realif) - mwexec("/sbin/ifconfig {$realif} group {$groupname['ifname']}"); } - return; + foreach ($config['ifgroups']['ifgroupentry'] as $groupar) { + interface_group_setup($groupar); + } } -function is_interface_group($if) { +function interface_group_setup(&$groupname) +{ global $config; - if (is_array($config['ifgroups']['ifgroupentry'])) - foreach ($config['ifgroups']['ifgroupentry'] as $groupentry) { - if ($groupentry['ifname'] === $if) - return true; + if (!is_array($groupname)) { + return; + } + + $members = explode(" ", $groupname['members']); + foreach ($members as $ifs) { + $realif = get_real_interface($ifs); + if ($realif) { + mwexec("/sbin/ifconfig {$realif} group {$groupname['ifname']}"); } + } +} + +function is_interface_group($if) +{ + global $config; + + if (isset($config['ifgroups']['ifgroupentry'])) { + foreach ($config['ifgroups']['ifgroupentry'] as $groupentry) { + if ($groupentry['ifname'] === $if) { + return true; + } + } + } return false; } @@ -5162,10 +5182,9 @@ function is_jumbo_capable($iface) { return false; } -function interface_setup_pppoe_reset_file($pppif, $iface="") { - global $g; - - $cron_file = "{$g['varetc_path']}/pppoe_restart_{$pppif}"; +function interface_setup_pppoe_reset_file($pppif, $iface = '') +{ + $cron_file = "/var/etc/pppoe_restart_{$pppif}"; if(!empty($iface) && !empty($pppif)){ $cron_cmd = << Date: Fri, 24 Apr 2015 08:42:51 +0200 Subject: [PATCH 15/51] Proxy work in progress, added traffic magement and few other options. --- .../mvc/app/models/OPNsense/Proxy/Proxy.xml | 77 ++++++++++++++++ .../mvc/app/views/OPNsense/Proxy/index.volt | 69 +++++++++++++- .../templates/OPNsense/Proxy/squid.conf | 89 +++++++++++++------ 3 files changed, 206 insertions(+), 29 deletions(-) diff --git a/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml b/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml index d4199c933..33816fa5d 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml +++ b/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml @@ -35,8 +35,25 @@ Y + on + N + + Append client's IP (on) + Set forward header to unknown (off) + Do not alter forward header (transparent) + Replace all with client's IP (truncate) + + strip + N + + Strip whitespaces + Deny request + Allow whitespaces + Encode whitespaces (RFC1738) + Chop URI at first whitespace + 1 @@ -46,6 +63,66 @@ 0 N + + + + 0 + Y + + + /var/squid/cache + Y + + + 100 + 1 + "Specify a positive cache size. (number of MB's)" + Y + + + 16 + 1 + "Specify a positive number of first-level subdirectories." + Y + + + 256 + 1 + "Specify a positive number of second-level subdirectories." + Y + + + + + + 0 + Y + + + 2048 + 1 + "Specify the maximum download size. (number of KB's)" + N + + + 1024 + 1 + "Specify the maximum upload size. (number of KB's)" + N + + + 1024 + 1 + "Specify the overall bandwidth for downloads in kilobits per second." + N + + + 256 + 1 + "Specify the per host bandwidth for downloads in kilobits per second." + N + + diff --git a/src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt b/src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt index 437eeed50..566291330 100644 --- a/src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt +++ b/src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt @@ -234,19 +234,80 @@ maxheight: define max height of select box, default=170px to hold 5 items replies as required by RFC2616.', 'advanced':'true' ], + ['id':'proxy.general.forwardedForHandling', + 'label':'X-Forwarded for header handling', + 'type':'dropdown', + 'help':'Select what to do with X-Forwarded for header.', + 'advanced':'true' + ], ['id': 'proxy.general.suppressVersion', 'label':'Suppress version string', 'type':'checkbox', 'help':'Suppress Squid version string info in HTTP headers and HTML error pages.', 'advanced':'true' + ], + ['id':'proxy.general.uriWhitespaceHandling', + 'label':'Whitespace handling of URI', + 'type':'dropdown', + 'help':'Select what to do with URI that contain whitespaces.
+

NOTE: the current Squid implementation of encode and chop violates + RFC2616 by not using a 301 redirect after altering the URL.
', + 'advanced':'true' ]} ], - [ 'proxy-general-cache','Local Cache Settings', - {['id': 'proxy.general.enabled', - 'label':'Enable proxy', + [ 'proxy-general-cache-local','Local Cache Settings', + {['id': 'proxy.general.cache.local.enabled', + 'label':'Enable local cache.', 'type':'checkbox', - 'help':'Enable or disable the proxy service.' + 'help':'Enable or disable the local cache.
+ Curently only ufs directory cache type is supported.
+ Do not enable on embedded systems with SD or CF cards as this may break your drive.' + ], + ['id': 'proxy.general.cache.local.size', + 'label':'Cache size in Megabytes', + 'type':'text', + 'help':'Enter the storage size for the local cache (default is 100).', + 'advanced':'true' + ], + ['id': 'proxy.general.cache.local.l1', + 'label':'Number of first-level subdirectories', + 'type':'text', + 'help':'Enter the number of first-level subdirectories for the local cache (default is 16).', + 'advanced':'true' + ], + ['id': 'proxy.general.cache.local.l2', + 'label':'Number of second-level subdirectories', + 'type':'text', + 'help':'Enter the number of first-level subdirectories for the local cache (default is 256).', + 'advanced':'true' ]} + ], + [ 'proxy-general-traffic','Traffic Management Settings', + {['id': 'proxy.general.traffic.enabled', + 'label':'Enable traffic management.', + 'type':'checkbox', + 'help':'Enable or disable traffic management.' + ], + ['id': 'proxy.general.traffic.maxDownloadSize', + 'label':'Maximum download size (Kb)', + 'type':'text', + 'help':'Enter the maxium size for downloads in kilobytes (leave empty to disable).' + ], + ['id': 'proxy.general.traffic.maxUploadSize', + 'label':'Maximum upload size (Kb)', + 'type':'text', + 'help':'Enter the maxium size for uploads in kilobytes (leave empty to disable).' + ], + ['id': 'proxy.general.traffic.OverallBandwidthTrotteling', + 'label':'Overall bandwidth throtteling (Kbps)', + 'type':'text', + 'help':'Enter the allowed overall bandtwith in kilobits per second (leave empty to disable).' + ], + ['id': 'proxy.general.traffic.perHostTrotteling', + 'label':'Per host bandwidth throtteling (Kbps)', + 'type':'text', + 'help':'Enter the allowed per host bandtwith in kilobits per second (leave empty to disable).' + ]} ]} ], ['proxy-forward','Forward Proxy','subtabs': { diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index fbb2503f1..763493782 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -8,7 +8,6 @@ {% for intf_key,intf_item in interfaces.iteritems() %} {% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} http_port {{intf_item.ipaddr}}:{{ OPNsense.proxy.forward.port }} {%if OPNsense.proxy.forward.transparentMode == '1' %}tproxy{% endif %} - {% endif %} {% endfor %} {# virtual ip's #} @@ -25,25 +24,26 @@ http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} # Rules allowing access from your local networks. # Generated list of (internal) IP networks from where browsing # should be allowed. (Allow interface subnets). -{% if helpers.exists('OPNsense.proxy.forward.addACLforInterfaceSubnets') %} -{% if OPNsense.proxy.forward.addACLforInterfaceSubnets == '1' %} -{% for interface in OPNsense.proxy.forward.interfaces.split(",") %} -{% for intf_key,intf_item in interfaces.iteritems() %} -{% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} +{% if helpers.exists('OPNsense.proxy.forward.interfaces') %} +{% if helpers.exists('OPNsense.proxy.forward.addACLforInterfaceSubnets') %} +{% if OPNsense.proxy.forward.addACLforInterfaceSubnets == '1' %} +{% for interface in OPNsense.proxy.forward.interfaces.split(",") %} +{% for intf_key,intf_item in interfaces.iteritems() %} +{% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} acl localnet src {{intf_item.ipaddr}}/{{intf_item.subnet}} # Possible internal network -{% endif %} -{% endfor %} -{% if helpers.exists('virtualip') %} -{% for intf_key,intf_item in virtualip.iteritems() %} -{% if intf_item.interface == interface and intf_item.mode == 'ipalias' %} -acl localnet src {{intf_item.subnet}}/{{intf_item.subnet}} # Possible internal network {% endif %} {% endfor %} +{% if helpers.exists('virtualip') %} +{% for intf_key,intf_item in virtualip.iteritems() %} +{% if intf_item.interface == interface and intf_item.mode == 'ipalias' %} +acl localnet src {{intf_item.subnet}}/{{intf_item.subnet}} # Possible internal network +{% endif %} +{% endfor %} +{% endif %} +{% endfor %} {% endif %} -{% endfor %} {% endif %} {% endif %} - # Default allow for local-link and private networks acl localnet src fc00::/7 # RFC 4193 local private network range acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines @@ -54,26 +54,26 @@ acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 # ACL lists {% if helpers.exists('OPNsense.proxy.forward.acl.allowedSubnets') %} + # ACL - Allow Subnets - User defined (subnets) {% for network in OPNsense.proxy.forward.acl.allowedSubnets.split(",") %} acl subnets src {{network}} {% endfor %} {% endif %} - {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %} + # ACL - Unrestricted IPs - User defined (unrestricted) {% for ip in OPNsense.proxy.forward.acl.unrestricted.split(",") %} acl unrestricted src {{ip}} {% endfor %} {% endif %} - {% if helpers.exists('OPNsense.proxy.forward.acl.bannedHosts') %} + # ACL - Banned Hosts - User defined (bannedHosts) {% for ip in OPNsense.proxy.forward.acl.bannedHosts.split(",") %} acl bannedHosts src {{ip}} {% endfor %} {% endif %} - {% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %} # ALC - Whitelist - User defined (whiteList) {% for element in OPNsense.proxy.forward.acl.whiteList.split(",") %} @@ -84,8 +84,8 @@ acl dstdomain {{element}} {% endif %} {% endfor %} {% endif %} - {% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %} + # ALC - Blacklist - User defined (blackList) {% for element in OPNsense.proxy.forward.acl.blackList.split(",") %} {% if '^' or '\\' or '$' or '[' in element %} @@ -95,15 +95,15 @@ acl blackList dstdomain {{element}} {% endif %} {% endfor %} {% endif %} - {% if helpers.exists('OPNsense.proxy.forward.acl.browser') %} + # ALC - Block browser/user-agent - User defined (browser) {% for element in OPNsense.proxy.forward.acl.browser.split(",") %} acl blockuseragents browser {{element}} {% endfor %} {% endif %} - {% if helpers.exists('OPNsense.proxy.forward.acl.mimeType') %} + # ALC - Block MIME types - User defined (mimetype) {% for element in OPNsense.proxy.forward.acl.mimeType.split(",") %} acl blockmimetypes rep_mime_type {{element}} @@ -144,20 +144,18 @@ auth_param basic children {{OPNsense.proxy.forward.authentication.children}} # ACL - Local Authorized Users - local_auth acl local_auth proxy_auth REQUIRED {% endif %} - -# ALLOW UNRESTRICTED {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %} +# ALLOW UNRESTRICTED # ACL list (Allow) unrestricted http_access allow unrestricted {% endif %} +{% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %} # -{% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %} # ACL list (Deny) blacklist http_access deny blackList {% endif %} - {% if helpers.exists('OPNsense.proxy.forward.acl.browser') %} # ACL list (Deny) blockuseragent @@ -218,8 +216,12 @@ http_access allow subnets # Deny all other access to this proxy http_access deny all +{% if helpers.exists('OPNsense.proxy.general.cache.local') %} +{% if OPNsense.proxy.general.cache.local.enabled == '1' %} # Uncomment and adjust the following to add a disk cache directory. -#cache_dir ufs /var/squid/cache 100 16 256 +cache_dir ufs {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.general.cache.local.size}} {{OPNsense.proxy.general.cache.local.l1}} {{OPNsense.proxy.general.cache.local.l2}} +{% endif %} +{% endif %} # Leave coredumps in the first cache dir coredump_dir /var/squid/cache @@ -273,3 +275,40 @@ httpd_suppress_version_string on icp_port {{OPNsense.proxy.general.icpPort}} {% endif %} {% endif %} +{% if helpers.exists('OPNsense.proxy.general.uriWhitespaceHandling') %} +# URI hanlding with Whitespaces (default=strip) +uri_whitespace {{OPNsense.proxy.general.uriWhitespaceHandling}} +{% endif %} +{% if helpers.exists('OPNsense.proxy.general.forwardedForHandling') %} +# X-Forwarded header handling (default=on) +forwarded_for {{OPNsense.proxy.general.forwardedForHandling}} +{% endif %} +{% if helpers.exists('OPNsense.proxy.general.traffic.enabled') and OPNsense.proxy.general.traffic.enabled == '1' %} +{% if helpers.exists('OPNsense.proxy.general.traffic.maxDownloadSize') %} +# Define max download size +reply_body_max_size {{OPNsense.proxy.general.traffic.maxDownloadSize}} KB +{% endif %} +{% if helpers.exists('OPNsense.proxy.general.traffic.maxUploadSize') %} +# Define max upload size +request_body_max_size {{OPNsense.proxy.general.traffic.maxUploadSize}} KB +{% endif %} +{% if helpers.exists('OPNsense.proxy.general.traffic.perHostTrotteling') %} +delay_pools 1 +delay_class 1 3 +delay_access 1 allow all +{% if helpers.exists('OPNsense.proxy.general.traffic.OverallBandwidthTrotteling') %} +# Define PerHost and Overall Bandwith Trotteling +delay_parameters 1 {{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}}/{{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}} -1/-1 {{OPNsense.proxy.general.traffic.perHostTrotteling|int // 8 * 1000}}/{{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}} +{% else %} +# Define PerHost Trotteling +delay_parameters -1/-1 {{OPNsense.proxy.general.traffic.perHostTrotteling|int // 8 * 1000}}/{{OPNsense.proxy.general.traffic.perHostTrotteling|int // 8 * 1000}} +{% endif %} +{% endif %} +{% if helpers.exists('OPNsense.proxy.general.traffic.OverallBandwidthTrotteling') and not helpers.exists('OPNsense.proxy.general.traffic.perHostTrotteling') %} +# Define Overall Bandwidth Trotteling +delay_pools 1 +delay_class 1 1 +delay_access 1 allow all +delay_parameters 1 {{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}}/{{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}} +{% endif %} +{% endif %} From 3400a5b2cae222a94914427ff091797ed0945f07 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 08:51:33 +0200 Subject: [PATCH 16/51] src: services no hay varrun_path --- src/etc/inc/services.inc | 64 +++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index cd03b1b4b..14651eea0 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -312,18 +312,17 @@ function services_radvd_configure($blacklist = array()) unset($radvdconf); if (count($radvdifs) > 0) { - if (isvalidpid("{$g['varrun_path']}/radvd.pid")) { - killbypid("{$g['varrun_path']}/radvd.pid", 'HUP'); + if (isvalidpid('/var/run/radvd.pid')) { + killbypid('/var/run/radvd.pid', 'HUP'); } else { - mwexec("/usr/local/sbin/radvd -p {$g['varrun_path']}/radvd.pid -C {$g['varetc_path']}/radvd.conf -m syslog"); + mwexec('/usr/local/sbin/radvd -p /var/run/radvd.pid -C /var/etc/radvd.conf -m syslog'); } } else { /* we need to shut down the radvd cleanly, it will send out the prefix * information with a lifetime of 0 to notify clients of a (possible) new prefix */ - if (isvalidpid("{$g['varrun_path']}/radvd.pid")) { + if (isvalidpid('/var/run/radvd.pid')) { log_error("Shutting down Router Advertisment daemon cleanly"); - killbypid("{$g['varrun_path']}/radvd.pid"); - @unlink("{$g['varrun_path']}/radvd.pid"); + killbypid('/var/run/radvd.pid'); } } return 0; @@ -370,8 +369,7 @@ function services_dhcpdv4_configure() $ddns_zones = array(); /* kill any running dhcpd */ - if (isvalidpid("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpd.pid")) - killbypid("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpd.pid"); + killbypid("{$g['dhcpd_chroot_path']}/var/run/dhcpd.pid"); /* DHCP enabled on any interfaces? */ if (!is_dhcp_server_enabled()) @@ -900,16 +898,15 @@ EOD; unset($dhcpdconf); /* create an empty leases database */ - if (!file_exists("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases")) - @touch("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"); + @touch("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"); /* make sure there isn't a stale dhcpd.pid file, which can make dhcpd fail to start. */ /* if we get here, dhcpd has been killed and is not started yet */ - unlink_if_exists("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpd.pid"); + @unlink("{$g['dhcpd_chroot_path']}/var/run/dhcpd.pid"); /* fire up dhcpd in a chroot */ if (count($dhcpdifs) > 0) { - mwexec("/usr/local/sbin/dhcpd -user dhcpd -group dhcpd -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpd.conf -pf {$g['varrun_path']}/dhcpd.pid " . + mwexec("/usr/local/sbin/dhcpd -user dhcpd -group dhcpd -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid " . join(" ", $dhcpdifs)); } @@ -987,14 +984,13 @@ function services_dhcpdv6_configure($blacklist = array()) global $config, $g; /* kill any running dhcpd */ - if (isvalidpid("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpdv6.pid")) - killbypid("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpdv6.pid"); - if (isvalidpid("{$g['varrun_path']}/dhcpleases6.pid")) - killbypid("{$g['varrun_path']}/dhcpleases6.pid"); + killbypid("{$g['dhcpd_chroot_path']}/var/run/dhcpdv6.pid"); + killbypid('/var/run/dhcpleases6.pid'); /* DHCP enabled on any interfaces? */ - if (!is_dhcpv6_server_enabled()) + if (!is_dhcpv6_server_enabled()) { return 0; + } if (file_exists("/var/run/booting")) { if (is_install_media()) { @@ -1310,11 +1306,11 @@ EOD; /* make sure there isn't a stale dhcpdv6.pid file, which may make dhcpdv6 fail to start. */ /* if we get here, dhcpdv6 has been killed and is not started yet */ - unlink_if_exists("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpdv6.pid"); + @unlink("{$g['dhcpd_chroot_path']}/var/run/dhcpdv6.pid"); /* fire up dhcpd in a chroot */ if (count($dhcpdv6ifs) > 0) { - mwexec("/usr/local/sbin/dhcpd -6 -user dhcpd -group dhcpd -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpdv6.conf -pf {$g['varrun_path']}/dhcpdv6.pid " . + mwexec("/usr/local/sbin/dhcpd -6 -user dhcpd -group dhcpd -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpdv6.conf -pf /var/run/dhcpdv6.pid " . join(" ", $dhcpdv6ifs)); mwexec("/usr/local/sbin/dhcpleases6 -c \"/usr/local/bin/php -f /usr/local/sbin/prefixes.php|/bin/sh\" -l {$g['dhcpd_chroot_path']}/var/db/dhcpd6.leases"); } @@ -1386,7 +1382,7 @@ function services_dhcrelay_configure() global $config, $g; /* kill any running dhcrelay */ - killbypid("{$g['varrun_path']}/dhcrelay.pid"); + killbypid('/var/run/dhcrelay.pid'); $dhcrelaycfg =& $config['dhcrelay']; @@ -1503,7 +1499,7 @@ function services_dhcrelay6_configure() global $config, $g; /* kill any running dhcrelay */ - killbypid("{$g['varrun_path']}/dhcrelay6.pid"); + killbypid('/var/run/dhcrelay6.pid'); $dhcrelaycfg =& $config['dhcrelay6']; @@ -1599,7 +1595,7 @@ function services_dhcrelay6_configure() return; /* XXX */ } - $cmd = "/usr/local/sbin/dhcrelay -6 -pf \"{$g['varrun_path']}/dhcrelay6.pid\""; + $cmd = '/usr/local/sbin/dhcrelay -6 -pf /var/run/dhcrelay6.pid'; foreach ($dhcrelayifs as $dhcrelayif) { $cmd .= " -l {$dhcrelayif}"; } @@ -1743,7 +1739,7 @@ function services_dnsmasq_configure() ); /* kill any running dnsmasq */ - killbypid("{$g['varrun_path']}/dnsmasq.pid"); + killbypid('/var/run/dnsmasq.pid'); if (isset($config['dnsmasq']['enable'])) { @@ -1883,7 +1879,7 @@ function services_unbound_configure() $return = 0; // kill any running Unbound instance - killbypid("{$g['varrun_path']}/unbound.pid"); + killbypid('/var/run/unbound.pid'); if (isset($config['unbound']['enable'])) { if (file_exists("/var/run/booting")) @@ -1910,10 +1906,12 @@ function services_snmpd_configure() global $config, $g; /* kill any running snmpd */ - killbypid("{$g['varrun_path']}/snmpd.pid"); + killbypid('/var/run/snmpd.pid'); sleep(2); - if(is_process_running("bsnmpd")) - mwexec("/usr/bin/killall bsnmpd", true); + + if (is_process_running('bsnmpd')) { + mwexec('/usr/bin/killall bsnmpd', true); + } if (isset($config['snmpd']['enable'])) { @@ -2095,7 +2093,7 @@ EOD; /* run bsnmpd */ mwexec("/usr/sbin/bsnmpd -c {$g['varetc_path']}/snmpd.conf" . - "{$bindlan} -p {$g['varrun_path']}/snmpd.pid"); + "{$bindlan} -p /var/run/snmpd.pid"); if (file_exists("/var/run/booting")) echo gettext("done.") . "\n"; @@ -2280,11 +2278,11 @@ function configure_cron() { } /* please maintain the newline at the end of file */ - file_put_contents("/etc/crontab", $crontab_contents); + file_put_contents('/etc/crontab', $crontab_contents); unset($crontab_contents); /* do a HUP kill to force sync changes */ - killbypid("{$g['varrun_path']}/cron.pid", 'HUP'); + killbypid('/var/run/cron.pid', 'HUP'); } @@ -2293,12 +2291,12 @@ function upnp_action ($action) { switch($action) { case "start": if (file_exists('/var/etc/miniupnpd.conf')) { - @unlink("{$g['varrun_path']}/miniupnpd.pid"); - mwexec_bg("/usr/local/sbin/miniupnpd -f /var/etc/miniupnpd.conf -P {$g['varrun_path']}/miniupnpd.pid"); + @unlink('/var/run/miniupnpd.pid'); + mwexec_bg('/usr/local/sbin/miniupnpd -f /var/etc/miniupnpd.conf -P /var/run/miniupnpd.pid'); } break; case "stop": - killbypid("{$g['varrun_path']}/miniupnpd.pid"); + killbypid('/var/run/miniupnpd.pid'); while((int)exec("/bin/pgrep -a miniupnpd | wc -l") > 0) mwexec('killall miniupnpd 2>/dev/null', true); mwexec('/sbin/pfctl -aminiupnpd -Fr 2>&1 >/dev/null'); From ab7cec05a32f83ef1a23fae329e30d2f8c8168c6 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 08:58:25 +0200 Subject: [PATCH 17/51] src: varrun_path is almost gone --- src/etc/inc/vpn.inc | 51 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc index be8cd2914..f8495cc23 100644 --- a/src/etc/inc/vpn.inc +++ b/src/etc/inc/vpn.inc @@ -101,9 +101,9 @@ function vpn_ipsec_configure($ipchg = false) if (!isset($ipseccfg['enable'])) { /* try to stop charon */ - mwexec("/usr/local/sbin/ipsec stop"); + mwexec('/usr/local/sbin/ipsec stop'); /* Stop dynamic monitoring */ - killbypid("{$g['varrun_path']}/filterdns-ipsec.pid"); + killbypid('/var/run/filterdns-ipsec.pid'); /* wait for process to die */ sleep(2); @@ -816,11 +816,11 @@ EOD; /* end ipsec.conf */ /* mange process */ - if (isvalidpid("{$g['varrun_path']}/charon.pid")) { + if (isvalidpid('/var/run/charon.pid')) { /* Read secrets */ - mwexec("/usr/local/sbin/ipsec rereadall", false); + mwexec('/usr/local/sbin/ipsec rereadall', false); /* Update configuration changes */ - mwexec("/usr/local/sbin/ipsec reload", false); + mwexec('/usr/local/sbin/ipsec reload', false); } else { mwexec("/usr/local/sbin/ipsec start", false); } @@ -840,14 +840,13 @@ EOD; file_put_contents("/usr/local/etc/filterdns-ipsec.hosts", $hostnames); unset($hostnames); - if (isvalidpid("{$g['varrun_path']}/filterdns-ipsec.pid")) { - killbypid("{$g['varrun_path']}/filterdns-ipsec.pid", 'HUP'); + if (isvalidpid('/var/run/filterdns-ipsec.pid')) { + killbypid('/var/run/filterdns-ipsec.pid', 'HUP'); } else { - mwexec("/usr/local/sbin/filterdns -p {$g['varrun_path']}/filterdns-ipsec.pid -i {$interval} -c /usr/local/etc/filterdns-ipsec.hosts -d 1"); + mwexec("/usr/local/sbin/filterdns -p /var/run/filterdns-ipsec.pid -i {$interval} -c /usr/local/etc/filterdns-ipsec.hosts -d 1"); } } else { - killbypid("{$g['varrun_path']}/filterdns-ipsec.pid"); - @unlink("{$g['varrun_path']}/filterdns-ipsec.pid"); + killbypid('/var/run/filterdns-ipsec.pid'); } if (file_exists("/var/run/booting")) @@ -927,13 +926,13 @@ function vpn_pptpd_configure() { echo gettext("Configuring PPTP VPN service... "); } else { /* kill mpd */ - killbypid("{$g['varrun_path']}/pptp-vpn.pid"); + killbypid('/var/run/pptp-vpn.pid'); /* wait for process to die */ sleep(3); if (is_process_running("mpd -b")) { - killbypid("{$g['varrun_path']}/pptp-vpn.pid"); + killbypid('/var/run/pptp-vpn.pid'); log_error(gettext("Could not kill mpd within 3 seconds. Trying again.")); } @@ -1123,7 +1122,7 @@ EOD; vpn_netgraph_support(); /* fire up mpd */ - mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']}/pptp-vpn -p {$g['varrun_path']}/pptp-vpn.pid -s pptps pptps"); + mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']}/pptp-vpn -p /var/run/pptp-vpn.pid -s pptps pptps"); break; @@ -1162,7 +1161,7 @@ function vpn_pppoe_configure(&$pppoecfg) { echo gettext("Configuring PPPoE VPN service... "); } else { /* kill mpd */ - killbypid("{$g['varrun_path']}/pppoe{$pppoecfg['pppoeid']}-vpn.pid"); + killbypid("/var/run/pppoe{$pppoecfg['pppoeid']}-vpn.pid"); /* wait for process to die */ sleep(2); @@ -1340,13 +1339,12 @@ EOD; } /* Check if previous instance is still up */ - while (file_exists("{$g['varrun_path']}/pppoe{$pppoecfg['pppoeid']}-vpn.pid") && isvalidpid("{$g['varrun_path']}/pppoe{$pppoecfg['pppoeid']}-vpn.pid")) - killbypid("{$g['varrun_path']}/pppoe{$pppoecfg['pppoeid']}-vpn.pid"); + killbypid("/var/run/pppoe{$pppoecfg['pppoeid']}-vpn.pid"); /* Get support for netgraph(4) from the nic */ pfSense_ngctl_attach(".", $pppoe_interface); /* fire up mpd */ - mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn -p {$g['varrun_path']}/pppoe{$pppoecfg['pppoeid']}-vpn.pid -s poes poes"); + mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn -p /var/run/pppoe{$pppoecfg['pppoeid']}-vpn.pid -s poes poes"); break; } @@ -1374,7 +1372,7 @@ function vpn_l2tp_configure() { echo gettext("Configuring l2tp VPN service... "); } else { /* kill mpd */ - killbypid("{$g['varrun_path']}/l2tp-vpn.pid"); + killbypid('/var/run/l2tp-vpn.pid'); /* wait for process to die */ sleep(8); @@ -1540,7 +1538,7 @@ EOD; vpn_netgraph_support(); /* fire up mpd */ - mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']}/l2tp-vpn -p {$g['varrun_path']}/l2tp-vpn.pid -s l2tps l2tps"); + mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']}/l2tp-vpn -p /var/run/l2tp-vpn.pid -s l2tps l2tps"); break; @@ -1554,12 +1552,13 @@ EOD; return 0; } -function vpn_ipsec_configure_preferoldsa() { +function vpn_ipsec_configure_preferoldsa() +{ global $config; - if(isset($config['ipsec']['preferoldsa'])) - set_single_sysctl("net.key.preferred_oldsa", "-30"); - else - set_single_sysctl("net.key.preferred_oldsa", "0"); -} -?> + if (isset($config['ipsec']['preferoldsa'])) { + set_single_sysctl("net.key.preferred_oldsa", "-30"); + } else { + set_single_sysctl("net.key.preferred_oldsa", "0"); + } +} From f21a47569c2327ebcf4b53ecc62e4fb751a6cf11 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 09:07:54 +0200 Subject: [PATCH 18/51] src: rejoice for varrun_path is gone --- src/etc/inc/globals.inc | 1 - src/sbin/gmirror_status_check.php | 2 +- src/www/services_dhcpv6.php | 2 +- src/www/status_filter_reload.php | 7 ++++--- src/www/status_queues.php | 8 +++++--- src/www/system_advanced_firewall.php | 6 +++--- src/www/vpn_pppoe.php | 10 +++++++--- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index ea078c4fc..510a0400a 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -37,7 +37,6 @@ $g = array( "factory_shipped_password" => "opnsense", "dhcpd_chroot_path" => "/var/dhcpd", "unbound_chroot_path" => "/var/unbound", - "varrun_path" => "/var/run", "varetc_path" => "/var/etc", "vardb_path" => "/var/db", "admin_group" => "admins", diff --git a/src/sbin/gmirror_status_check.php b/src/sbin/gmirror_status_check.php index 3fd88d3ae..0d73b91a5 100644 --- a/src/sbin/gmirror_status_check.php +++ b/src/sbin/gmirror_status_check.php @@ -32,7 +32,7 @@ require_once("globals.inc"); require_once("gmirror.inc"); global $g; -$status_file = "{$g['varrun_path']}/gmirror.status"; +$status_file = '/var/run/gmirror.status'; $mirror_status = gmirror_get_status(); $mirror_list = array_keys($mirror_status); diff --git a/src/www/services_dhcpv6.php b/src/www/services_dhcpv6.php index dcfc0f97e..c3608952f 100644 --- a/src/www/services_dhcpv6.php +++ b/src/www/services_dhcpv6.php @@ -301,7 +301,7 @@ if ($_POST) { if (!$input_errors || $_POST['apply'] == 'Apply changes') { /* Stop DHCPv6 so we can cleanup leases */ - killbypid("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpdv6.pid"); + killbypid("{$g['dhcpd_chroot_path']}/var/run/dhcpdv6.pid"); // dhcp_clean_leases(); /* dnsmasq_configure calls dhcpd_configure */ /* no need to restart dhcpd twice */ diff --git a/src/www/status_filter_reload.php b/src/www/status_filter_reload.php index 8e50abe1b..5f4a69059 100644 --- a/src/www/status_filter_reload.php +++ b/src/www/status_filter_reload.php @@ -1,6 +1,6 @@ Date: Fri, 24 Apr 2015 09:25:50 +0200 Subject: [PATCH 19/51] type error in configd --- src/opnsense/service/modules/processhandler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/opnsense/service/modules/processhandler.py b/src/opnsense/service/modules/processhandler.py index 400982051..ac5e04442 100644 --- a/src/opnsense/service/modules/processhandler.py +++ b/src/opnsense/service/modules/processhandler.py @@ -274,7 +274,8 @@ class ActionHandler(object): if command in self.action_map: if action in self.action_map[command]: if type(self.action_map[command][action]) == dict: - if len(parameters) > 0 and parameters[0] in self.action_map[command][action]: + if parameters is not None and len(parameters) > 0 \ + and parameters[0] in self.action_map[command][action]: # 3 level action ( "interface linkup start" for example ) if isinstance(self.action_map[command][action][parameters[0]], Action): action_obj = self.action_map[command][action][parameters[0]] From 5f394ac7ac7f0d3b481edafddf09ad7aff84f27a Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Fri, 24 Apr 2015 10:16:44 +0200 Subject: [PATCH 20/51] Proxy work in progress, small fix for local subnet --- src/opnsense/service/templates/OPNsense/Proxy/squid.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index 763493782..a2d47ae8c 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -30,7 +30,7 @@ http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} {% for interface in OPNsense.proxy.forward.interfaces.split(",") %} {% for intf_key,intf_item in interfaces.iteritems() %} {% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} -acl localnet src {{intf_item.ipaddr}}/{{intf_item.subnet}} # Possible internal network +acl localnet src {{intf_item.ipaddr.split(".",3)}}.0/{{intf_item.subnet}} # Possible internal network {% endif %} {% endfor %} {% if helpers.exists('virtualip') %} From 3929cec9a8c9790755bebe4267b8aefdbf153d07 Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Fri, 24 Apr 2015 10:19:12 +0200 Subject: [PATCH 21/51] Proxy work in progress, small fix for local subnet, fix2 --- src/opnsense/service/templates/OPNsense/Proxy/squid.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index a2d47ae8c..3a1b3f20b 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -30,7 +30,7 @@ http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} {% for interface in OPNsense.proxy.forward.interfaces.split(",") %} {% for intf_key,intf_item in interfaces.iteritems() %} {% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} -acl localnet src {{intf_item.ipaddr.split(".",3)}}.0/{{intf_item.subnet}} # Possible internal network +acl localnet src {{intf_item.ipaddr.split(".",3).join(".")}}.0/{{intf_item.subnet}} # Possible internal network {% endif %} {% endfor %} {% if helpers.exists('virtualip') %} From 5bef0c92ee2d66c0bd3e2d0694996d574abac36b Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Fri, 24 Apr 2015 10:20:07 +0200 Subject: [PATCH 22/51] Proxy work in progress, fix typo --- src/opnsense/service/templates/OPNsense/Proxy/squid.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index 3a1b3f20b..57cc95f4c 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -30,7 +30,7 @@ http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} {% for interface in OPNsense.proxy.forward.interfaces.split(",") %} {% for intf_key,intf_item in interfaces.iteritems() %} {% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} -acl localnet src {{intf_item.ipaddr.split(".",3).join(".")}}.0/{{intf_item.subnet}} # Possible internal network +acl localnet src {{intf_item.ipaddr.split(".",3)|join(".")}}.0/{{intf_item.subnet}} # Possible internal network {% endif %} {% endfor %} {% if helpers.exists('virtualip') %} From a07d6e3750580578cd1dd5283d9779a748d1fe64 Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Fri, 24 Apr 2015 10:20:59 +0200 Subject: [PATCH 23/51] Proxy work in progress, fix length of split --- src/opnsense/service/templates/OPNsense/Proxy/squid.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index 57cc95f4c..2251a60f7 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -30,7 +30,7 @@ http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} {% for interface in OPNsense.proxy.forward.interfaces.split(",") %} {% for intf_key,intf_item in interfaces.iteritems() %} {% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} -acl localnet src {{intf_item.ipaddr.split(".",3)|join(".")}}.0/{{intf_item.subnet}} # Possible internal network +acl localnet src {{intf_item.ipaddr.split(".",2)|join(".")}}.0/{{intf_item.subnet}} # Possible internal network {% endif %} {% endfor %} {% if helpers.exists('virtualip') %} From ddc2cd37b0f295454a492480f780527372a18234 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 09:48:51 +0200 Subject: [PATCH 24/51] src: vardb_path zapped --- src/bin/captiveportal_gather_stats.php | 2 +- src/captiveportal/index.php | 5 +- src/etc/inc/captiveportal.inc | 40 ++++++------- src/etc/inc/globals.inc | 1 - src/etc/inc/gwlb.inc | 10 ++-- src/etc/inc/rrd.inc | 2 +- src/etc/inc/upgrade_config.inc | 10 ++-- src/etc/inc/voucher.inc | 59 +++++++++++-------- src/etc/inc/vpn.inc | 6 +- src/etc/rc.newwanip | 8 +-- src/etc/rc.newwanipv6 | 8 +-- src/opnsense/mvc/app/config/config.php | 2 - .../app/models/OPNsense/CaptivePortal/DB.php | 3 +- src/www/diag_backup.php | 4 +- src/www/status_captiveportal_vouchers.php | 5 +- src/www/system_advanced_notifications.php | 5 +- 16 files changed, 87 insertions(+), 83 deletions(-) diff --git a/src/bin/captiveportal_gather_stats.php b/src/bin/captiveportal_gather_stats.php index 922ea7556..0b08c6d92 100644 --- a/src/bin/captiveportal_gather_stats.php +++ b/src/bin/captiveportal_gather_stats.php @@ -49,7 +49,7 @@ $concurrent_users = $no_users; $current_user_count = 0; /* tmp file to use to store old data (per interface)*/ -$tmpfile = "{$g['vardb_path']}/captiveportal_online_users"; +$tmpfile = '/var/db/captiveportal_online_users'; if(empty($type)) exit; diff --git a/src/captiveportal/index.php b/src/captiveportal/index.php index 85787338f..44ebd3c2c 100644 --- a/src/captiveportal/index.php +++ b/src/captiveportal/index.php @@ -121,10 +121,11 @@ if ($macfilter || $passthrumac) { } /* find out if we need RADIUS + RADIUSMAC or not */ -if (file_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db")) { +if (file_exists("/var/db/captiveportal_radius_{$cpzone}.db")) { $radius_enable = TRUE; - if (isset($cpcfg['radmac_enable'])) + if (isset($cpcfg['radmac_enable'])) { $radmac_enable = TRUE; + } } /* find radius context */ diff --git a/src/etc/inc/captiveportal.inc b/src/etc/inc/captiveportal.inc index b82127635..0f4e939a8 100644 --- a/src/etc/inc/captiveportal.inc +++ b/src/etc/inc/captiveportal.inc @@ -401,7 +401,7 @@ function captiveportal_configure_zone($cpcfg) { echo "Starting captive portal({$cpcfg['zone']})... "; /* remove old information */ - unlink_if_exists("{$g['vardb_path']}/captiveportal{$cpzone}.db"); + @unlink("/var/db/captiveportal{$cpzone}.db"); } else captiveportal_syslog("Reconfiguring captive portal({$cpcfg['zone']})."); /* kill any running minicron */ @@ -540,7 +540,7 @@ EOD; ); /* generate radius server database */ - unlink_if_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db"); + @unlink("/var/db/captiveportal_radius_{$cpzone}.db"); captiveportal_init_radius_servers(); if (file_exists("/var/run/booting")) { @@ -565,9 +565,9 @@ EOD; } /* remove old information */ - unlink_if_exists("{$g['vardb_path']}/captiveportal{$cpzone}.db"); - unlink_if_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db"); - unlink_if_exists("{$g['vardb_path']}/captiveportal_{$cpzone}.rules"); + @unlink("/var/db/captiveportal{$cpzone}.db"); + @unlink("/var/db/captiveportal_radius_{$cpzone}.db"); + @unlink("/var/db/captiveportal_{$cpzone}.rules"); /* Release allocated pipes for this zone */ captiveportal_free_dnrules(); @@ -953,7 +953,7 @@ function captiveportal_init_radius_servers() { $radiuskey4 = $config['captiveportal'][$cpzone]['radiuskey4']; $cprdsrvlck = lock("captiveportalradius{$cpzone}", LOCK_EX); - $fd = @fopen("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db", "w"); + $fd = @fopen("/var/db/captiveportal_radius_{$cpzone}.db", "w"); if (!$fd) { captiveportal_syslog("Error: cannot open radius DB file in captiveportal_configure().\n"); unlock($cprdsrvlck); @@ -979,9 +979,9 @@ function captiveportal_get_radius_servers() { global $g, $cpzone; $cprdsrvlck = lock("captiveportalradius{$cpzone}"); - if (file_exists("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db")) { + if (file_exists("/var/db/captiveportal_radius_{$cpzone}.db")) { $radiusservers = array(); - $cpradiusdb = file("{$g['vardb_path']}/captiveportal_radius_{$cpzone}.db", + $cpradiusdb = file("/var/db/captiveportal_radius_{$cpzone}.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if ($cpradiusdb) { foreach($cpradiusdb as $cpradiusentry) { @@ -1103,8 +1103,8 @@ function captiveportal_free_dnrules($rulenos_start = 2000, $rulenos_range_max = global $cpzone; $cpruleslck = lock("captiveportalrulesdn", LOCK_EX); - if (file_exists("{$g['vardb_path']}/captiveportaldn.rules")) { - $rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportaldn.rules")); + if (file_exists("/var/db/captiveportaldn.rules")) { + $rules = unserialize(file_get_contents("/var/db/captiveportaldn.rules")); $ridx = $rulenos_start; while ($ridx < $rulenos_range_max) { if ($rules[$ridx] == $cpzone) { @@ -1115,7 +1115,7 @@ function captiveportal_free_dnrules($rulenos_start = 2000, $rulenos_range_max = } else $ridx += 2; } - file_put_contents("{$g['vardb_path']}/captiveportaldn.rules", serialize($rules)); + file_put_contents("/var/db/captiveportaldn.rules", serialize($rules)); unset($rules); } unlock($cpruleslck); @@ -1126,8 +1126,8 @@ function captiveportal_get_next_dn_ruleno($rulenos_start = 2000, $rulenos_range_ $cpruleslck = lock("captiveportalrulesdn", LOCK_EX); $ruleno = 0; - if (file_exists("{$g['vardb_path']}/captiveportaldn.rules")) { - $rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportaldn.rules")); + if (file_exists("/var/db/captiveportaldn.rules")) { + $rules = unserialize(file_get_contents("/var/db/captiveportaldn.rules")); $ridx = $rulenos_start; while ($ridx < $rulenos_range_max) { if (empty($rules[$ridx])) { @@ -1147,7 +1147,7 @@ function captiveportal_get_next_dn_ruleno($rulenos_start = 2000, $rulenos_range_ $rulenos_start++; $rules[$rulenos_start] = $cpzone; } - file_put_contents("{$g['vardb_path']}/captiveportaldn.rules", serialize($rules)); + file_put_contents("/var/db/captiveportaldn.rules", serialize($rules)); unlock($cpruleslck); unset($rules); @@ -1158,12 +1158,12 @@ function captiveportal_free_dn_ruleno($ruleno) { global $config, $g; $cpruleslck = lock("captiveportalrulesdn", LOCK_EX); - if (file_exists("{$g['vardb_path']}/captiveportaldn.rules")) { - $rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportaldn.rules")); + if (file_exists("/var/db/captiveportaldn.rules")) { + $rules = unserialize(file_get_contents("/var/db/captiveportaldn.rules")); $rules[$ruleno] = false; $ruleno++; $rules[$ruleno] = false; - file_put_contents("{$g['vardb_path']}/captiveportaldn.rules", serialize($rules)); + file_put_contents("/var/db/captiveportaldn.rules", serialize($rules)); unset($rules); } unlock($cpruleslck); @@ -1448,8 +1448,8 @@ function captiveportal_read_usedmacs_db() { global $g, $cpzone; $cpumaclck = lock("captiveusedmacs{$cpzone}"); - if (file_exists("{$g['vardb_path']}/captiveportal_usedmacs_{$cpzone}.db")) { - $usedmacs = file("{$g['vardb_path']}/captiveportal_usedmacs_{$cpzone}.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if (file_exists("/var/db/captiveportal_usedmacs_{$cpzone}.db")) { + $usedmacs = file("/var/db/captiveportal_usedmacs_{$cpzone}.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if (!$usedmacs) $usedmacs = array(); } else @@ -1463,7 +1463,7 @@ function captiveportal_write_usedmacs_db($usedmacs) { global $g, $cpzone; $cpumaclck = lock("captiveusedmacs{$cpzone}", LOCK_EX); - @file_put_contents("{$g['vardb_path']}/captiveportal_usedmacs_{$cpzone}.db", implode("\n", $usedmacs)); + @file_put_contents("/var/db/captiveportal_usedmacs_{$cpzone}.db", implode("\n", $usedmacs)); unlock($cpumaclck); } diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index 510a0400a..2defc9171 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -38,7 +38,6 @@ $g = array( "dhcpd_chroot_path" => "/var/dhcpd", "unbound_chroot_path" => "/var/unbound", "varetc_path" => "/var/etc", - "vardb_path" => "/var/db", "admin_group" => "admins", "product_name" => "OPNsense", "product_website" => "https://opnsense.org", diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc index 071e79f47..c55c44abc 100644 --- a/src/etc/inc/gwlb.inc +++ b/src/etc/inc/gwlb.inc @@ -146,7 +146,7 @@ target default { alarms "down","delay","loss" ## Location of the RRD - #rrd file "{$g['vardb_path']}/rrd/apinger-%t.rrd" + #rrd file "/var/db/rrd/apinger-%t.rrd" } EOD; @@ -324,7 +324,7 @@ EOD; if (isset($gateway['force_down'])) $apingercfg .= "\tforce_down on\n"; - $apingercfg .= " rrd file \"{$g['vardb_path']}/rrd/{$gateway['name']}-quality.rrd\"\n"; + $apingercfg .= " rrd file \"/var/db/rrd/{$gateway['name']}-quality.rrd\"\n"; $apingercfg .= "}\n"; $apingercfg .= "\n"; @@ -334,14 +334,14 @@ EOD; # Create gateway quality RRD with settings more suitable for OPNsense graph set, # since apinger uses default step (300; 5 minutes) and other settings that don't # match the OPNsense gateway quality graph set. - create_gateway_quality_rrd("{$g['vardb_path']}/rrd/{$gateway['name']}-quality.rrd"); + create_gateway_quality_rrd("/var/db/rrd/{$gateway['name']}-quality.rrd"); } @file_put_contents('/var/etc/apinger.conf', $apingerconfig); unset($apingerconfig); @chmod('/tmp', 01777); - @mkdir("{$g['vardb_path']}/rrd", 0775); - @chown("{$g['vardb_path']}/rrd", "nobody"); + @mkdir('/var/db/rrd', 0775); + @chown('/var/db/rrd', 'nobody'); /* Restart apinger process */ if (isvalidpid('/var/run/apinger.pid')) { diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc index 4f705873e..670721c89 100644 --- a/src/etc/inc/rrd.inc +++ b/src/etc/inc/rrd.inc @@ -864,7 +864,7 @@ function enable_rrd_graphing() { $rrdupdatesh .= "done\n"; log_error(gettext("Creating rrd update script")); /* write the rrd update script */ - $updaterrdscript = "{$g['vardb_path']}/rrd/updaterrd.sh"; + $updaterrdscript = '/var/db/rrd/updaterrd.sh'; $fd = fopen("$updaterrdscript", "w"); fwrite($fd, "$rrdupdatesh"); fclose($fd); diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 6b2a00bed..34ec202b9 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -2025,7 +2025,7 @@ function upgrade_054_to_055() { /* Let's save the RRD graphs after we run enable RRD graphing */ /* The function will restore the rrd.tgz so we will save it after */ exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/conf' /usr/local/etc/rc.backup_rrd"); - unlink_if_exists("{$g['vardb_path']}/rrd/*.xml"); + unlink_if_exists("/var/db/rrd/*.xml"); if (file_exists("/var/run/booting")) echo "Updating configuration..."; } @@ -2529,7 +2529,7 @@ function upgrade_077_to_078() { function upgrade_078_to_079() { global $g; /* Delete old and unused RRD file */ - unlink_if_exists("{$g['vardb_path']}/rrd/captiveportal-totalusers.rrd"); + unlink_if_exists("/var/db/rrd/captiveportal-totalusers.rrd"); } function upgrade_079_to_080() { @@ -2967,9 +2967,9 @@ function upgrade_092_to_093() { $suffixes = array("concurrent", "loggedin"); foreach ($suffixes as $suffix) - if (file_exists("{$g['vardb_path']}/rrd/captiveportal-{$suffix}.rrd")) - rename("{$g['vardb_path']}/rrd/captiveportal-{$suffix}.rrd", - "{$g['vardb_path']}/rrd/captiveportal-cpZone-{$suffix}.rrd"); + if (file_exists("/var/db/rrd/captiveportal-{$suffix}.rrd")) + rename("/var/db/rrd/captiveportal-{$suffix}.rrd", + "/var/db/rrd/captiveportal-cpZone-{$suffix}.rrd"); enable_rrd_graphing(); } diff --git a/src/etc/inc/voucher.inc b/src/etc/inc/voucher.inc index fb4ac23eb..e0114707b 100644 --- a/src/etc/inc/voucher.inc +++ b/src/etc/inc/voucher.inc @@ -364,15 +364,19 @@ function voucher_configure_zone($sync = false) /* write bitstring of used vouchers to ramdisk. * Bitstring must already be base64_encoded! */ -function voucher_write_used_db($roll, $vdb) { - global $g, $cpzone; +function voucher_write_used_db($roll, $vdb) +{ + global $cpzone; - $fd = fopen("{$g['vardb_path']}/voucher_{$cpzone}_used_$roll.db", "w"); + $fn = "/var/db/voucher_{$cpzone}_used_{$roll}.db"; + + $fd = fopen($fn, 'w'); if ($fd) { fwrite($fd, $vdb . "\n"); fclose($fd); - } else - voucher_log(LOG_ERR, sprintf(gettext('cant write %1$s/voucher_%s_used_%2$s.db'), $g['vardb_path'], $cpzone, $roll)); + } else { + voucher_log(LOG_ERR, sprintf(gettext('Can\'t write %s'), $fn)); + } } /* return assoc array of active vouchers with activation timestamp @@ -383,7 +387,7 @@ function voucher_read_active_db($roll) { $active = array(); $dirty = 0; - $file = "{$g['vardb_path']}/voucher_{$cpzone}_active_$roll.db"; + $file = "/var/db/voucher_{$cpzone}_active_{$roll}.db"; if (file_exists($file)) { $fd = fopen($file, "r"); if ($fd) { @@ -415,7 +419,7 @@ function voucher_write_active_db($roll, $active) { if (!is_array($active)) return; - $fd = fopen("{$g['vardb_path']}/voucher_{$cpzone}_active_$roll.db", "w"); + $fd = fopen("/var/db/voucher_{$cpzone}_active_{$roll}.db", "w"); if ($fd) { foreach($active as $voucher => $value) fwrite($fd, "$voucher,$value\n"); @@ -442,32 +446,35 @@ function voucher_used_count($roll) { return $used; } -function voucher_read_used_db($roll) { - global $g, $cpzone; +function voucher_read_used_db($roll) +{ + global $cpzone; - $vdb = ""; - $file = "{$g['vardb_path']}/voucher_{$cpzone}_used_$roll.db"; - if (file_exists($file)) { - $fd = fopen($file, "r"); + $fn = "/var/db/voucher_{$cpzone}_used_{$roll}.db"; + $vdb = ''; + + $fd = fopen($fn, 'r'); if ($fd) { - $vdb = trim(fgets($fd)); - fclose($fd); - } else { - voucher_log(LOG_ERR, sprintf(gettext('cant read %1$s/voucher_%s_used_%2$s.db'), $g['vardb_path'], $cpzone, $roll)); - } - } - return base64_decode($vdb); + $vdb = trim(fgets($fd)); + fclose($fd); + } else { + voucher_log(LOG_ERR, sprintf(gettext('Can\'t read %s'), $fn)); + } + + return base64_decode($vdb); } -function voucher_unlink_db($roll) { - global $g, $cpzone; - @unlink("{$g['vardb_path']}/voucher_{$cpzone}_used_$roll.db"); - @unlink("{$g['vardb_path']}/voucher_{$cpzone}_active_$roll.db"); +function voucher_unlink_db($roll) +{ + global $cpzone; + + @unlink("/var/db/voucher_{$cpzone}_used_{$roll}.db"); + @unlink("/var/db/voucher_{$cpzone}_active_{$roll}.db"); } /* we share the log with captiveportal for now */ -function voucher_log($priority, $message) { - +function voucher_log($priority, $message) +{ $message = trim($message); openlog("logportalauth", LOG_PID, LOG_LOCAL4); syslog($priority, sprintf(gettext("Voucher: %s"),$message)); diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc index f8495cc23..723bcff3a 100644 --- a/src/etc/inc/vpn.inc +++ b/src/etc/inc/vpn.inc @@ -88,8 +88,8 @@ function vpn_ipsec_configure($ipchg = false) global $config, $g, $sa, $sn, $p1_ealgos, $p2_ealgos; /* get the automatic ping_hosts.sh ready */ - unlink_if_exists("{$g['vardb_path']}/ipsecpinghosts"); - touch("{$g['vardb_path']}/ipsecpinghosts"); + @unlink('/var/db/ipsecpinghosts'); + touch('/var/db/ipsecpinghosts'); vpn_ipsec_configure_preferoldsa(); @@ -256,7 +256,7 @@ function vpn_ipsec_configure($ipchg = false) } } } - @file_put_contents("{$g['vardb_path']}/ipsecpinghosts", $ipsecpinghosts); + @file_put_contents('/var/db/ipsecpinghosts', $ipsecpinghosts); unset($ipsecpinghosts); } unset($iflist); diff --git a/src/etc/rc.newwanip b/src/etc/rc.newwanip index db6340aec..c859d199d 100755 --- a/src/etc/rc.newwanip +++ b/src/etc/rc.newwanip @@ -95,15 +95,15 @@ if ($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) { $oldip = "0.0.0.0"; -if (file_exists("{$g['vardb_path']}/{$interface}_cacheip")) - $oldip = file_get_contents("{$g['vardb_path']}/{$interface}_cacheip"); +if (file_exists("/var/db/{$interface}_cacheip")) + $oldip = file_get_contents("/var/db/{$interface}_cacheip"); /* regenerate resolv.conf if DNS overrides are allowed */ system_resolvconf_generate(true); /* write the current interface IP to file */ if (is_ipaddr($curwanip)) - @file_put_contents("{$g['vardb_path']}/{$interface}_ip", $curwanip); + @file_put_contents("/var/db/{$interface}_ip", $curwanip); link_interface_to_vips($interface, "update"); @@ -174,7 +174,7 @@ if (!is_ipaddr($oldip) || $curwanip != $oldip || !is_ipaddrv4($config['interface setup_gateways_monitor(); if (is_ipaddr($curwanip)) - @file_put_contents("{$g['vardb_path']}/{$interface}_cacheip", $curwanip); + @file_put_contents("/var/db/{$interface}_cacheip", $curwanip); /* perform RFC 2136 DNS update */ services_dnsupdate_process($interface); diff --git a/src/etc/rc.newwanipv6 b/src/etc/rc.newwanipv6 index 5c9b41c90..b362da24f 100755 --- a/src/etc/rc.newwanipv6 +++ b/src/etc/rc.newwanipv6 @@ -95,13 +95,13 @@ if (!empty($new_domain_name)) /* write current WAN IPv6 to file */ if (is_ipaddrv6($curwanipv6)) - @file_put_contents("{$g['vardb_path']}/{$interface}_ipv6", $curwanipv6); + @file_put_contents("/var/db/{$interface}_ipv6", $curwanipv6); log_error("rc.newwanipv6: on (IP address: {$curwanipv6}) (interface: {$interface}) (real interface: {$interface_real})."); $oldipv6 = ""; -if (file_exists("{$g['vardb_path']}/{$interface}_cacheipv6")) - $oldipv6 = file_get_contents("{$g['vardb_path']}/{$interface}_cacheipv6"); +if (file_exists("/var/db/{$interface}_cacheipv6")) + $oldipv6 = file_get_contents("/var/db/{$interface}_cacheipv6"); $grouptmp = link_interface_to_group($interface); if (!empty($grouptmp)) @@ -136,7 +136,7 @@ if (is_ipaddrv6($oldipv6)) { } else if (does_interface_exist($interface_real)) mwexec("/sbin/ifconfig {$interface_real} inet6 {$oldipv6} delete"); - file_put_contents("{$g['vardb_path']}/{$interface}_cacheipv6", $curwanipv6); + file_put_contents("/var/db/{$interface}_cacheipv6", $curwanipv6); } /* perform RFC 2136 DNS update */ diff --git a/src/opnsense/mvc/app/config/config.php b/src/opnsense/mvc/app/config/config.php index 1d8c8bfb1..7bae63091 100644 --- a/src/opnsense/mvc/app/config/config.php +++ b/src/opnsense/mvc/app/config/config.php @@ -20,9 +20,7 @@ return new \Phalcon\Config(array( 'globals' => array( 'config_path' => '/conf/', 'temp_path' => '/tmp/', - 'vardb_path' => '/var/db/', 'debug' => false, 'simulate_mode' => false - ) )); diff --git a/src/opnsense/mvc/app/models/OPNsense/CaptivePortal/DB.php b/src/opnsense/mvc/app/models/OPNsense/CaptivePortal/DB.php index ae600f004..7495920b6 100644 --- a/src/opnsense/mvc/app/models/OPNsense/CaptivePortal/DB.php +++ b/src/opnsense/mvc/app/models/OPNsense/CaptivePortal/DB.php @@ -122,8 +122,7 @@ class DB public function open() { // open database - $db_path = FactoryDefault::getDefault()->get('config')->globals->vardb_path . - "/captiveportal" . $this->zone . ".db"; + $db_path = "/var/db/captiveportal{$this->zone}.db"; try { $this->handle = new Sqlite(array("dbname" => $db_path)); diff --git a/src/www/diag_backup.php b/src/www/diag_backup.php index 50d3ad19f..9d50a814e 100644 --- a/src/www/diag_backup.php +++ b/src/www/diag_backup.php @@ -75,7 +75,7 @@ function restore_rrddata() { global $config, $g, $rrdtool, $input_errors; foreach($config['rrddata']['rrddatafile'] as $rrd) { if ($rrd['xmldata']) { - $rrd_file = "{$g['vardb_path']}/rrd/{$rrd['filename']}"; + $rrd_file = "/var/db/rrd/{$rrd['filename']}"; $xml_file = preg_replace('/\.rrd$/', ".xml", $rrd_file); if (file_put_contents($xml_file, gzinflate(base64_decode($rrd['xmldata']))) === false) { log_error("Cannot write $xml_file"); @@ -91,7 +91,7 @@ function restore_rrddata() { unlink($xml_file); } else if ($rrd['data']) { - $rrd_file = "{$g['vardb_path']}/rrd/{$rrd['filename']}"; + $rrd_file = "/var/db/rrd/{$rrd['filename']}"; $rrd_fd = fopen($rrd_file, "w"); if (!$rrd_fd) { log_error("Cannot write $rrd_file"); diff --git a/src/www/status_captiveportal_vouchers.php b/src/www/status_captiveportal_vouchers.php index 635b82800..93bfe1a64 100644 --- a/src/www/status_captiveportal_vouchers.php +++ b/src/www/status_captiveportal_vouchers.php @@ -65,10 +65,11 @@ foreach($a_roll as $rollent) { $roll = $rollent['number']; $minutes = $rollent['minutes']; - if (!file_exists("{$g['vardb_path']}/voucher_{$cpzone}_active_$roll.db")) + if (!file_exists("/var/db/voucher_{$cpzone}_active_{$roll}.db")) { continue; + } - $active_vouchers = file("{$g['vardb_path']}/voucher_{$cpzone}_active_$roll.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + $active_vouchers = file("/var/db/voucher_{$cpzone}_active_{$roll}.db", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach($active_vouchers as $voucher => $line) { list($voucher,$timestamp, $minutes) = explode(",", $line); $remaining = (($timestamp + 60*$minutes) - time()); diff --git a/src/www/system_advanced_notifications.php b/src/www/system_advanced_notifications.php index f476d5e54..074653bf9 100644 --- a/src/www/system_advanced_notifications.php +++ b/src/www/system_advanced_notifications.php @@ -136,15 +136,14 @@ if ($_POST) { // Send test message via growl if($config['notifications']['growl']['ipaddress'] && $config['notifications']['growl']['password'] = $_POST['password']) { - unlink_if_exists($g['vardb_path'] . "/growlnotices_lastmsg.txt"); + @unlink('/var/db/growlnotices_lastmsg.txt'); register_via_growl(); notify_via_growl(sprintf(gettext("This is a test message from %s. It is safe to ignore this message."), $g['product_name']), true); } } if ($_POST['test_smtp'] == gettext("Test SMTP")) { // Send test message via smtp - if(file_exists("/var/db/notices_lastmsg.txt")) - unlink("/var/db/notices_lastmsg.txt"); + @unlink('/var/db/notices_lastmsg.txt'); $savemsg = notify_via_smtp(sprintf(gettext("This is a test message from %s. It is safe to ignore this message."), $g['product_name']), true); } } From 1832a5a385e85de4d237b38f5514a19eba5a3bf5 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 10:12:48 +0200 Subject: [PATCH 25/51] src: zap easy occurrences of unlink_if_exists() ... and refactor the code left and right. Someone's got to do it. --- src/etc/inc/auth.inc | 32 ++++++++++++------------------- src/etc/inc/interfaces.inc | 4 ++-- src/etc/inc/notices.inc | 9 ++------- src/etc/inc/openvpn.inc | 26 +++++++++---------------- src/etc/inc/pfsense-utils.inc | 13 +++++++------ src/etc/inc/rrd.inc | 4 ++-- src/etc/inc/services.inc | 4 ++-- src/etc/inc/system.inc | 15 +++++++-------- src/etc/inc/upgrade_config.inc | 25 ++++++++++++------------ src/etc/inc/vpn.inc | 6 +++--- src/etc/inc/vslb.inc | 2 +- src/pkg/openvpn-client-export.inc | 6 +++--- src/www/diag_confbak.php | 2 +- src/www/firewall_aliases_edit.php | 2 +- src/www/status_rrd_graph_img.php | 4 ++-- 15 files changed, 66 insertions(+), 88 deletions(-) diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index e6e22ba47..fa84e5eb9 100644 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -342,9 +342,8 @@ function local_sync_accounts() * If a crontab was created to user, pw userdel will be interactive and * can cause issues. Just remove crontab before run it when necessary */ - unlink_if_exists("/var/cron/tabs/{$line[0]}"); - $cmd = "/usr/sbin/pw userdel -n '{$line[0]}'"; - mwexec($cmd); + @unlink("/var/cron/tabs/{$line[0]}"); + mwexecf('/usr/sbin/pw userdel -n %s', $line[0]); } pclose($fd); } @@ -364,8 +363,7 @@ function local_sync_accounts() if ($line[2] > 65000) { continue; } - $cmd = "/usr/sbin/pw groupdel {$line[2]}"; - mwexec($cmd); + mwexecf('/usr/sbin/pw groupdel %s', $line[2]); } pclose($fd); } @@ -477,12 +475,11 @@ function local_user_set(&$user) $keys = base64_decode($user['authorizedkeys']); @file_put_contents("{$user_home}/.ssh/authorized_keys", $keys); @chown("{$user_home}/.ssh/authorized_keys", $user_name); - } else - unlink_if_exists("{$user_home}/.ssh/authorized_keys"); - - $un = $lock_account ? "" : "un"; - exec("/usr/sbin/pw {$un}lock {$user_name} -q"); + } else { + @unlink("{$user_home}/.ssh/authorized_keys"); + } + mwexecf('/usr/sbin/pw %s %s -q', array($lock_account ? 'lock' : 'unlock', $user_name)); } function local_user_del($user) @@ -622,23 +619,20 @@ function local_group_set($group, $reset = false) pclose($fd); /* determine add or mod */ - if (!strncmp($pwread, "pw:", 3)) + if (!strncmp($pwread, "pw:", 3)) { $group_op = "groupadd"; - else + } else { $group_op = "groupmod"; + } /* add or mod group db */ - $cmd = "/usr/sbin/pw {$group_op} {$group_name} -g {$group_gid} -M {$group_members} 2>&1"; - - mwexec($cmd); - + mwexecf('/usr/sbin/pw %s %s -g %s -M %s', array($group_op, $group_name, $group_gid, $group_members)); } function local_group_del($group) { /* delete from group db */ - $cmd = "/usr/sbin/pw groupdel {$group['name']}"; - mwexec($cmd); + mwexecf('/usr/sbin/pw groupdel %s', $group['name']); } function ldap_test_connection($authcfg) @@ -1462,5 +1456,3 @@ function http_basic_auth($http_auth_header) // not authenticated return false; } - -?> diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 81441c437..f030bdc93 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -2371,7 +2371,7 @@ function interface_wireless_configure($if, &$wl, &$wlcfg) { */ // Remove script file - unlink_if_exists("/tmp/{$if}_setup.sh"); + @unlink("/tmp/{$if}_setup.sh"); // Clone wireless nic if needed. interface_wireless_clone($if, $wl); @@ -5198,7 +5198,7 @@ EOD; chmod($cron_file, 0755); killbypid('/var/run/cron.pid', 'HUP'); } else { - unlink_if_exists($cron_file); + @unlink($cron_file); } } diff --git a/src/etc/inc/notices.inc b/src/etc/inc/notices.inc index 269d4a7d2..053a9b034 100644 --- a/src/etc/inc/notices.inc +++ b/src/etc/inc/notices.inc @@ -128,7 +128,7 @@ function close_notice($id) $ids = array(); if(!$notices = get_notices()) return; if($id == "all") { - unlink_if_exists('/tmp/notices'); + @unlink('/tmp/notices'); return; } foreach(array_keys($notices) as $time) { @@ -151,13 +151,10 @@ function close_notice($id) fwrite($queueout, serialize($notices)); fclose($queueout); } else { - unlink_if_exists('/tmp/notices'); + @unlink('/tmp/notices'); } - - return; } - /****f* notices/print_notices * NAME * print_notices @@ -360,5 +357,3 @@ function notify_all_remote($msg) { notify_via_smtp($msg); notify_via_growl($msg); } - -?> diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc index 64a2ffdff..8c4c42faa 100644 --- a/src/etc/inc/openvpn.inc +++ b/src/etc/inc/openvpn.inc @@ -873,14 +873,9 @@ function openvpn_delete($mode, & $settings) @array_map('unlink', glob("{$g['varetc_path']}/openvpn/{$mode_id}.*")); } -function openvpn_cleanup_csc($common_name) { - global $g, $config; - if (empty($common_name)) - return; - $fpath = "{$g['varetc_path']}/openvpn-csc/" . basename($common_name); - if (is_file($fpath)) - unlink_if_exists($fpath); - return; +function openvpn_cleanup_csc($common_name) +{ + @unlink('/var/etc/openvpn-csc/' . basename($common_name)); } function openvpn_resync_csc(& $settings) { @@ -889,7 +884,7 @@ function openvpn_resync_csc(& $settings) { $fpath = $g['varetc_path']."/openvpn-csc/".$settings['common_name']; if (isset($settings['disable'])) { - unlink_if_exists($fpath); + @unlink($fpath); return; } openvpn_create_dirs(); @@ -941,20 +936,17 @@ function openvpn_resync_csc(& $settings) { chgrp($fpath, 'nobody'); } -function openvpn_delete_csc(& $settings) { - global $g, $config; - - $fpath = $g['varetc_path']."/openvpn-csc/".$settings['common_name']; - unlink_if_exists($fpath); +function openvpn_delete_csc(&$settings) +{ + @unlink("/var/etc/openvpn-csc/{$settings['common_name']}"); } -// Resync the configuration and restart the VPN -function openvpn_resync($mode, $settings) { +function openvpn_resync($mode, $settings) +{ openvpn_reconfigure($mode, $settings); openvpn_restart($mode, $settings); } -// Resync and restart all VPNs function openvpn_resync_all($interface = '') { global $g, $config; diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index dbe6dda39..d47f8577f 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -686,8 +686,8 @@ function reload_all_sync() { system_ntp_configure(); /* sync pw database */ - unlink_if_exists("/etc/spwd.db.tmp"); - mwexec("/usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd"); + @unlink('/etc/spwd.db.tmp'); + mwexec('/usr/sbin/pwd_mkdb -d /etc/ /etc/master.passwd'); /* restart sshd */ mwexec_bg('/usr/local/etc/rc.sshd'); @@ -1657,18 +1657,19 @@ function process_alias_urltable($name, $url, $freq, $forceupdate=false) { || $forceupdate) { // Try to fetch the URL supplied - unlink_if_exists($urltable_filename . ".tmp"); + @unlink("{$urltable_filename}.tmp"); $verify_ssl = isset($config['system']['checkaliasesurlcert']); - if (download_file($url, $urltable_filename . ".tmp", $verify_ssl)) { + if (download_file($url, "{$urltable_filename}.tmp", $verify_ssl)) { mwexec("/usr/bin/sed -E 's/\;.*//g; /^[[:space:]]*($|#)/d' ". escapeshellarg($urltable_filename . ".tmp") . " > " . escapeshellarg($urltable_filename)); if (alias_get_type($name) == "urltable_ports") { $ports = explode("\n", file_get_contents($urltable_filename)); $ports = group_ports($ports); file_put_contents($urltable_filename, implode("\n", $ports)); } - unlink_if_exists($urltable_filename . ".tmp"); - } else + @unlink("{$urltable_filename}.tmp"); + } else { touch($urltable_filename); + } return true; } else { // File exists, and it doesn't need updated. diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc index 670721c89..c99ae9053 100644 --- a/src/etc/inc/rrd.inc +++ b/src/etc/inc/rrd.inc @@ -30,7 +30,7 @@ function dump_rrd_to_xml($rrddatabase, $xmldumpfile) { $rrdtool = '/usr/local/bin/rrdtool'; - unlink_if_exists($xmldumpfile); + @unlink($xmldumpfile); exec("$rrdtool dump " . escapeshellarg($rrddatabase) . " {$xmldumpfile} 2>&1", $dumpout, $dumpret); if ($dumpret <> 0) { @@ -77,7 +77,7 @@ function restore_rrd() } /* If this backup is still there on a full install, but we aren't going to use ram disks, remove the archive since this is a transition. */ if (!isset($config['system']['use_mfs_tmpvar'])) { - unlink_if_exists('/conf/rrd.tgz'); + @unlink('/conf/rrd.tgz'); } return true; } diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index 14651eea0..db129402e 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -388,7 +388,7 @@ function services_dhcpdv4_configure() } /* If this backup is still there on a full install, but we aren't going to use ram disks, remove the archive since this is a transition. */ if (!isset($config['system']['use_mfs_tmpvar'])) { - unlink_if_exists('/conf/dhcpleases.tgz'); + @unlink('/conf/dhcpleases.tgz'); } } @@ -1008,7 +1008,7 @@ function services_dhcpdv6_configure($blacklist = array()) } /* If this backup is still there on a full install, but we aren't going to use ram disks, remove the archive since this is a transition. */ if (isset($config['system']['use_mfs_tmpvar'])) { - unlink_if_exists('/conf/dhcp6leases.tgz'); + @unlink('/conf/dhcp6leases.tgz'); } } diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 5732f8de8..8dd2c2d80 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -1264,7 +1264,7 @@ function system_ntp_setup_gps($serialport) { return false; // Create symlink that ntpd requires - unlink_if_exists($gps_device); + @unlink($gps_device); symlink($serialport, $gps_device); /* Send the following to the GPS port to initialize the GPS */ @@ -1306,23 +1306,22 @@ function system_ntp_setup_gps($serialport) { return true; } -function system_ntp_setup_pps($serialport) { - global $config, $g; - +function system_ntp_setup_pps($serialport) +{ $pps_device = '/dev/pps0'; - $serialport = '/dev/'.$serialport; + $serialport = "/dev/{$serialport}"; - if (!file_exists($serialport)) + if (!file_exists($serialport)) { return false; + } // Create symlink that ntpd requires - unlink_if_exists($pps_device); + @unlink($pps_device); @symlink($serialport, $pps_device); return true; } - function system_ntp_configure($start_ntpd = true) { global $config, $g; diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 34ec202b9..6ccee0725 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -2030,7 +2030,6 @@ function upgrade_054_to_055() { echo "Updating configuration..."; } - function upgrade_055_to_056() { global $config; @@ -2526,10 +2525,10 @@ function upgrade_077_to_078() { $config['pptpd']['n_pptp_units'] = empty($config['pptpd']['n_pptp_units']) ? 16 : $config['pptpd']['n_pptp_units']; } } -function upgrade_078_to_079() { - global $g; +function upgrade_078_to_079() +{ /* Delete old and unused RRD file */ - unlink_if_exists("/var/db/rrd/captiveportal-totalusers.rrd"); + @unlink('/var/db/rrd/captiveportal-totalusers.rrd'); } function upgrade_079_to_080() { @@ -2692,8 +2691,8 @@ function upgrade_080_to_081() { mwexec("$rrdtool restore -f /tmp/{$xmldumpnew} {$rrddbpath}/{$database} 2>&1"); unset($xml); # Default /tmp tmpfs is ~40mb, do not leave temp files around - unlink_if_exists("/tmp/{$xmldump}"); - unlink_if_exists("/tmp/{$xmldumpnew}"); + @unlink("/tmp/{$xmldump}"); + @unlink("/tmp/{$xmldumpnew}"); } enable_rrd_graphing(); /* Let's save the RRD graphs after we run enable RRD graphing */ @@ -3254,13 +3253,13 @@ function upgrade_110_to_111() mwexec('/usr/sbin/pw useradd -n unbound -c "Unbound DNS Resolver" -d /var/unbound -s /usr/sbin/nologin -u 59 -g 59', true); /* cleanup old unbound package stuffs */ - unlink_if_exists("/usr/local/pkg/unbound.xml"); - unlink_if_exists("/usr/local/pkg/unbound.inc"); - unlink_if_exists("/usr/local/pkg/unbound_advanced.xml"); - unlink_if_exists("/usr/local/www/unbound_status.php"); - unlink_if_exists("/usr/local/www/unbound_acls.php"); - unlink_if_exists("/usr/local/bin/unbound_monitor.sh"); - unlink_if_exists("/usr/local/etc/rc.d/unbound.sh"); + @unlink('/usr/local/pkg/unbound.xml'); + @unlink('/usr/local/pkg/unbound.inc'); + @unlink('/usr/local/pkg/unbound_advanced.xml'); + @unlink('/usr/local/www/unbound_status.php'); + @unlink('/usr/local/www/unbound_acls.php'); + @unlink('/usr/local/bin/unbound_monitor.sh'); + @unlink('/usr/local/etc/rc.d/unbound.sh'); /* Remove old menu and service entries */ if (isset($config['installedpackages']['menu']) && is_array($config['installedpackages']['menu'])) { diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc index 723bcff3a..9bcdf55d4 100644 --- a/src/etc/inc/vpn.inc +++ b/src/etc/inc/vpn.inc @@ -937,9 +937,9 @@ function vpn_pptpd_configure() { } /* remove mpd.conf, if it exists */ - unlink_if_exists("{$g['varetc_path']}/pptp-vpn/mpd.conf"); - unlink_if_exists("{$g['varetc_path']}/pptp-vpn/mpd.links"); - unlink_if_exists("{$g['varetc_path']}/pptp-vpn/mpd.secret"); + @unlink('/var/etc/pptp-vpn/mpd.conf'); + @unlink('/var/etc/pptp-vpn/mpd.links'); + @unlink('/var/etc/pptp-vpn/mpd.secret'); } if (empty($pptpdcfg['n_pptp_units'])) { diff --git a/src/etc/inc/vslb.inc b/src/etc/inc/vslb.inc index 65a4937f3..b209d9eeb 100644 --- a/src/etc/inc/vslb.inc +++ b/src/etc/inc/vslb.inc @@ -557,5 +557,5 @@ function cleanup_lb_marked() } } - unlink_if_exists($filename); + @unlink($filename); } diff --git a/src/pkg/openvpn-client-export.inc b/src/pkg/openvpn-client-export.inc index 35c894e64..04f44582b 100644 --- a/src/pkg/openvpn-client-export.inc +++ b/src/pkg/openvpn-client-export.inc @@ -63,9 +63,9 @@ function openvpn_client_export_deinstall() $ovpndir = "/usr/local/share/openvpn"; $workdir = "{$ovpndir}/client-export"; - unlink_if_exists("/usr/local/www/{$phpfile}"); - unlink_if_exists("/usr/local/www/{$phpfile2}"); - unlink_if_exists("/usr/local/pkg/openvpn-client-export-{$current_openvpn_version}.tgz"); + @unlink("/usr/local/www/{$phpfile}"); + @unlink("/usr/local/www/{$phpfile2}"); + @unlink("/usr/local/pkg/openvpn-client-export-{$current_openvpn_version}.tgz"); exec("/bin/rm -r {$workdir}"); } diff --git a/src/www/diag_confbak.php b/src/www/diag_confbak.php index fdc7cf79f..5455adb1e 100644 --- a/src/www/diag_confbak.php +++ b/src/www/diag_confbak.php @@ -55,7 +55,7 @@ if (isset($_POST['backupcount'])) { $savemsg = gettext("Unable to revert to the selected configuration."); } if($_POST['rmver'] != "") { - unlink_if_exists('/conf/backup/config-' . $_POST['rmver'] . '.xml'); + @unlink('/conf/backup/config-' . $_POST['rmver'] . '.xml'); $savemsg = sprintf(gettext('Deleted backup with timestamp %1$s and description "%2$s".'), date(gettext("n/j/y H:i:s"), $_POST['rmver']),$confvers[$_POST['rmver']]['description']); } } diff --git a/src/www/firewall_aliases_edit.php b/src/www/firewall_aliases_edit.php index adb04fe80..47a337180 100755 --- a/src/www/firewall_aliases_edit.php +++ b/src/www/firewall_aliases_edit.php @@ -194,7 +194,7 @@ if ($_POST) { /* fetch down and add in */ $isfirst = 0; $temp_filename = tempnam('/tmp/', 'alias_import'); - unlink_if_exists($temp_filename); + @unlink($temp_filename); $verify_ssl = isset($config['system']['checkaliasesurlcert']); mkdir($temp_filename); download_file($_POST['address' . $x], $temp_filename . "/aliases", $verify_ssl); diff --git a/src/www/status_rrd_graph_img.php b/src/www/status_rrd_graph_img.php index 1fef5476f..bbe3803a9 100644 --- a/src/www/status_rrd_graph_img.php +++ b/src/www/status_rrd_graph_img.php @@ -1236,14 +1236,14 @@ if(($graphcmdreturn <> 0) || (! $data)) { log_error(sprintf(gettext('Failed to create graph with error code %1$s, the error is: %2$s'),$graphcmdreturn,$graphcmdoutput)); if(strstr($curdatabase, "queues")) { log_error(sprintf(gettext("failed to create graph from %s%s, removing database"),$rrddbpath,$curdatabase)); - unlink_if_exists($rrddbpath . $curif . $queues); + @unlink($rrddbpath . $curif . $queues); flush(); usleep(500); enable_rrd_graphing(); } if(strstr($curdatabase, "queuesdrop")) { log_error(sprintf(gettext("failed to create graph from %s%s, removing database"),$rrddbpath,$curdatabase)); - unlink_if_exists($rrddbpath . $curdatabase); + @unlink($rrddbpath . $curdatabase); flush(); usleep(500); enable_rrd_graphing(); From ae8d44faa2f0f7f41483e268697ea801e31808ce Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 10:20:35 +0200 Subject: [PATCH 26/51] src: remove globbing-related unlink_if_exists() usage --- src/etc/inc/config.lib.inc | 5 +++-- src/etc/inc/upgrade_config.inc | 5 +++-- src/etc/inc/util.inc | 15 --------------- src/www/firewall_shaper_wizards.php | 4 ++-- 4 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index 57b8e9bf0..84a2a3fc6 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -204,7 +204,7 @@ function write_config($desc = 'Unknown', $backup = true) ******/ function reset_factory_defaults($sync = true) { - unlink_if_exists('/conf/*' . $filename); + mwexec('/bin/rm -r /conf/*'); disable_security_checks(); setup_serial_port(); @@ -217,7 +217,8 @@ function reset_factory_defaults($sync = true) } } -function config_restore($conffile) { +function config_restore($conffile) +{ global $config, $g; if (!file_exists($conffile)) diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc index 6ccee0725..d21a322b9 100644 --- a/src/etc/inc/upgrade_config.inc +++ b/src/etc/inc/upgrade_config.inc @@ -2025,9 +2025,10 @@ function upgrade_054_to_055() { /* Let's save the RRD graphs after we run enable RRD graphing */ /* The function will restore the rrd.tgz so we will save it after */ exec("cd /; LANG=C NO_REMOUNT=1 RRDDBPATH='{$rrddbpath}' CF_CONF_PATH='/conf' /usr/local/etc/rc.backup_rrd"); - unlink_if_exists("/var/db/rrd/*.xml"); - if (file_exists("/var/run/booting")) + mwexec('/bin/rm /var/db/rrd/*.xml'); + if (file_exists("/var/run/booting")) { echo "Updating configuration..."; + } } function upgrade_055_to_056() { diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc index 0102129c8..8d91d25a8 100644 --- a/src/etc/inc/util.inc +++ b/src/etc/inc/util.inc @@ -1034,21 +1034,6 @@ function mwexec_bg($command, $mute = false, $clearsigmask = false) mwexec("/usr/sbin/daemon -f {$command}", $mute, $clearsigmask); } -/* unlink a file or directory, if it exists */ -function unlink_if_exists($fn) -{ - $to_do = glob($fn); - - foreach($to_do as $filename) { - if (is_dir($filename)) { - /* rmdir() is not recursive... */ - mwexecf('/bin/rm -r %s', $filename); - } else { - unlink($filename); - } - } -} - /* make a global alias table (for faster lookups) */ function alias_make_table($config) { diff --git a/src/www/firewall_shaper_wizards.php b/src/www/firewall_shaper_wizards.php index b0031ae05..9f5d41bdb 100644 --- a/src/www/firewall_shaper_wizards.php +++ b/src/www/firewall_shaper_wizards.php @@ -52,8 +52,8 @@ if ($_POST['apply']) { $savemsg = $retval; /* reset rrd queues */ - unlink_if_exists("/var/db/rrd/*queuedrops.rrd"); - unlink_if_exists("/var/db/rrd/*queues.rrd"); + mwexec('/bin/rm /var/db/rrd/*queuedrops.rrd'); + mwexec('/bin/rm /var/db/rrd/*queues.rrd'); enable_rrd_graphing(); clear_subsystem_dirty('shaper'); From 721ba189678038ccb15b7f474b4c4d1846e7e1ab Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Fri, 24 Apr 2015 10:25:58 +0200 Subject: [PATCH 27/51] Proxy work in progress, subnet fix final --- src/opnsense/service/templates/OPNsense/Proxy/squid.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index 2251a60f7..b8688dccc 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -30,7 +30,7 @@ http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} {% for interface in OPNsense.proxy.forward.interfaces.split(",") %} {% for intf_key,intf_item in interfaces.iteritems() %} {% if intf_key == interface and intf_item.ipaddr != 'dhcp' %} -acl localnet src {{intf_item.ipaddr.split(".",2)|join(".")}}.0/{{intf_item.subnet}} # Possible internal network +acl localnet src {{intf_item.ipaddr.split(".")[0:3]|join(".")}}.0/{{intf_item.subnet}} # Possible internal network {% endif %} {% endfor %} {% if helpers.exists('virtualip') %} From 501c35d40746f9ce89648cb2edc388a1d29efb40 Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Fri, 24 Apr 2015 10:31:51 +0200 Subject: [PATCH 28/51] Proxy work in progress, test config --- src/opnsense/service/templates/OPNsense/Proxy/squid.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index b8688dccc..2d0c90bdc 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -49,8 +49,8 @@ acl localnet src fc00::/7 # RFC 4193 local private network range acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines # Default localhost and to_localhost acl's -acl localhost src 127.0.0.1/32 ::1 -acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 +#acl localhost src 127.0.0.1/32 ::1 +#acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 # ACL lists {% if helpers.exists('OPNsense.proxy.forward.acl.allowedSubnets') %} From 07a1b9208edd54d0f3be58f7aec623faeaf93e69 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 10:40:26 +0200 Subject: [PATCH 29/51] src: replace varetc_path --- src/etc/inc/dyndns.class | 2 +- src/etc/inc/rrd.inc | 2 +- src/etc/inc/vpn.inc | 86 ++++++++------------- src/etc/rc.newwanipv6 | 4 +- src/etc/rc.openvpn | 2 +- src/www/services_captiveportal_vouchers.php | 14 ++-- src/www/status_openvpn.php | 2 +- src/www/vpn_pppoe.php | 3 +- src/www/widgets/widgets/openvpn.widget.php | 3 +- 9 files changed, 51 insertions(+), 67 deletions(-) diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class index 0319f6445..4734e740d 100644 --- a/src/etc/inc/dyndns.class +++ b/src/etc/inc/dyndns.class @@ -139,7 +139,7 @@ $this->_cacheFile = "/conf/dyndns_{$dnsIf}{$dnsService}" . escapeshellarg($dnsHost) . "{$dnsID}.cache"; $this->_cacheFile_v6 = "/conf/dyndns_{$dnsIf}{$dnsService}" . escapeshellarg($dnsHost) . "{$dnsID}_v6.cache"; - $this->_debugFile = "{$g['varetc_path']}/dyndns_{$dnsIf}{$dnsService}" . escapeshellarg($dnsHost) . "{$dnsID}.debug"; + $this->_debugFile = "/var/etc/dyndns_{$dnsIf}{$dnsService}" . escapeshellarg($dnsHost) . "{$dnsID}.debug"; $this->_curlIpresolveV4 = $curlIpresolveV4; $this->_curlSslVerifypeer = $curlSslVerifypeer; diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc index c99ae9053..f6fba806c 100644 --- a/src/etc/inc/rrd.inc +++ b/src/etc/inc/rrd.inc @@ -441,7 +441,7 @@ function enable_rrd_graphing() { $rrdupdatesh .= " sleep 0.2\n"; $rrdupdatesh .= " echo \"quit\"\n"; $rrdupdatesh .= "}\n"; - $rrdupdatesh .= "OVPN=`list_current_users | nc -U {$g['varetc_path']}/openvpn/server{$vpnid}.sock | awk -F\",\" '/^CLIENT_LIST/ {print \$2}' | wc -l | awk '{print $1}'`\n"; + $rrdupdatesh .= "OVPN=`list_current_users | nc -U /var/etc/openvpn/server{$vpnid}.sock | awk -F\",\" '/^CLIENT_LIST/ {print \$2}' | wc -l | awk '{print $1}'`\n"; $rrdupdatesh .= "$rrdtool update $rrddbpath$ifname$vpnusers N:\${OVPN}\n"; } diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc index 9bcdf55d4..d9fef2615 100644 --- a/src/etc/inc/vpn.inc +++ b/src/etc/inc/vpn.inc @@ -120,26 +120,17 @@ function vpn_ipsec_configure($ipchg = false) mwexec("/sbin/ifconfig enc0 up"); set_single_sysctl("net.inet.ip.ipsec_in_use", "1"); - /* needed for config files */ - if (!is_dir("/usr/local/etc/ipsec.d")) - mkdir("/usr/local/etc/ipsec.d"); - if (!is_dir($capath)) - mkdir($capath); - if (!is_dir($keypath)) - mkdir($keypath); - if (!is_dir("/usr/local/etc/ipsec.d/crls")) - mkdir("/usr/local/etc/ipsec.d/crls"); - if (!is_dir($certpath)) - mkdir($certpath); - if (!is_dir("/usr/local/etc/ipsec.d/aacerts")) - mkdir("/usr/local/etc/ipsec.d/aacerts"); - if (!is_dir("/usr/local/etc/ipsec.d/acerts")) - mkdir("/usr/local/etc/ipsec.d/acerts"); - if (!is_dir("/usr/local/etc/ipsec.d/ocspcerts")) - mkdir("/usr/local/etc/ipsec.d/ocspcerts"); - if (!is_dir("/usr/local/etc/ipsec.d/reqs")) - mkdir("/usr/local/etc/ipsec.d/reqs"); + /* needed directories for config files */ + @mkdir($capath); + @mkdir($keypath); + @mkdir($certpath); + @mkdir('/usr/local/etc/ipsec.d'); + @mkdir('/usr/local/etc/ipsec.d/crls'); + @mkdir('/usr/local/etc/ipsec.d/aacerts'); + @mkdir('/usr/local/etc/ipsec.d/acerts'); + @mkdir('/usr/local/etc/ipsec.d/ocspcerts'); + @mkdir('/usr/local/etc/ipsec.d/reqs'); if (file_exists("/var/run/booting")) echo gettext("Configuring IPsec VPN... "); @@ -948,13 +939,12 @@ function vpn_pptpd_configure() { } /* make sure pptp-vpn directory exists */ - if (!file_exists("{$g['varetc_path']}/pptp-vpn")) - mkdir("{$g['varetc_path']}/pptp-vpn"); + @mkdir('/var/etc/pptp-vpn'); switch ($pptpdcfg['mode']) { case 'server' : /* write mpd.conf */ - $fd = fopen("{$g['varetc_path']}/pptp-vpn/mpd.conf", "w"); + $fd = fopen('/var/etc/pptp-vpn/mpd.conf', 'w'); if (!$fd) { printf(gettext("Error: cannot open mpd.conf in vpn_pptpd_configure().") . "\n"); return 1; @@ -1073,7 +1063,7 @@ EOD; unset($mpdconf); /* write mpd.links */ - $fd = fopen("{$g['varetc_path']}/pptp-vpn/mpd.links", "w"); + $fd = fopen('/var/etc/pptp-vpn/mpd.links', 'w'); if (!$fd) { printf(gettext("Error: cannot open mpd.links in vpn_pptpd_configure().") . "\n"); return 1; @@ -1098,7 +1088,7 @@ EOD; unset($mpdlinks); /* write mpd.secret */ - $fd = fopen("{$g['varetc_path']}/pptp-vpn/mpd.secret", "w"); + $fd = fopen('/var/etc/pptp-vpn/mpd.secret', 'w'); if (!$fd) { printf(gettext("Error: cannot open mpd.secret in vpn_pptpd_configure().") . "\n"); return 1; @@ -1117,12 +1107,12 @@ EOD; fwrite($fd, $mpdsecret); fclose($fd); unset($mpdsecret); - chmod("{$g['varetc_path']}/pptp-vpn/mpd.secret", 0600); + chmod('/var/etc/pptp-vpn/mpd.secret', 0600); vpn_netgraph_support(); /* fire up mpd */ - mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']}/pptp-vpn -p /var/run/pptp-vpn.pid -s pptps pptps"); + mwexec('/usr/local/sbin/mpd4 -b -d /var/etc/pptp-vpn -p /var/run/pptp-vpn.pid -s pptps pptps'); break; @@ -1151,8 +1141,7 @@ function vpn_pppoe_configure(&$pppoecfg) { $syscfg = $config['system']; /* create directory if it does not exist */ - if (!is_dir("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn")) - mkdir("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn"); + @mkdir("/var/etc/pppoe{$pppoecfg['pppoeid']}-vpn"); if (file_exists("/var/run/booting")) { if (!$pppoecfg['mode'] || ($pppoecfg['mode'] == "off")) @@ -1180,7 +1169,7 @@ function vpn_pppoe_configure(&$pppoecfg) { $paporchap = "set link enable pap"; /* write mpd.conf */ - $fd = fopen("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.conf", "w"); + $fd = fopen("/var/etc/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.conf", "w"); if (!$fd) { printf(gettext("Error: cannot open mpd.conf in vpn_pppoe_configure().") . "\n"); return 1; @@ -1289,7 +1278,7 @@ EOD; unset($mpdconf); /* write mpd.links */ - $fd = fopen("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.links", "w"); + $fd = fopen("/var/etc/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.links", "w"); if (!$fd) { printf(gettext("Error: cannot open mpd.links in vpn_pppoe_configure().") . "\n"); return 1; @@ -1316,7 +1305,7 @@ EOD; if ($pppoecfg['username']) { /* write mpd.secret */ - $fd = fopen("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.secret", "w"); + $fd = fopen("/var/etc/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.secret", "w"); if (!$fd) { printf(gettext("Error: cannot open mpd.secret in vpn_pppoe_configure().") . "\n"); return 1; @@ -1335,7 +1324,7 @@ EOD; fwrite($fd, $mpdsecret); fclose($fd); unset($mpdsecret); - chmod("{$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.secret", 0600); + chmod("/var/etc/pppoe{$pppoecfg['pppoeid']}-vpn/mpd.secret", 0600); } /* Check if previous instance is still up */ @@ -1344,7 +1333,7 @@ EOD; /* Get support for netgraph(4) from the nic */ pfSense_ngctl_attach(".", $pppoe_interface); /* fire up mpd */ - mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']}/pppoe{$pppoecfg['pppoeid']}-vpn -p /var/run/pppoe{$pppoecfg['pppoeid']}-vpn.pid -s poes poes"); + mwexec("/usr/local/sbin/mpd4 -b -d /var/etc/pppoe{$pppoecfg['pppoeid']}-vpn -p /var/run/pppoe{$pppoecfg['pppoeid']}-vpn.pid -s poes poes"); break; } @@ -1355,33 +1344,26 @@ EOD; return 0; } -function vpn_l2tp_configure() { +function vpn_l2tp_configure() +{ global $config, $g; $syscfg = $config['system']; $l2tpcfg = $config['l2tp']; - /* create directory if it does not exist */ - if (!is_dir("{$g['varetc_path']}/l2tp-vpn")) - mkdir("{$g['varetc_path']}/l2tp-vpn"); - if (file_exists("/var/run/booting")) { if (!$l2tpcfg['mode'] || ($l2tpcfg['mode'] == "off")) return 0; echo gettext("Configuring l2tp VPN service... "); } else { - /* kill mpd */ - killbypid('/var/run/l2tp-vpn.pid'); - - /* wait for process to die */ - sleep(8); - + while (isvalidpid('/var/run/l2tp-vpn.pid')) { + killbypid('/var/run/l2tp-vpn.pid'); + usleep(250 * 1000); + } } - /* make sure l2tp-vpn directory exists */ - if (!file_exists("{$g['varetc_path']}/l2tp-vpn")) - mkdir("{$g['varetc_path']}/l2tp-vpn"); + @mkdir('/var/etc/l2tp-vpn'); switch ($l2tpcfg['mode']) { @@ -1392,7 +1374,7 @@ function vpn_l2tp_configure() { $paporchap = "set link enable pap"; /* write mpd.conf */ - $fd = fopen("{$g['varetc_path']}/l2tp-vpn/mpd.conf", "w"); + $fd = fopen("/var/etc/l2tp-vpn/mpd.conf", "w"); if (!$fd) { printf(gettext("Error: cannot open mpd.conf in vpn_l2tp_configure().") . "\n"); return 1; @@ -1491,7 +1473,7 @@ EOD; unset($mpdconf); /* write mpd.links */ - $fd = fopen("{$g['varetc_path']}/l2tp-vpn/mpd.links", "w"); + $fd = fopen("/var/etc/l2tp-vpn/mpd.links", "w"); if (!$fd) { printf(gettext("Error: cannot open mpd.links in vpn_l2tp_configure().") . "\n"); return 1; @@ -1517,7 +1499,7 @@ EOD; unset($mpdlinks); /* write mpd.secret */ - $fd = fopen("{$g['varetc_path']}/l2tp-vpn/mpd.secret", "w"); + $fd = fopen("/var/etc/l2tp-vpn/mpd.secret", "w"); if (!$fd) { printf(gettext("Error: cannot open mpd.secret in vpn_l2tp_configure().") . "\n"); return 1; @@ -1533,12 +1515,12 @@ EOD; fwrite($fd, $mpdsecret); fclose($fd); unset($mpdsecret); - chmod("{$g['varetc_path']}/l2tp-vpn/mpd.secret", 0600); + chmod('/var/etc/l2tp-vpn/mpd.secret', 0600); vpn_netgraph_support(); /* fire up mpd */ - mwexec("/usr/local/sbin/mpd4 -b -d {$g['varetc_path']}/l2tp-vpn -p /var/run/l2tp-vpn.pid -s l2tps l2tps"); + mwexec('/usr/local/sbin/mpd4 -b -d /var/etc/l2tp-vpn -p /var/run/l2tp-vpn.pid -s l2tps l2tps'); break; diff --git a/src/etc/rc.newwanipv6 b/src/etc/rc.newwanipv6 index b362da24f..58b0ba167 100755 --- a/src/etc/rc.newwanipv6 +++ b/src/etc/rc.newwanipv6 @@ -87,11 +87,11 @@ if (!empty($new_domain_name_servers)) { } if (count($valid_ns > 0)) - file_put_contents("{$g['varetc_path']}/nameserver_v6{$interface}", implode("\n", $valid_ns)); + file_put_contents("/var/etc/nameserver_v6{$interface}", implode("\n", $valid_ns)); } $new_domain_name = getenv("new_domain_name"); if (!empty($new_domain_name)) - file_put_contents("{$g['varetc_path']}/searchdomain_v6{$interface}", $new_domain_name); + file_put_contents("/var/etc/searchdomain_v6{$interface}", $new_domain_name); /* write current WAN IPv6 to file */ if (is_ipaddrv6($curwanipv6)) diff --git a/src/etc/rc.openvpn b/src/etc/rc.openvpn index 8590e97d8..20be390c4 100755 --- a/src/etc/rc.openvpn +++ b/src/etc/rc.openvpn @@ -45,7 +45,7 @@ function openvpn_resync_if_needed ($mode, $ovpn_settings, $interface) { } else { if (!empty($interface)) { $mode_id = $mode . $ovpn_settings['vpnid']; - $fpath = "{$g['varetc_path']}/openvpn/{$mode_id}.interface"; + $fpath = "/var/etc/openvpn/{$mode_id}.interface"; if (file_exists($fpath)) { $current_device = file_get_contents($fpath); $current_device = trim($current_device, " \t\n"); diff --git a/src/www/services_captiveportal_vouchers.php b/src/www/services_captiveportal_vouchers.php index 6020f0926..1805850d5 100644 --- a/src/www/services_captiveportal_vouchers.php +++ b/src/www/services_captiveportal_vouchers.php @@ -156,11 +156,11 @@ if ($_GET['act'] == "del") { else if ($_GET['act'] == "csv") { $privkey = base64_decode($config['voucher'][$cpzone]['privatekey']); if (strstr($privkey,"BEGIN RSA PRIVATE KEY")) { - $fd = fopen("{$g['varetc_path']}/voucher_{$cpzone}.private","w"); + $fd = fopen("/var/etc/voucher_{$cpzone}.private","w"); if (!$fd) { $input_errors[] = gettext("Cannot write private key file") . ".\n"; } else { - chmod("{$g['varetc_path']}/voucher_{$cpzone}.private", 0600); + chmod("/var/etc/voucher_{$cpzone}.private", 0600); fwrite($fd, $privkey); fclose($fd); $a_voucher = &$config['voucher'][$cpzone]['roll']; @@ -170,11 +170,13 @@ else if ($_GET['act'] == "csv") { $count = $a_voucher[$id]['count']; header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=vouchers_{$cpzone}_roll{$number}.csv"); - if (file_exists("{$g['varetc_path']}/voucher_{$cpzone}.cfg")) - system("/usr/local/bin/voucher -c {$g['varetc_path']}/voucher_{$cpzone}.cfg -p {$g['varetc_path']}/voucher_{$cpzone}.private $number $count"); - @unlink("{$g['varetc_path']}/voucher_{$cpzone}.private"); - } else + if (file_exists("/var/etc/voucher_{$cpzone}.cfg")) { + system("/usr/local/bin/voucher -c /var/etc/voucher_{$cpzone}.cfg -p /var/etc/voucher_{$cpzone}.private $number $count"); + } + @unlink("/var/etc/voucher_{$cpzone}.private"); + } else { header("Location: services_captiveportal_vouchers.php?zone={$cpzone}"); + } exit; } } else { diff --git a/src/www/status_openvpn.php b/src/www/status_openvpn.php index fc47c8d73..52b67e62d 100644 --- a/src/www/status_openvpn.php +++ b/src/www/status_openvpn.php @@ -57,7 +57,7 @@ function kill_client($port, $remipp) { global $g; //$tcpsrv = "tcp://127.0.0.1:{$port}"; - $tcpsrv = "unix://{$g['varetc_path']}/openvpn/{$port}.sock"; + $tcpsrv = "unix:///var/etc/openvpn/{$port}.sock"; $errval; $errstr; diff --git a/src/www/vpn_pppoe.php b/src/www/vpn_pppoe.php index ce52bf37d..13ebf39fc 100644 --- a/src/www/vpn_pppoe.php +++ b/src/www/vpn_pppoe.php @@ -71,8 +71,7 @@ if ($_POST) { if ($_GET['act'] == "del") { if ($a_pppoes[$_GET['id']]) { killbypid("/var/run/pppoe{$a_pppoes[$_GET['id']]['pppoeid']}-vpn.pid"); - if (is_dir("{$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'])) - mwexec("/bin/rm -r {$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid']); + mwexecf('/bin/rm -r %s', "/var/etc/pppoe{$a_pppoes[$_GET['id']]['pppoeid']}"); unset($a_pppoes[$_GET['id']]); write_config(); header("Location: vpn_pppoe.php"); diff --git a/src/www/widgets/widgets/openvpn.widget.php b/src/www/widgets/widgets/openvpn.widget.php index 4eba75bab..feb836a51 100644 --- a/src/www/widgets/widgets/openvpn.widget.php +++ b/src/www/widgets/widgets/openvpn.widget.php @@ -1,4 +1,5 @@ Date: Fri, 24 Apr 2015 10:53:29 +0200 Subject: [PATCH 30/51] auth: bootstrapping "''" for the command line is horrible... ... and breaks if one uses the proper shell escape later. ;) --- src/etc/inc/auth.inc | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index fa84e5eb9..bb6c87874 100644 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -479,7 +479,7 @@ function local_user_set(&$user) @unlink("{$user_home}/.ssh/authorized_keys"); } - mwexecf('/usr/sbin/pw %s %s -q', array($lock_account ? 'lock' : 'unlock', $user_name)); + mwexecf('/usr/sbin/pw %s %s', array($lock_account ? 'lock' : 'unlock', $user_name), true); } function local_user_del($user) @@ -609,23 +609,19 @@ function local_group_set($group, $reset = false) { $group_name = $group['name']; $group_gid = $group['gid']; - $group_members = "''"; - if (!$reset && !empty($group['member']) && count($group['member']) > 0) - $group_members = implode(",",$group['member']); + $group_members = ''; - /* read from group db */ - $fd = popen("/usr/sbin/pw groupshow {$group_name} 2>&1", "r"); - $pwread = fgets($fd); - pclose($fd); - - /* determine add or mod */ - if (!strncmp($pwread, "pw:", 3)) { - $group_op = "groupadd"; - } else { - $group_op = "groupmod"; + if (!$reset && !empty($group['member']) && count($group['member']) > 0) { + $group_members = implode(',', $group['member']); + } + + $ret = mwexecf('/usr/sbin/pw groupshow %s', $group_name, true); + if ($ret) { + $group_op = 'groupadd'; + } else { + $group_op = 'groupmod'; } - /* add or mod group db */ mwexecf('/usr/sbin/pw %s %s -g %s -M %s', array($group_op, $group_name, $group_gid, $group_members)); } From 7773bb31cdf451770b2544df32a9fb8a118a0e97 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 24 Apr 2015 11:03:26 +0200 Subject: [PATCH 31/51] src: varetc_path gone; now we're getting somewhere... --- src/etc/inc/captiveportal.inc | 26 ++++++++-------- src/etc/inc/globals.inc | 1 - src/etc/inc/openvpn.auth-user.php | 4 +-- src/etc/inc/openvpn.inc | 52 +++++++++++++++---------------- src/etc/inc/service-utils.inc | 5 ++- src/etc/inc/services.inc | 18 +++++------ src/etc/inc/system.inc | 28 ++++++++--------- src/etc/inc/voucher.inc | 12 +++---- src/etc/inc/vslb.inc | 17 +++++----- 9 files changed, 79 insertions(+), 84 deletions(-) diff --git a/src/etc/inc/captiveportal.inc b/src/etc/inc/captiveportal.inc index 0f4e939a8..196242ede 100644 --- a/src/etc/inc/captiveportal.inc +++ b/src/etc/inc/captiveportal.inc @@ -212,7 +212,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut else $message = 0; - include("{$g['varetc_path']}/captiveportal-{$cpzone}-logout.html"); + include("/var/etc/captiveportal-{$cpzone}-logout.html"); } else { // TODO: remove? should be handled by login page @@ -422,7 +422,7 @@ function captiveportal_configure_zone($cpcfg) { $htmltext = get_default_captive_portal_html(); } - $fd = @fopen("{$g['varetc_path']}/captiveportal_{$cpzone}.html", "w"); + $fd = @fopen("/var/etc/captiveportal_{$cpzone}.html", "w"); if ($fd) { // Special case handling. Convert so that we can pass this page // through the PHP interpreter later without clobbering the vars. @@ -450,7 +450,7 @@ function captiveportal_configure_zone($cpcfg) { $errtext = get_default_captive_portal_html(); } - $fd = @fopen("{$g['varetc_path']}/captiveportal-{$cpzone}-error.html", "w"); + $fd = @fopen("/var/etc/captiveportal-{$cpzone}-error.html", "w"); if ($fd) { // Special case handling. Convert so that we can pass this page // through the PHP interpreter later without clobbering the vars. @@ -510,7 +510,7 @@ document.location.href=""; EOD; } - $fd = @fopen("{$g['varetc_path']}/captiveportal-{$cpzone}-logout.html", "w"); + $fd = @fopen("/var/etc/captiveportal-{$cpzone}-logout.html", "w"); if ($fd) { fwrite($fd, $logouttext); fclose($fd); @@ -553,9 +553,9 @@ EOD; killbypid("/var/run/lighty-{$cpzone}-CaptivePortal.pid"); killbypid("/var/run/lighty-{$cpzone}-CaptivePortal-SSL.pid"); killbypid("/var/run/cp_prunedb_{$cpzone}.pid"); - @unlink("{$g['varetc_path']}/captiveportal_{$cpzone}.html"); - @unlink("{$g['varetc_path']}/captiveportal-{$cpzone}-error.html"); - @unlink("{$g['varetc_path']}/captiveportal-{$cpzone}-logout.html"); + @unlink("/var/etc/captiveportal_{$cpzone}.html"); + @unlink("/var/etc/captiveportal-{$cpzone}-error.html"); + @unlink("/var/etc/captiveportal-{$cpzone}-logout.html"); captiveportal_radius_stop_all(); @@ -637,7 +637,7 @@ function captiveportal_init_webgui_zone($cpcfg) } system_generate_lighty_config( - "{$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal-SSL.conf", + "/var/etc/lighty-{$cpzone}-CaptivePortal-SSL.conf", $crt, $key, $ca, @@ -658,7 +658,7 @@ function captiveportal_init_webgui_zone($cpcfg) } system_generate_lighty_config( - "{$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal.conf", + "/var/etc/lighty-{$cpzone}-CaptivePortal.conf", "", "", "", @@ -672,12 +672,12 @@ function captiveportal_init_webgui_zone($cpcfg) @unlink("{$g['varrun']}/lighty-{$cpzone}-CaptivePortal.pid"); /* attempt to start lighttpd */ - $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal.conf"); + $res = mwexec("/usr/local/sbin/lighttpd -f /var/etc/lighty-{$cpzone}-CaptivePortal.conf"); /* fire up https instance */ if (isset($cpcfg['httpslogin'])) { @unlink("{$g['varrun']}/lighty-{$cpzone}-CaptivePortal-SSL.pid"); - $res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal-SSL.conf"); + $res = mwexec("/usr/local/sbin/lighttpd -f /var/etc/lighty-{$cpzone}-CaptivePortal-SSL.conf"); } } @@ -1318,9 +1318,9 @@ function portal_reply_page($redirurl, $type = null, $message = null, $clientmac header("Location: {$redirurl}"); return; } else if ($type == "login") - $htmltext = get_include_contents("{$g['varetc_path']}/captiveportal_{$cpzone}.html"); + $htmltext = get_include_contents("/var/etc/captiveportal_{$cpzone}.html"); else - $htmltext = get_include_contents("{$g['varetc_path']}/captiveportal-{$cpzone}-error.html"); + $htmltext = get_include_contents("/var/etc/captiveportal-{$cpzone}-error.html"); $cpcfg = $config['captiveportal'][$cpzone]; diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc index 2defc9171..95f0d9cd4 100644 --- a/src/etc/inc/globals.inc +++ b/src/etc/inc/globals.inc @@ -37,7 +37,6 @@ $g = array( "factory_shipped_password" => "opnsense", "dhcpd_chroot_path" => "/var/dhcpd", "unbound_chroot_path" => "/var/unbound", - "varetc_path" => "/var/etc", "admin_group" => "admins", "product_name" => "OPNsense", "product_website" => "https://opnsense.org", diff --git a/src/etc/inc/openvpn.auth-user.php b/src/etc/inc/openvpn.auth-user.php index 3d70cdb62..17da3aa58 100644 --- a/src/etc/inc/openvpn.auth-user.php +++ b/src/etc/inc/openvpn.auth-user.php @@ -98,8 +98,8 @@ if (!$username || !$password) { /* Replaced by a sed with propper variables used below(ldap parameters). */ //