diff --git a/src/bin/beep.sh b/src/bin/beep.sh index 29a918c1f..4ef3bb0e2 100755 --- a/src/bin/beep.sh +++ b/src/bin/beep.sh @@ -17,7 +17,7 @@ if [ -f /var/log/dmesg.boot ]; then fi fi -# Check for different HZ +# Check for different HZ if [ -f /boot/loader.conf ]; then HZ=`/usr/bin/grep -c kern.hz /boot/loader.conf` if [ "$HZ" = "1" ]; then @@ -25,7 +25,7 @@ if [ -f /boot/loader.conf ]; then fi fi -if [ -c "/dev/speaker" ]; then +if [ -c "/dev/speaker" ]; then if [ "$1" = "start" ]; then /usr/local/bin/beep -p 500 $NOTELENGTH /usr/local/bin/beep -p 400 $NOTELENGTH diff --git a/src/bin/easyrule b/src/bin/easyrule index 9850aee7b..aac19717e 100755 --- a/src/bin/easyrule +++ b/src/bin/easyrule @@ -120,4 +120,4 @@ if (($argc > 1) && !empty($argv[1])) { echo " " . basename($argv[0]) . " pass wan icmp 1.2.3.4 192.168.0.4\n"; echo "\n"; } -?> \ No newline at end of file +?> diff --git a/src/bin/filterparser.php b/src/bin/filterparser.php index 799a6e1f9..e78b78a52 100755 --- a/src/bin/filterparser.php +++ b/src/bin/filterparser.php @@ -30,8 +30,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - A quick CLI log parser. - Examples: + A quick CLI log parser. + Examples: clog /var/log/filter.log | tail -50 | /usr/local/www/filterparser.php clog -f /var/log/filter.log | /usr/local/www/filterparser.php */ @@ -44,7 +44,7 @@ include_once("filter_log.inc"); $log = fopen("php://stdin", "r"); $lastline = ""; -while(!feof($log)) { +while(!feof($log)) { $line = fgets($log); $line = rtrim($line); $flent = parse_filter_line(trim($line)); diff --git a/src/bin/mail.php b/src/bin/mail.php index a09f5c647..f15c0592b 100755 --- a/src/bin/mail.php +++ b/src/bin/mail.php @@ -21,4 +21,4 @@ if (!empty($subject)) send_smtp_message($message, $subject); else send_smtp_message($message); -?> \ No newline at end of file +?> diff --git a/src/bin/ping_hosts.sh b/src/bin/ping_hosts.sh index 7126c9998..34c22c468 100755 --- a/src/bin/ping_hosts.sh +++ b/src/bin/ping_hosts.sh @@ -131,4 +131,3 @@ for TOPING in $PINGHOSTS ; do done exit 0 - diff --git a/src/bin/viconfig b/src/bin/viconfig index 93618f28f..3fab0534d 100755 --- a/src/bin/viconfig +++ b/src/bin/viconfig @@ -1,3 +1,3 @@ #!/bin/sh vi /cf/conf/config.xml -rm /tmp/config.cache \ No newline at end of file +rm /tmp/config.cache diff --git a/src/captiveportal/index.php b/src/captiveportal/index.php index 8c3df2d79..53830ac1b 100644 --- a/src/captiveportal/index.php +++ b/src/captiveportal/index.php @@ -206,7 +206,7 @@ EOD; $user = $_POST['auth_user']; else if (!empty($_POST['auth_user2'])) $user = $_POST['auth_user2']; - else + else $user = 'unknown'; captiveportal_logportalauth($user ,$clientmac,$clientip,"ERROR"); portal_reply_page($redirurl, "error", $errormsg); diff --git a/src/captiveportal/radius_accounting.inc b/src/captiveportal/radius_accounting.inc index ed072cfc8..b583429e8 100644 --- a/src/captiveportal/radius_accounting.inc +++ b/src/captiveportal/radius_accounting.inc @@ -7,30 +7,30 @@ Copyright (c) 2006, Jonathan De Graeve All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. The names of the authors may not be used to endorse or promote products + 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - This code cannot simply be copied and put under the GNU Public License or + This code cannot simply be copied and put under the GNU Public License or any other GPL-like (LGPL, GPL2) License. This code is made possible thx to samples made by Michael Bretterklieber @@ -45,7 +45,7 @@ define('GIGAWORDS_RIGHT_OPERAND', '4294967296'); // 2^32 /* -RADIUS ACCOUNTING START +RADIUS ACCOUNTING START ----------------------- */ @@ -202,9 +202,9 @@ function RADIUS_ACCOUNTING_STOP($ruleno,$username,$sessionid,$start_time,$radius $racct = new Auth_RADIUS_Acct_Stop; /* - Add support for more then one radiusserver. - At most 10 servers may be specified. - When multiple servers are given, they are tried in round-robin fashion until a valid response is received + Add support for more then one radiusserver. + At most 10 servers may be specified. + When multiple servers are given, they are tried in round-robin fashion until a valid response is received */ foreach ($radiusservers as $radsrv) { // Add a new server to our instance diff --git a/src/captiveportal/radius_authentication.inc b/src/captiveportal/radius_authentication.inc index 5f2450679..4e604aea7 100644 --- a/src/captiveportal/radius_authentication.inc +++ b/src/captiveportal/radius_authentication.inc @@ -6,30 +6,30 @@ Copyright (c) 2006, Jonathan De Graeve All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. The names of the authors may not be used to endorse or promote products + 3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - This code cannot simply be copied and put under the GNU Public License or + This code cannot simply be copied and put under the GNU Public License or any other GPL-like (LGPL, GPL2) License. This code is made possible thx to samples made by Michael Bretterklieber @@ -64,14 +64,14 @@ function RADIUS_AUTHENTICATION($username,$password,$radiusservers,$clientip,$cli switch($radiusvendor) { case 'cisco': - $calledstationid = $clientmac; - $callingstationid = $clientip; - break; + $calledstationid = $clientmac; + $callingstationid = $clientip; + break; default: if (!function_exists('getNasIP')) require_once("captiveportal.inc"); - $calledstationid = getNasIP(); - $callingstationid = $clientmac; + $calledstationid = getNasIP(); + $callingstationid = $clientmac; break; } @@ -80,9 +80,9 @@ function RADIUS_AUTHENTICATION($username,$password,$radiusservers,$clientip,$cli $rauth = new $classname($username, $password); /* - * Add support for more then one radiusserver. - * At most 10 servers may be specified. - * When multiple servers are given, they are tried in round-robin fashion until a valid response is received + * Add support for more then one radiusserver. + * At most 10 servers may be specified. + * When multiple servers are given, they are tried in round-robin fashion until a valid response is received */ foreach ($radiusservers as $radsrv) { // Add a new server to our instance @@ -126,7 +126,7 @@ function RADIUS_AUTHENTICATION($username,$password,$radiusservers,$clientip,$cli if (PEAR::isError($rauth->start())) { $retvalue['auth_val'] = 1; - $retvalue['error'] = $rauth->getError(); + $retvalue['error'] = $rauth->getError(); // If we encounter an error immediately stop this function and go back $rauth->close(); diff --git a/src/etc/ca_countries b/src/etc/ca_countries index 1a9ca9e88..ff32f9d3f 100644 --- a/src/etc/ca_countries +++ b/src/etc/ca_countries @@ -234,4 +234,4 @@ WS Samoa YE Yemen YT Mayotte ZA South Africa -ZM Zambia \ No newline at end of file +ZM Zambia diff --git a/src/etc/phpshellsessions/changepassword b/src/etc/phpshellsessions/changepassword index 6243fb8a3..684290f22 100644 --- a/src/etc/phpshellsessions/changepassword +++ b/src/etc/phpshellsessions/changepassword @@ -76,4 +76,4 @@ if ($password == $confpassword) { } else { echo gettext("New and Confirm passwords did not match.") . "\n"; exit(-1); -} \ No newline at end of file +} diff --git a/src/etc/phpshellsessions/disabledhcpd b/src/etc/phpshellsessions/disabledhcpd index 4dc029c63..b22e00a4a 100644 --- a/src/etc/phpshellsessions/disabledhcpd +++ b/src/etc/phpshellsessions/disabledhcpd @@ -10,4 +10,4 @@ write_config("pfSsh.php disabled dhcp on all interfaces"); services_dhcpd_configure(); -echo "done.\n"; \ No newline at end of file +echo "done.\n"; diff --git a/src/etc/phpshellsessions/enableallowallwan b/src/etc/phpshellsessions/enableallowallwan index 94c0b7bcd..2c71ba3d0 100644 --- a/src/etc/phpshellsessions/enableallowallwan +++ b/src/etc/phpshellsessions/enableallowallwan @@ -31,4 +31,4 @@ unset($config['interfaces']['wan']['blockbogons']); $config = parse_config(true); echo "Reloading the filter configuration..."; filter_configure_sync(); -echo "\n\n"; \ No newline at end of file +echo "\n\n"; diff --git a/src/etc/phpshellsessions/gitsync b/src/etc/phpshellsessions/gitsync index ca77829b8..8834b648f 100644 --- a/src/etc/phpshellsessions/gitsync +++ b/src/etc/phpshellsessions/gitsync @@ -10,7 +10,7 @@ require_once("filter.inc"); require_once("shaper.inc"); require_once("rrd.inc"); require_once("pfsense-utils.inc"); - + $GIT_PKG = "git"; // Either "git" or the full package URL $GIT_BIN= "/usr/pbi/bin/git"; $GIT_REPO = "git://github.com/pfsense/pfsense.git"; @@ -106,15 +106,15 @@ if(!file_exists($GIT_BIN)) { } # Remove mainline if exists (older) -if(is_dir("/root/pfsense/mainline")) +if(is_dir("/root/pfsense/mainline")) exec("rm -rf /root/pfsense/mainline"); # Remove RELENG_1_2 if exists (older) -if(is_dir("/root/pfsense/RELENG_1_2")) +if(is_dir("/root/pfsense/RELENG_1_2")) exec("rm -rf /root/pfsense/RELENG_1_2"); # Remove HEAD if exists (older) -if(is_dir("/root/pfsense/HEAD")) +if(is_dir("/root/pfsense/HEAD")) exec("rm -rf /root/pfsense/HEAD"); if(file_exists("/root/cvssync_backup.tgz")) { @@ -143,9 +143,9 @@ if(!$args[0] && !$upgrading) { $branch = $args[0]; } -if($args[1] == "NOBACKUP") +if($args[1] == "NOBACKUP") $nobackup = true; -else +else $nobackup = false; // If the repository has been fetched before, build a list of its branches. @@ -162,7 +162,7 @@ if(is_dir("$CODIR/pfSenseGITREPO/pfSenseGITREPO")) { $found = false; foreach($branches as $branchname => $branchdesc) { - if($branchname == $branch) + if($branchname == $branch) $found = true; } if(!$found) { @@ -181,7 +181,7 @@ if(!$found) { $command = readline("Checkout which branch [${DEFAULT_BRANCH}]? "); if($command == "") $branch = $DEFAULT_BRANCH; - if($command) + if($command) $branch = $command; $found = true; } @@ -283,9 +283,9 @@ if(is_dir("$CODIR/pfSenseGITREPO/pfSenseGITREPO")) { exec("mkdir -p $CODIR/pfSenseGITREPO"); echo "Executing cd $CODIR/pfSenseGITREPO && {$GIT_BIN} clone $GIT_REPO pfSenseGITREPO\n"; exec("cd $CODIR/pfSenseGITREPO && {$GIT_BIN} clone " . escapeshellarg($GIT_REPO) . " pfSenseGITREPO"); - if(is_dir("$CODIR/pfSenseGITREPO/pfSense")) + if(is_dir("$CODIR/pfSenseGITREPO/pfSense")) exec("mv $CODIR/pfSenseGITREPO/pfSense $CODIR/pfSenseGITREPO/pfSenseGITREPO"); - if(is_dir("$CODIR/pfSenseGITREPO/mainline")) + if(is_dir("$CODIR/pfSenseGITREPO/mainline")) exec("mv $CODIR/pfSenseGITREPO/mainline $CODIR/pfSenseGITREPO/pfSenseGITREPO"); run_cmds($git_cmd); } @@ -320,7 +320,7 @@ exec("mkdir -p /tmp/lighttpd/cache/compress/"); exec("cd ${CODIR}/pfSenseGITREPO/pfSenseGITREPO && find . -name CVS -exec rm -rf {} \; 2>/dev/null"); exec("cd ${CODIR}/pfSenseGITREPO/pfSenseGITREPO && find . -name pfSense.tgz -exec rm {} \; 2>/dev/null"); -// Remove files that we do not want to overwrite the system with +// Remove files that we do not want to overwrite the system with exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/etc/crontab 2>/dev/null"); exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/etc/master.passwd 2>/dev/null"); exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/etc/passwd 2>/dev/null"); @@ -340,9 +340,9 @@ exec("rm -f ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/etc/syslog.conf 2>/dev/null") echo "===> Installing new files...\n"; -if($g['platform'] == "pfSense") +if($g['platform'] == "pfSense") $command = "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO ; tar -cpf - {$files_to_copy} | (cd / ; tar -Uxpf -)"; -else +else $command = "cd $CODIR/pfSenseGITREPO/pfSenseGITREPO ; tar -cpf - {$files_to_copy} | (cd / ; tar -xpf -) 2>/dev/null"; if(!empty($files_to_copy)) exec($command); @@ -388,7 +388,7 @@ function post_cvssync_commands() { /* lock down console if necessary */ echo "===> Locking down the console if needed...\n"; reload_ttys(); - + echo "===> Signaling PHP and Lighty restart..."; $fd = fopen("/tmp/restart_lighty", "w"); fwrite($fd, "#!/bin/sh\n"); @@ -403,9 +403,9 @@ function post_cvssync_commands() { } function isUrl($url = "") { - if($url) - if(strstr($url, "rcs.pfsense.org") or - strstr($url, "mainline") or + if($url) + if(strstr($url, "rcs.pfsense.org") or + strstr($url, "mainline") or strstr($url, ".git") or strstr($url, "git://")) return true; return false; diff --git a/src/etc/phpshellsessions/removeshaper b/src/etc/phpshellsessions/removeshaper index 2a221cd93..e041855b5 100644 --- a/src/etc/phpshellsessions/removeshaper +++ b/src/etc/phpshellsessions/removeshaper @@ -21,4 +21,4 @@ if (write_config()) { } else { echo gettext("Unable to write config.xml (Access Denied?)\n"); } -filter_configure(); \ No newline at end of file +filter_configure(); diff --git a/src/etc/phpshellsessions/uninstallpkg b/src/etc/phpshellsessions/uninstallpkg index 484ccc8ef..a178ffa27 100644 --- a/src/etc/phpshellsessions/uninstallpkg +++ b/src/etc/phpshellsessions/uninstallpkg @@ -32,4 +32,4 @@ elseif ($remove_type == "xmlonly") else echo "Invalid removal type. Valid values are: normal, xmlonly.\n"; -echo "\nDone.\n"; \ No newline at end of file +echo "\nDone.\n"; diff --git a/src/pkg/miniupnpd.inc b/src/pkg/miniupnpd.inc index 242b67deb..b4123c495 100644 --- a/src/pkg/miniupnpd.inc +++ b/src/pkg/miniupnpd.inc @@ -45,7 +45,7 @@ } function upnp_validate_ip($ip, $check_cdir) { - /* validate cidr */ + /* validate cidr */ $ip_array = array(); if($check_cdir) { $ip_array = explode('/', $ip); @@ -68,7 +68,7 @@ foreach(explode('-', $port) as $sub) if($sub < 0 || $sub > 65535) return false; - return true; + return true; } function before_form_miniupnpd(&$pkg) { @@ -117,7 +117,7 @@ $input_errors[] = "You must specify a valid ip address in the 'User specified permissions {$i}' field"; } } - } + } } function sync_package_miniupnpd() { @@ -184,11 +184,11 @@ $config_text .= "bitrate_down={$download}\n"; $config_text .= "bitrate_up={$upload}\n"; } - + /* enable logging of packets handled by miniupnpd rules */ if($upnp_config['logpackets']) $config_text .= "packet_log=yes\n"; - + /* enable system uptime instead of miniupnpd uptime */ if($upnp_config['sysuptime']) $config_text .= "system_uptime=yes\n"; @@ -207,7 +207,7 @@ /* set model number */ $config_text .= "model_number=".file_get_contents("/usr/local/etc/version")."\n"; - + /* upnp access restrictions */ for($i=1; $i<=4; $i++) { if($upnp_config["permuser{$i}"]) @@ -231,11 +231,11 @@ /* write out the configuration */ upnp_write_config($config_file, $config_text); - + /* if miniupnpd not running start it */ if(!upnp_running()) { upnp_notice("Starting service on interface: {$ifaces_active}"); - upnp_action('start'); + upnp_action('start'); } /* or restart miniupnpd if settings were changed */ else { @@ -251,7 +251,7 @@ if(!$upnp_config['enable']) upnp_notice('Stopping service: miniupnpd disabled'); else - upnp_notice('Stopping service: no interfaces selected'); + upnp_notice('Stopping service: no interfaces selected'); upnp_action('stop'); @unlink($config_file); diff --git a/src/pkg/miniupnpd.xml b/src/pkg/miniupnpd.xml index 9aa02398a..db56db310 100644 --- a/src/pkg/miniupnpd.xml +++ b/src/pkg/miniupnpd.xml @@ -42,7 +42,7 @@ enable checkbox enable_upnp,enable_natpmp,iface_array,overridewanip,upnpqueue,logpackets,sysuptime,permdefault,permuser1,permuser2,permuser3,permuser4 - + Allow UPnP Port Mapping enable_upnp @@ -143,7 +143,7 @@ Format: [allow or deny] [ext port or range] [int ipaddr or ipaddr/cdir] [int port or range] input 60 - + before_form_miniupnpd($pkg); diff --git a/src/sbin/WipePackages.php b/src/sbin/WipePackages.php index 90bd3ee6f..effbeab9b 100755 --- a/src/sbin/WipePackages.php +++ b/src/sbin/WipePackages.php @@ -48,7 +48,7 @@ if(strtoupper($command) == "Y" || strtoupper($command) == "YES") { echo "\n\nStarting package wipe... One moment please... "; exec("cd /var/db/pkg/ && find . -exec 'pkg_delete {}' \; "); exec("rm -rf /var/db/pkg/*"); - + if(strtoupper($rmconfig) == "Y" || strtoupper($rmconfig) == "YES") { echo "\nRemoving pfSense package configuration information..."; if($config['installedpackages']['package']) { @@ -57,8 +57,8 @@ if(strtoupper($command) == "Y" || strtoupper($command) == "YES") { } echo "\n"; } - + echo "\npfSense package wipe procedure has completed.\n\n"; } -?> \ No newline at end of file +?> diff --git a/src/sbin/dhclient-script.ext b/src/sbin/dhclient-script.ext index 11ce35b59..ca0260319 100755 --- a/src/sbin/dhclient-script.ext +++ b/src/sbin/dhclient-script.ext @@ -233,7 +233,7 @@ add_new_routes() { else $ROUTE add default $router echo $ROUTE add default $router | $LOGGER - echo $router > /tmp/${interface}_router + echo $router > /tmp/${interface}_router fi ADDED_ROUTE=yes # 2nd and subsequent default routers error out, so explicitly @@ -248,7 +248,7 @@ add_new_routes() { while [ $# -gt 1 ]; do $ROUTE add $1 $2 if [ "$ADDED_ROUTE" = "no" ]; then - echo $2 > /tmp/${interface}_router + echo $2 > /tmp/${interface}_router fi shift; shift done @@ -263,7 +263,7 @@ add_new_resolv_conf() { $ROUTE delete $nameserver >/dev/null 2>&1 done fi - if [ -n "$new_domain_name_servers" ]; then + if [ -n "$new_domain_name_servers" ]; then /bin/rm -f /var/etc/nameserver_$interface ALLOWOVERRIDE=`/usr/bin/grep dnsallowoverride /conf/config.xml | /usr/bin/wc -l` for nameserver in $new_domain_name_servers; do diff --git a/src/sbin/gmirror_status_check.php b/src/sbin/gmirror_status_check.php index 88c186fdd..1bf978d91 100644 --- a/src/sbin/gmirror_status_check.php +++ b/src/sbin/gmirror_status_check.php @@ -89,4 +89,4 @@ if (count($notices)) { if ($mirror_status != $previous_mirror_status) file_put_contents($status_file, serialize($mirror_status)); -?> \ No newline at end of file +?> diff --git a/src/sbin/mpd.script b/src/sbin/mpd.script index 4525b010b..ca01e6144 100644 --- a/src/sbin/mpd.script +++ b/src/sbin/mpd.script @@ -116,7 +116,7 @@ DialPeerSetAPN: log $modemCmd call ModemCmd2 return - + # Null-modem connection DialNullModem: log "Connected via null modem connection." @@ -1396,7 +1396,7 @@ SetBaudrate2: goto ModemCmd2 ## -## ModemCheckValue +## ModemCheckValue ## ## Check the value in an S-register (or equivalent). If it is ## not what we want, then change it and set $valueChanged to "yes", @@ -1639,4 +1639,3 @@ AutoLoginTimeout: log "Auto-login timeout." cancel all return - diff --git a/src/sbin/ovpn-linkup b/src/sbin/ovpn-linkup index 2f3246e8e..b4027c2b7 100755 --- a/src/sbin/ovpn-linkup +++ b/src/sbin/ovpn-linkup @@ -12,6 +12,6 @@ if [ "${dev_type}" = "tun" ]; then fi /usr/bin/touch /tmp/$1up -# reload filter +# reload filter /usr/local/sbin/pfSctl -c "interface newip $1" exit 0 diff --git a/src/sbin/pfSsh.php b/src/sbin/pfSsh.php index fd9e71d8c..749071cb1 100755 --- a/src/sbin/pfSsh.php +++ b/src/sbin/pfSsh.php @@ -1,5 +1,4 @@ #!/usr/local/bin/php -f - array("pipe", "r"), // stdin 1 => array("pipe", "w"), // stdout 2 => array("pipe", "w")); // stderr ?? instead of a file - + $fd = proc_open("$command", $descriptorspec, $pipes); if (is_resource($fd)) { fwrite($pipes[0], "{$text_to_pipe}"); @@ -62,8 +61,8 @@ function more($text, $count=24) { echo "Press RETURN to continue ..."; $fp = fopen('php://stdin', 'r'); $pressreturn = chop(fgets($fp)); - if($pressreturn == "q" || $pressreturn == "quit") - return; + if($pressreturn == "q" || $pressreturn == "quit") + return; fclose($fp); $counter = 0; } @@ -77,7 +76,7 @@ function show_help() { $show_help_text = << Sessions available for playback are:\n"; system("cd /usr/local/etc/phpshellsessions && ls /usr/local/etc/phpshellsessions"); - echo "==> end of list.\n"; + echo "==> end of list.\n"; } function returnlastchar($command) { $commandlen = strlen($command); $endofstring = substr($command, ($commandlen-1)); - return $endofstring; + return $endofstring; } function returnfirstchar($command) { $commandlen = strlen($command); $endofstring = substr($command, 0, 1); - return $endofstring; + return $endofstring; } function str_replace_all($search,$replace,$subject) { - while(strpos($subject,$search)!==false) + while(strpos($subject,$search)!==false) $subject = str_replace($search,$replace,$subject); return $subject; } @@ -315,7 +314,7 @@ function playback_text($playback_file_contents) { $playback_text .= "require_once('globals.inc');\n"; $playback_text .= "require_once('config.inc');\n"; $toquote = '"'; - $toquotereplace = '\\"'; + $toquotereplace = '\\"'; foreach($playback_file_split as $pfs) { $firstchar = returnfirstchar($pfs); $currentline = $pfs; @@ -339,5 +338,3 @@ function playback_file($playback_file) { $playback_file_contents = file_get_contents("/usr/local/etc/phpshellsessions/{$playback_file}"); playback_text($playback_file_contents); } - -?> diff --git a/src/sbin/ppp-uptime.sh b/src/sbin/ppp-uptime.sh index d7a8441e1..24c2a7e62 100755 --- a/src/sbin/ppp-uptime.sh +++ b/src/sbin/ppp-uptime.sh @@ -1,3 +1,3 @@ #!/bin/sh #get ppp uptime from age of /tmp/{interface}up file -[ -f /tmp/$1up ] && /bin/echo $((`date -j +%s` - `/usr/bin/stat -f %m /tmp/$1up`)) \ No newline at end of file +[ -f /tmp/$1up ] && /bin/echo $((`date -j +%s` - `/usr/bin/stat -f %m /tmp/$1up`))