[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.118.138.121: ~ $
#!/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

Filemanager

Name Type Size Permission Actions
awk Folder 0755
coreutils Folder 0755
dbus-1 Folder 0755
dovecot Folder 0755
gcc Folder 0755
getconf Folder 0755
git-core Folder 0755
grubby Folder 0755
imunify-notifier Folder 0755
initscripts Folder 0755
kcare Folder 0755
linux-boot-probes Folder 0755
man-db Folder 0755
microcode_ctl Folder 0755
openldap Folder 0755
openssh Folder 0755
os-probes Folder 0755
p11-kit Folder 0755
plymouth Folder 0755
selinux Folder 0755
smartmontools Folder 0755
sudo Folder 0755
tuned Folder 0755
utempter Folder 0755
chrony-helper File 6.37 KB 0755
ebtables File 1.66 KB 0755
exim.daemon File 758 B 0755
gam_server File 90.73 KB 0755
generate-rndc-key.sh File 546 B 0755
glib-pacrunner File 15.73 KB 0755
gnupg-pcsc-wrapper File 19.3 KB 0755
gpg-check-pattern File 102.95 KB 0755
gpg-preset-passphrase File 86.39 KB 0755
gpg-protect-tool File 185.57 KB 0755
gpg2keys_curl File 44.81 KB 0755
gpg2keys_finger File 61.34 KB 0755
gpg2keys_hkp File 53 KB 0755
gpg2keys_ldap File 61.02 KB 0755
grepconf.sh File 253 B 0755
mlx4-setup.sh File 2.48 KB 0755
newns File 7.03 KB 0755
nm-dhcp-helper File 15.12 KB 0755
nm-dispatcher File 47.7 KB 0755
nm-iface-helper File 839.36 KB 0755
nm-ifdown File 155 B 0755
nm-ifup File 153 B 0755
platform-python File 6.98 KB 0755
rdma-init-kernel File 5.59 KB 0755
rdma-set-sriov-vf File 3.05 KB 0755
report-command-error File 7.29 MB 0755
run-with-intensity File 9.14 MB 0755
tcawmgr.cgi File 19.56 KB 0755
truescale-serdes.cmds File 8.5 KB 0755
urlgrabber-ext-down File 2.54 KB 0755
virt-what-cpuid-helper File 7.02 KB 0755