#/** * @package Akismet */ /* Plugin Name: Akismet Anti-spam: Spam Protection Plugin URI: https://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to protect your blog from spam. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key. Version: 5.4 Requires at least: 5.8 Requires PHP: 7.2 Author: Automattic - Anti-spam Team Author URI: https://automattic.com/wordpress-plugins/ License: GPLv2 or later Text Domain: akismet */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Copyright 2005-2025 Automattic, Inc. */ // Make sure we don't expose any info if called directly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 62.109.13.187 / Your IP : 216.73.216.11 [ Web Server : Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 OpenSSL/1.0.2k-fips PHP/8.2.28 System : Linux robothost.ru 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : mosrembit ( 6064) PHP Version : 8.2.28 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/ |
Upload File : |
#!/bin/bash
dir="/sys/bus/pci/drivers/mlx4_core"
[ ! -d $dir ] && exit 1
pushd $dir >/dev/null
function set_dual_port() {
device=$1
port1=$2
port2=$3
pushd $device >/dev/null
cur_p1=`cat mlx4_port1`
cur_p2=`cat mlx4_port2`
# special case the "eth eth" mode as we need port2 to
# actually switch to eth before the driver will let us
# switch port1 to eth as well
if [ "$port1" == "eth" ]; then
if [ "$port2" != "eth" ]; then
echo "In order for port1 to be eth, port2 to must also be eth"
popd >/dev/null
return
fi
if [ "$cur_p2" != "eth" -a "$cur_p2" != "auto (eth)" ]; then
tries=0
echo "$port2" > mlx4_port2 2>/dev/null
sleep .25
cur_p2=`cat mlx4_port2`
while [ "$cur_p2" != "eth" -a "$cur_p2" != "auto (eth)" -a $tries -lt 10 ]; do
sleep .25
let tries++
cur_p2=`cat mlx4_port2`
done
if [ "$cur_p2" != "eth" -a "$cur_p2" != "auto (eth)" ]; then
echo "Failed to set port2 to eth mode"
popd >/dev/null
return
fi
fi
if [ "$cur_p1" != "eth" -a "$cur_p1" != "auto (eth)" ]; then
tries=0
echo "$port1" > mlx4_port1 2>/dev/null
sleep .25
cur_p1=`cat mlx4_port1`
while [ "$cur_p1" != "eth" -a "$cur_p1" != "auto (eth)" -a $tries -lt 10 ]; do
sleep .25
let tries++
cur_p1=`cat mlx4_port1`
done
if [ "$cur_p1" != "eth" -a "$cur_p1" != "auto (eth)" ]; then
echo "Failed to set port1 to eth mode"
fi
fi
popd >/dev/null
return
fi
# our mode is not eth <anything> as that is covered above
# so we should be able to successfully set the ports in
# port1 then port2 order
if [ "$cur_p1" != "$port1" -o "$cur_p2" != "$port2" ]; then
# Try setting the ports in order first
echo "$port1" > mlx4_port1 2>/dev/null ; sleep .1
echo "$port2" > mlx4_port2 2>/dev/null ; sleep .1
cur_p1=`cat mlx4_port1`
cur_p2=`cat mlx4_port2`
fi
if [ "$cur_p1" != "$port1" -o "$cur_p2" != "$port2" ]; then
# Try reverse order this time
echo "$port2" > mlx4_port2 2>/dev/null ; sleep .1
echo "$port1" > mlx4_port1 2>/dev/null ; sleep .1
cur_p1=`cat mlx4_port1`
cur_p2=`cat mlx4_port2`
fi
if [ "$cur_p1" != "$port1" -o "$cur_p2" != "$port2" ]; then
echo "Error setting port type on mlx4 device $device"
fi
popd >/dev/null
return
}
while read device port1 port2 ; do
[ -d "$device" ] || continue
[ -z "$port1" ] && continue
[ -f "$device/mlx4_port2" -a -z "$port2" ] && continue
[ -f "$device/mlx4_port2" ] && set_dual_port $device $port1 $port2 || echo "$port1" > "$device/mlx4_port1"
done
popd 2&>/dev/null