404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.145.36.137: ~ $
#!/bin/sh
#
# fanatic -- intialise a with a default fan setup.
#

if [ `id -u` -ne 0 ]; then
	exec sudo -- "$0" "$@"
fi

network_overlay_default='250.0.0.0/8'
##network_type='ipip'
##network_mtu=1480
network_type='vxlan'
network_mtu=1450
network_mode='compact'
#network_overlay_width='8'
network_underlay_width='16'

usage()
{
	echo "Usage: $0 $@" 1>&2
	exit 2
}
fail()
{
	echo "$0: $@" 1>&2
	exit 1
}
end()
{
	echo "$0: $@"
	exit 0
}
progress()
{
	[ "$interactive" -eq 0 ] && echo "$@"
}

detect_network()
{
       local a1="$1"

	[ "$a1" = "default" ] && a1=`ip route show 0.0.0.0/0 | awk '{print $5; exit}'`
       RET="$a1"

	a1="`ip -4 addr show dev "$a1" | grep inet | awk -F '[/ ]*' '{print $3; exit}'`"
	[ "$a1" = "" ] && fail "$a1: device address not found"

       RET2="$a1"
}

twiddle_fan_config()
{
	local cmd="$1"
	local tag="$2"
	local overlay="$3"
	local underlay="$4"

	local conf="/etc/network/fan"

	# First check we have a valid mapping from underlay to overlay, if not
	# we need to make one.
	mapping_present=$( awk -v overlay="$overlay" -v underlay="$underlay" '($1 == underlay && $2 == overlay) { print }' "$conf" 2>/dev/null | wc -l )
	mapping_mine=$( awk -v overlay="$overlay" -v underlay="$underlay" '($1 == underlay && $2 == overlay && $0 ~ /# fanatic configured/) { print }' "$conf" 2>/dev/null | wc -l )

	# We also want to know if there is a valid configuration for it.
	config_present=$( fanctl config show -u "$underlay" -o "$overlay" | wc -l )
	config_mine=$( fanctl config show -u "$underlay" -o "$overlay" | grep "comment='fanatic configured'" | wc -l )

	#echo "twiddle_fan_config cmd<$cmd> mapping_present<$mapping_present> mapping_mine<$mapping_mine> config_present<$config_present> config_mine<$config_mine>"

	case "$cmd" in
	add-check)
		if [ "$config_mine" != 0 ]; then
			return 1
		fi
		if [ "$config_present" != 0 ]; then
			return 1
		fi
		return 0
		;;
	add)
		if [ "$config_mine" != 0 ]; then
			fail "$conf: fan already configured unable to configure"
		fi
		if [ "$config_present" != 0 ]; then
			fail "$conf: fan configured manually unable to configure"
		fi

		if [ "$mapping_present" = 0 ]; then
			cat - <<EOL >>"$conf"
$underlay $overlay 		# fanatic configured
EOL
		fi

		fanctl config set -u "$underlay" -o "$overlay" --dhcp --enable --comment='fanatic configured'
		;;
	remove-check)
		if [ "$config_present" = 0 ]; then
			return 1
		fi
		if [ "$config_mine" = 0 ]; then
			return 1
		fi
		return 0
		;;
	remove)
		if [ "$config_present" = 0 ]; then
			fail "$conf: not configured"
		fi
		if [ "$config_mine" = 0 ]; then
			fail "$conf: configured manually not removing"
		fi

		fanctl config set -u "$underlay" -o "$overlay"

		# Remove the configuration if we added it.
		if [ "$mapping_mine" != 0 ]; then
			sed -i.bak -e "\@$underlay[ \t][ \t]*$overlay[ \t].*# fanatic configured@d" "$conf"
		fi
		;;
	esac
}

enable_fan()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"

	if twiddle_fan_config add-check "$device" "$overlay" "$underlay"; then
#		if [ "$interactive" -eq 1 ]; then
#			while :
#			do
#				read -p "Create fan network $overlay $underlay [Yn]: " confirm
#				case "$confirm" in
#				n*|N*)		fail "Abort" ;;
#				y*|Y*)		break ;;
#				'')		break ;;
#				esac
#			done
#		fi
		progress "configuring fan underlay:$underlay overlay:$overlay"
		twiddle_fan_config add "$device" "$overlay" "$underlay"
		if ! fanctl up -o "$overlay" -u "$underlay" --auto; then
			twiddle_fan_config remove "$device" "$overlay" \
				"$underlay"
			fail "unable to bring fan up, unable to configure"
		fi
	fi
}

disable_fan()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"

	local fan_bridge=$( fan_to_bridge "$overlay" "$underlay" "$network_mode" )

	if twiddle_lxd_config remove-check "$device" "$fan_bridge"; then
		fail "LXD still configured, unable to disable fan"
	fi
	if twiddle_docker_config remove-check "$device" "$fan_bridge"; then
		fail "docker still configured, unable to disable fan"
	fi

	if twiddle_fan_config remove-check "$device" "$overlay" "$underlay"; then
#		if [ "$interactive" -eq 1 ]; then
#			while :
#			do
#				read -p "Remove fan network for $overlay $underlay [Yn]: " confirm
#				case "$confirm" in
#				n*|N*)		return ;;
#				y*|Y*)		break ;;
#				'')		break ;;
#				esac
#			done
#		fi
		progress "de-configuring fan underlay:$underlay overlay:$overlay"
		fanctl down -o "$overlay" -u "$underlay" || fail "unable to bring fan down, unable to deconfigure"
		twiddle_fan_config remove "$device" "$overlay" "$underlay"
	fi
}

twiddle_docker_config_old()
{
	local cmd="$1"
	local tag="$2"

	dconf="/etc/default/docker"

	configured=$( egrep "^DOCKER_OPTS=" "$dconf" 2>/dev/null | wc -l )
	myconfig=$( egrep "# autoconfig start -- fanatic $tag --" "$dconf" 2>/dev/null | wc -l )

	#echo "configured<$configured> myconfig<$myconfig>"

	case "$cmd" in
	add)
		local bridge="$3"
		local cidr="$4"
		local mtu="$5"

		if [ "$configured" != 0 ]; then
			fail "$0: $dconf: configured already, unable to configure"
		fi
		if [ "$configured" != 0 -a "$myconfig" != "$configured" ]; then
			fail "$0: $dconf: docker already configured for fan use"
		fi

		# Determine the docker version.
		local dockerver=$( docker -v | awk '{ print $3 }' | sed -e 's/,$//' )
		local dockerflags

		if dpkg --compare-versions "$dockerver" lt 1.10; then
			dockerflags=-d
		fi

		# Add the configuration
		sed -i.bak -e '/#DOCKER_OPTS=/a\
# autoconfig start -- fanatic '"$tag"' --\
DOCKER_OPTS="'"$dockerflags"' -b '"$bridge"' --mtu='"$mtu"' --iptables=false --fixed-cidr='"$cidr"'"\
# autoconfig end -- fanatic '"$tag"' --
' "$dconf"
		;;
	remove)
		if [ "$configured" = 0 ]; then
			fail "$0: $dconf: not configured"
		fi
		if [ "$myconfig" != "$configured" ]; then
			fail "$0: $dconf: configured manually not removing"
		fi

		# Add the configuration
		sed -i.bak -e '/# autoconfig start -- fanatic '"$tag"' --/,/# autoconfig end -- fanatic '"$tag"' --/d' "$dconf"
		;;
	remove-check)
		if [ "$configured" = 0 ]; then
			return 1
		fi
		if [ "$myconfig" != "$configured" ]; then
			return 1
		fi
		return 0
		;;
	esac
}

twiddle_docker_config_1_12()
{
	local cmd="$1"
	local tag="$2"
	local fan_bridge="$3"

	local conf="$(docker network inspect $fan_bridge 2>/dev/null)"

	case "$cmd" in
	add)
		local fan_cidr="$4"
		local fan_mtu="$5"
		local fan_overlay="$6"
		local fan_host="$7"
		local fan_rsvd="$(echo $fan_cidr | cut -d/ -f1)"

		docker -D network create --driver bridge \
			-o "com.docker.network.bridge.name=$fan_bridge" \
			-o "com.docker.network.driver.mtu=$fan_mtu" \
			--subnet $fan_overlay \
			--ip-range $fan_cidr \
			--gateway $fan_host \
			--aux-address "reserved0=$fan_rsvd" \
			"$fan_bridge"
		return $?
		;;
	remove)
		local clist=$(echo "$conf"|awk '/Containers/{print $NF}')

		if [ "$clist" != "{}," ]; then
			fail "$0: $fan_bridge still has bound containers!"
		fi
		docker network rm "$fan_bridge"
		return $?
		;;
	remove-check)
		if [ ! -e /usr/bin/docker -o "$conf" = "[]" ]; then
			return 1
		fi
		return 0
		;;
	esac

	return 1
}

twiddle_docker_config()
{
	# Always fail this if docker is not installed
	type docker >/dev/null 2>&1 || return 1

	local dver=$(docker -v | awk '{sub(/,/, "", $3); print $3}')

	if dpkg --compare-versions "$dver" lt 1.12; then
		twiddle_docker_config_old "$@"
	else
		twiddle_docker_config_1_12 "$@"
	fi

	return $?
}

enable_docker()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"
	local underlay_addr="$4"

	local fan_bridge=$( fan_to_bridge "$overlay" "$underlay" "$network_mode" )
	local fan_cidr=$( fan_to_docker_cidr "$overlay" "$underlay_addr" "$network_mode" )

	# Do not attempt to configure docker if it is not installed.
	if [ ! -e /usr/bin/docker ]; then
		echo "Docker not installed, unable to configure"
		return
	fi

	# If we are alreday configured, skip.
	if twiddle_docker_config remove-check "$device" "$fan_bridge"; then
		echo "Docker already configured"
		return
	fi

	if [ "$interactive" -eq 1 ]; then
		while :
		do
			read -p "Create docker networking for underlay:$underlay overlay:$overlay [Yn]: " confirm
			case "$confirm" in
			n*|N*)		return ;;
			y*|Y*)		break ;;
			'')		break ;;
			esac
		done
	fi
	progress "configuring docker for underlay:$underlay overlay:$overlay ($fan_bridge $fan_cidr)"

	local fan_host=$( fan_to_host_ip "$overlay" "$underlay_addr" "$network_mode" )
	twiddle_docker_config add "$device" "$fan_bridge" "$fan_cidr" "$network_mtu" "$overlay" "$fan_host"

	# Restart docker for this to take effect.
	[ "$O_docker_restart" = '' ] && service docker restart
}

disable_docker()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"
	local underlay_addr="$4"

	local fan_bridge=$( fan_to_bridge "$overlay" "$underlay" "$network_mode" )
	if twiddle_docker_config remove-check "$device" "$fan_bridge"; then
		if [ "$interactive" -eq 1 ]; then
			while :
			do
				read -p "Remove docker networking for underlay:$underlay overlay:$overlay [Yn]: " confirm
				case "$confirm" in
				n*|N*)		return ;;
				y*|Y*)		break ;;
				'')		break ;;
				esac
			done
		fi
		progress "de-configuring docker underlay:$underlay overlay:$overlay"
		twiddle_docker_config remove "$device" "$fan_bridge"

		# Restart docker for this to take effect.
		[ "$O_docker_restart" = '' ] && service docker restart
	fi
}

twiddle_lxd_config()
{
	local cmd="$1"
	local tag="$2"
	local bridge="$3"

	local who
	configured=0
	who=$( lxc profile get "$bridge" 'user.profile_autoconfig' 2>/dev/null )
	[ "$?" -eq 0 ] && configured=1
	myconfig=0
	[ "$who" = 'fanatic' ] && myconfig=1
	
	#echo "configured<$configured> myconfig<$myconfig>"

	case "$cmd" in
	add)
		local mtu="$4"

		if [ "$configured" != 0 ]; then
			fail "$0: configured already, unable to configure"
		fi

		# Add the configuration
		lxc profile create "$bridge"
		lxc profile edit "$bridge" <<EOL
name: $bridge
config:
  user.profile_autoconfig: fanatic
devices:
  eth0:
    nictype: bridged
    parent: $bridge
    type: nic
    mtu: $mtu
EOL
		;;
	remove)
		if [ "$configured" = 0 ]; then
			fail "$0: $lconf: not configured"
		fi
		if [ "$myconfig" != "$configured" ]; then
			fail "$0: $lconf: configured manually not removing"
		fi

		lxc profile delete "$bridge"
		;;
	remove-check)
		if [ "$configured" = 0 ]; then
			return 1
		fi
		if [ "$myconfig" != "$configured" ]; then
			return 1
		fi
		return 0
		;;
	esac
}

enable_lxd()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"

	local fan_bridge=$( fan_to_bridge "$overlay" "$underlay" "$network_mode" )
	
	# Do not attempt to configure LXD if it is not installed.
	if [ ! -e /usr/bin/lxd ]; then
		echo "LXD not installed, unable to configure"
		return
	fi

	# If we are alreday configured, skip.
	if twiddle_lxd_config remove-check "$device" "$fan_bridge"; then
		echo "LXD already configured"
		return
	fi

	if [ "$interactive" -eq 1 ]; then
		while :
		do
			read -p "Create LXD networking for underlay:$underlay overlay:$overlay [Yn]: " confirm
			case "$confirm" in
			n*|N*)		return ;;
			y*|Y*)		break ;;
			'')		break ;;
			esac
		done
	fi
	progress "configuring LXD for underlay:$underlay overlay:$overlay ($fan_bridge)"
	twiddle_lxd_config add "$device" "$fan_bridge" "$network_mtu"
}

disable_lxd()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"

	local fan_bridge=$( fan_to_bridge "$overlay" "$underlay" "$network_mode" )

	if twiddle_lxd_config remove-check "$device" "$fan_bridge"; then
		if [ "$interactive" -eq 1 ]; then
			while :
			do
				read -p "Remove LXD networking for underlay:$underlay overlay:$overlay [Yn]: " confirm
				case "$confirm" in
				n*|N*)		return ;;
				y*|Y*)		break ;;
				'')		break ;;
				esac
			done
		fi
		progress "de-configuring LXD underlay:$underlay overlay:$overlay"
		twiddle_lxd_config remove "$device" "$fan_bridge"
	fi
}

identify_remote()
{
	local rip="$O_remote"

	echo "This host IP address: ${network_underlay_addr%/*}"

	[ "$rip" = 'none' ] && end 'Testing skipped'
	if [ "$rip" = '' ]; then
		while :
		do
			read -p "Remote test host IP address (none to skip): " rip
			case "$rip" in
			[0-9]*.[0-9]*.[0-9]*.[0-9]*)	break ;;
			''|none)			end 'Testing skipped' ;;
			*)
				echo "$nrip: badly formed IP address"
				;;
			esac
		done
	fi
	remote_ip="$rip"
}

#
# TEST-GROUP: test_local_all
#
test_local_all()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"

	test_local_lxd "$@"
	test_local_docker "$@"
}

#
# TEST-GROUP: test_all
#
test_all()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"
	local ip_th="$4"

	test_host "$@"
}

test_host()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"
	local ip_th="$4"

	__ip_to_num_width "$underlay"
	local underlay_width="$RET2"

	underlay_th="$ip_th/$underlay_width"

	local ip=$( fan_to_host_ip $overlay $underlay "$network_mode" )
	local ip_tho=$( fan_to_host_ip $overlay $underlay_th "$network_mode" )

	echo "host test: starting ..."

	__ip_to_num_width "$ip"
	local ip_num="$RET"
	__ip_to_num_width "$ip_tho"
	local ip_num_tho="$RET"

	local rc
	if [ "$ip_num" -lt "$ip_num_tho" ]; then
		local_test 'master' "$ip" "$ip_tho"
		rc="$?"
	else
		local_test 'slave' "$ip" "$ip_tho"
		rc="$?"
	fi
	echo "host test: test complete $( rc_to_result "$rc" ) (local=$rc)"
}

# library: IP address manipulation.
__ip_split()
{
	eval `echo "$1" | {
		IFS=./ read a b c d e f
		echo ip_a="$a" ip_b="$b" ip_c="$c" ip_d="$d" ip_e="$e"
	}`
}

__width_to_mask()
{
	local width="$1"
	local mask=""
	local zeros="$(( (32-$width)/4 ))"

	while [ "$width" -ge 4 ]; do
		mask="${mask}F"
		width="$(($width - 4))"
	done
	case "$width" in
	3)	mask="${mask}E" ;;
	2)	mask="${mask}C" ;;
	1)	mask="${mask}8" ;;
	esac

	while [ "$zeros" -gt 0 ]; do
		mask="${mask}0"
		zeros="$(($zeros - 1))"
	done

	#printf "%x %x\n" "$((0x$mask))" "$(( (~0x$mask) & 0xffffffff ))"

	RET="$(( 0x$mask ))"
}

__ip_to_num_width()
{
	local ip_a
	local ip_b
	local ip_c
	local ip_d
	local ip_e
	local ip_f

	__ip_split "$1"

	RET="$(( ($ip_a << 24) | ($ip_b << 16) | ($ip_c << 8) | $ip_d ))"
	RET2="$ip_e"
}

__num_to_ip()
{
	local ip_num="$1"
	local ip_sep="$2"

	[ "$ip_sep" = '' ] && ip_sep='.'

	RET="$(( (($ip_num >> 24) & 0xff) ))$ip_sep$(( (($ip_num >> 16) & 0xff) ))$ip_sep$(( (($ip_num >> 8) & 0xff) ))$ip_sep$(( $ip_num & 0xff ))"
}
# library: end

# library: Bridges.
__fan_to_bridge_ipnum()
{
	local overlay="$1"
	local underlay="$2"
	local mode="$3"

	__ip_to_num_width "$overlay"
	local overlay_ipnum="$RET"
	local overlay_width="$RET2"

	__ip_to_num_width "$underlay"
	local underlay_ipnum="$RET"
	local underlay_width="$RET2"
	__width_to_mask "$underlay_width"
	local underlay_mask="$(( ~ $RET ))"
	local underlay_shift="$(( $underlay_width - $overlay_width ))"

	local bridge_name_ipnum="$(( $overlay_ipnum | (($underlay_ipnum & $underlay_mask) << $underlay_shift) ))"
	RET2="$bridge_name_ipnum"

	case "$mode" in
	compact)
		bridge_name_ipnum="$overlay_ipnum"
		;;
	esac

	local subnet_width="$(( $overlay_width + ( 32 - $underlay_width ) ))"
	RET3="$subnet_width"

	RET="$bridge_name_ipnum"
}

fan_to_bridge()
{
	__fan_to_bridge_ipnum "$@"

        __num_to_ip "$RET" "-"
        RET=${RET%-0}; RET=${RET%-0}; RET=${RET%-0};

	echo "fan-$RET"
}

fan_to_host_ip()
{
	__fan_to_bridge_ipnum "$@"

        __num_to_ip "$(( $RET2 + 1 ))"

	echo "$RET"
}

fan_to_docker_cidr()
{

	__fan_to_bridge_ipnum "$@"
	local width="$RET3"

        __num_to_ip "$(( $RET2 ))"

	echo "$RET/$width"
}
# library: end

# test-payload: start
dns_lookup_forwarder()
{
	local role="$1"
	RET=""

	local nic1=$(cat /proc/net/route|awk '$2=="00000000"{print $1; exit}')
	echo "$role: detected primary route through $nic1"

	local dns1=""
	local timeout=30
	while [ $timeout -gt 0 ]; do
		dns1=$(awk '$1=="nameserver"{print $2; exit}' /etc/resolv.conf)
		if [ "$dns1" != "" ]; then
			break
		fi
		echo "$role: waiting for primary nameserver..."
		sleep 2
		timeout=$(( timeout - 2 ))
	done
	if [ "$dns1" = "" ]; then
		echo "$role: failed to obtain DNS"
		return 1
	fi
	if [ "$dns1" = "127.0.0.53" ]; then
		local dns2=""
		timeout=30
		while [ $timeout -gt 0 ]; do
			dns2=$(systemd-resolve --status $nic1| \
				awk '/DNS Servers:/{print; exit}')
			if [ "$dns2" != "" ]; then
				break
			fi
			echo "$role: waiting for systemd resolver..."
			sleep 2
			timeout=$(( timeout - 2 ))
		done
		if [ "$dns2" = "" ]; then
			echo "$role: systemd-resolve failure!"
			return 1
		fi
		dns2=$(echo "$dns2"|awk '{sub(/.*DNS Servers: */, ""); print}')
		echo "$role: DNS: systemd($dns2)"
		RET="$dns2"
	else
		echo "$role: DNS: $dns1"
	fi
	return 0
}

nc_receive()
{
	local ip="$1"
	local port="$2"

	echo "receiving on $ip:$port ..." 1>&2
	nc -d -n -l "$ip" "$port"
}
nc_send()
{
	local ip="$1"
	local port="$2"
	local data="$3"
	local N_opt=""

	# Newer nc requires -N to shutdown connection correctly
	if [ "$(nc -h 2>&1 | grep -- -N)" != "" ]; then
		N_opt="-N"
	fi

	local file=0
	[ "$#" -eq 2 ] && file=1
		
	local cnt=30
	echo "sending to $ip:$port ..." 1>&2
	while [ $cnt -gt 0 ]
	do
		if [ "$file" -eq 0 ]; then
			echo "$data" | nc $N_opt -n "$ip" "$port"
		else
			nc $N_opt -n "$ip" "$port"
		fi
		if [ $? -eq 0 ]; then
			# short delay to allow receive side to terminate
			sleep 1
			break
		fi
		sleep 2
		cnt=$(( cnt-1 ))
	done

	if [ $cnt -lt 1 ]; then
		fail "nc_send: failed to send -- timeout"
	fi
}

rc_to_result()
{
	if [ "$1" -eq 0 ]; then
		echo 'PASS'
	else
		echo 'FAIL'
	fi
}
test_report()
{
	local which="$1"
	local rc="$2"
	local ts="$3"

	echo "$which ... $( rc_to_result "$rc" )"
	if [ "$rc" != 0 ]; then
		echo "--- transcript start ---"
		cat "$ts"
		echo "--- transcript end ---"
	fi

	rm -f "$ts"
}
__payload_prepare()
{
	local master="$1"
	local lip="$2"
	local rip="$3"

	local update=1

	if ! dns_lookup_forwarder "$master"; then
		return 1
	fi

	# PREPARE: ensure we have the appropriate tools
	if ! type ping >/dev/null 2>&1; then
		echo "$test $master: installing ping ..."
		if [ "$update" = 1 ]; then
			apt-get -qq update
			update=0
		fi
		apt-get -qq install -y iputils-ping 2>&1 || return 1
	fi
	if ! type nc >/dev/null 2>&1; then
		echo "$test $master: installing nc ..."
		if [ "$update" = 1 ]; then
			apt-get -q update
			update=0
		fi
		apt-get -qq install -y netcat-openbsd 2>&1 || return 1
	fi

	return 0
}
__payload_test()
{
	local master="$1"
	local lip="$2"
	local rip="$3"

	local out="/tmp/fantic-test-transcript.$$"
	local rc
	local rc_all=0

	# TEST: ping test
	echo "test $master: ping test ($rip) ..."
	(
		ping -c 5 "$rip"
	) >"$out" 2>&1
	rc=$?
	rc_all=$(($rc_all + $rc))
	test_report "test $master: ping test" "$rc" "$out"

	# TEST: short data test
	echo "test $master: short data test ($lip -> $rip) ..."
	(
		if [ "$master" = 'master' ]; then
			nc_send "$rip" 9999 "HELLO $lip" || fail "test $master: unable to send data to $rip"
			data=$( nc_receive "$lip" 9999 )
		else
			data=$( nc_receive "$lip" 9999 )
			nc_send "$rip" 9999 "HELLO $lip"

		fi
		if [ "$data" != "HELLO $rip" ]; then
			fail "test $master: bad data receieved from $rip"
		fi
	) >"$out" 2>&1
	rc=$?
	rc_all=$(($rc_all + $rc))
	test_report "test $master: short data" "$rc" "$out"

	# TEST: long data test
	echo "test $master: long data test ($lip -> $rip) ..."
	(
		local md5sum=$( cat /bin/* | md5sum - | awk '{print $1}' )
		local rsum_expected
		local rsum_is

		if [ "$master" = 'slave' ]; then
			nc_send "$rip" 9991 "$md5sum" || fail "test $master: unable to send md5sum data to $rip"
			cat /bin/* | nc_send "$rip" 9991 || fail "test $master: unable to send file data to $rip"

			rsum_expected=$( nc_receive "$lip" 9992 )
			rsum_is=$( nc_receive "$lip" 9992 | md5sum - | awk '{print $1}' )
		else
			rsum_expected=$( nc_receive "$lip" 9991 )
			rsum_is=$( nc_receive "$lip" 9991 | md5sum - | awk '{print $1}' )

			nc_send "$rip" 9992 "$md5sum" || fail "test $master: unable to send md5sum data to $rip"
			cat /bin/* | nc_send "$rip" 9992 || fail "test $master: unable to send file data to $rip"
		fi
		echo "rsum_expected<$rsum_expected> rsum_is<$rsum_is>"
		if [ "$rsum_expected" != "$rsum_is" ]; then
			fail "test $master: bad data receieved from $rip ($rsum_expected != $rsum_is)"
		fi
	) >"$out" 2>&1
	rc=$?
	rc_all=$(($rc_all + $rc))
	test_report "test $master: long data" "$rc" "$out"
	##test_report "test $master: long data" "1" "$out"

	return $rc_all
}
# test-payload: end
local_prepare()
{
	(
		__payload_prepare "$@"
	)
}
local_test()
{
	(
		__payload_test "$@"
	)
}
payload_init()
{
	sed -n -e '/^# test-payload: start/,/^# test-payload: end/p' "$0";
}
payload_prepare()
{
	local master="$1"
	local lip="$2"
	local rip="$3"

	echo "__payload_prepare '$master' '$lip' '$rip'"
}
payload_test()
{
	local master="$1"
	local lip="$2"
	local rip="$3"

	echo "__payload_test '$master' '$lip' '$rip'"
}

get_local_lxd_storage()
{
	local list=""

	list="$(lxc storage list 2>/dev/null)" || return 1

	echo "$list" | awk '
		FNR>3 && /^\|/{
			split($0, A, " ?| ?")
			print A[2]
		}
	' | head -1

	return 0
}

test_local_lxd()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"
	local rc

	local fan_bridge=$( fan_to_bridge "$overlay" "$underlay" "$network_mode" )
	local ip=$( fan_to_host_ip $overlay $underlay "$network_mode" )
	local name="fanatic-test"

	if ! twiddle_lxd_config remove-check "$device" "$fan_bridge"; then
		return 0
	fi

	if [ "$interactive" -eq 1 ]; then
		while :
		do
			echo "Test LXD networking for underlay:$underlay overlay:$overlay"
			read -p "(NOTE: potentially triggers large image downloads) [Yn]: " confirm
			case "$confirm" in
			n*|N*)		return ;;
			y*|Y*)		break ;;
			'')		break ;;
			esac
		done
	fi
	
	# Prepare the local host.
	local_prepare 'master' "$ip" "$ip_container"
	rc=$?
	if [ $rc -ne 0 ]; then
		echo "local lxd test: prepare master failed!"
		return $rc
	fi

	#local series=$( lsb_release -sr )
	local series='lts'
	local storage_opt="$(get_local_lxd_storage)"

	if [ "$storage_opt" != "" ]; then
		storage_opt="--storage $storage_opt"
	fi
	echo "local lxd test: creating test container (Ubuntu:$series) ..."
	lxc launch "ubuntu:$series" fanatic-test $storage_opt -p "$fan_bridge"

	# wait for eth0 -- XXX: needs to timeout
	while :
	do
		echo "lxd test: Waiting for addresses on eth0 ..."
		ip_container="$(lxc exec fanatic-test -- ip -4 addr show dev eth0 | grep inet | awk -F '[/ ]*' '{print $3; exit}')"
		[ "$ip_container" != '' ] && break
		sleep 2
	done

	# Prepare the payload container.
	{
		payload_init
		payload_prepare 'slave' "$ip_container" "$ip"
		local rc=$?
		exit $rc
	} | lxc exec "$name" /bin/sh
	rc=$?
	if [ $rc -ne 0 ]; then
		echo "local lxd test: prepare slave failed!"
		echo "local lxd test: destroying test container ..."
		lxc stop "$name"
		lxc delete "$name"
		return $rc
	fi

	# Fire off the test payload in the LXC container.
	(
		{
			payload_init
			payload_test 'slave' "$ip_container" "$ip"
		} | lxc exec "$name" /bin/sh
		local rc="$?"
		exit "$rc"
	) &

	local rc1
	local rc2

	# Run the payload locally as master.
	local_test 'master' "$ip" "$ip_container"
	rc1="$?"
	[ "$rc1" -ne 0 ] && rc="$rc1"

	# Wait for the LXD container payload to report.
	wait $!
	rc2="$?"
	[ "$rc2" -ne 0 ] && rc="$rc2"

	echo "local lxd test: destroying test container ..."
	lxc stop "$name"
	lxc delete "$name"

	echo "local lxd test: test complete $( rc_to_result "$rc" ) (master=$rc1 slave=$rc2)"
	return "$rc"
}

test_local_docker()
{
	local device="$1"
	local overlay="$2"
	local underlay="$3"

	local fan_bridge=$( fan_to_bridge "$overlay" "$underlay" "$network_mode" )
	local ip=$( fan_to_host_ip "$overlay" "$underlay" "$network_mode" )
	local name="fanatic-test"
	local rc=0

	if ! twiddle_docker_config remove-check "$device" "$fan_bridge"; then
		return
	fi

	if [ "$interactive" -eq 1 ]; then
		while :
		do
			echo "Test docker networking for underlay:$underlay overlay:$overlay"
			read -p "(NOTE: potentially triggers large image downloads) [Yn]: " confirm
			case "$confirm" in
			n*|N*)		return ;;
			y*|Y*)		break ;;
			'')		break ;;
			esac
		done
	fi


	# Check if we have images already...
	local images=$( docker images -q ubuntu | wc -l )
	if [ "$images" -eq 0 ]; then
		echo "local docker test: pulling container images ..."
		docker pull ubuntu
		rc=$?
		if [ $rc -ne 0 ]; then
			echo "local docker test: docker pull ubuntu failure!"
			echo "local docker test: skipping test."
			return $rc
		fi
	fi

	local dver=$(docker -v | awk '{sub(/,/, "", $3); print $3}')
	local net_opt=""
	if dpkg --compare-versions "$dver" ge 1.12; then
		net_opt="--network $fan_bridge"
	fi

	# Just in case, if there is still a container with our target name
	# around, kill it (we are fanatic after all)...
	if [ "$(docker ps | grep "$name")" != "" ]; then
		echo "local docker test: stopping existing container..."
		docker stop "$name"
	fi
	if [ "$(docker inspect "$name" 2>/dev/null)" != "[]" ]; then
		echo "local docker test: removing existing container..."
		docker rm "$name"
	fi

	# Prepare the local host.
	local dns_opt=""
	if ! dns_lookup_forwarder 'master'; then
		return 1
	fi
	if [ "$RET" != '' ]; then
		echo "local docker test: *** Using DNS override ***"
		dns_opt="--dns=$RET"
		echo "  $dns_opt"
	fi

	local_prepare 'master' "$ip" "$ip_container"
	rc=$?

	if [ $rc -ne 0 ]; then
		echo "local docker test: prepare master failed!"
		return $rc
	fi

	# Start a test container.
	echo "local docker test: creating test container ..."
	docker run --name "$name" $net_opt $dns_opt -d ubuntu sleep 3600
	rc=$?
	if [ $rc -ne 0 ]; then
		echo "local docker test: container failed to start!"
		echo "local docker test: skipping other tests."
		docker rm "$name"
		return $rc
	fi

	if [ "$net_opt" != "" ]; then
		ip_container=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$name")
	else
	        ip_container=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' "$name")
	fi

	# Prepare the payload container.
	{
		payload_init
		payload_prepare 'slave' "$ip_container" "$ip"
		local rc=$?
		exit $rc
	} | docker exec -i "$name" /bin/sh
	rc=$?

	if [ $rc -ne 0 ]; then
		echo "local docker test: prepare slave failed!"
		echo "local docker test: destroying test container ..."
		docker stop "$name"
		docker rm "$name"
		return $rc
	fi

	# Fire off the test payload in the LXC container.
	(
		{
			payload_init
			payload_test 'slave' "$ip_container" "$ip"
		} | docker exec -i "$name" /bin/sh
		local rc="$?"
		exit "$rc"
	) &

	local rc1
	local rc2

	# Run the payload locally as master.
	local_test 'master' "$ip" "$ip_container"
	rc1="$?"
	[ "$rc1" -ne 0 ] && rc="$rc1"

	# Wait for the docker container payload to report.
	wait $!
	rc2="$?"
	[ "$rc2" -ne 0 ] && rc="$rc2"

	echo "local docker test: destroying test container ..."
	docker stop "$name"
	docker rm "$name"

	echo "local docker test: test complete $( rc_to_result "$rc" ) (master=$rc1 slave=$rc2)"
	return "$rc"
}

overlay_device()
{
	local format="$1"
	local a1="$2"

	case "$format" in
	A)		overlay="$a1" ;;
	*)		fail "$overlay: unknown overlay network format" ;;
	esac
}

underlay_device()
{
	local format="$1"
	local a1="$2"
	local a2="$3"

	case "$format" in
	A)		underlay="$a1" ;;
	B)		[ "$a1" = "default" ] && a1=`ip route show 0.0.0.0/0 | awk '{print $5; exit}'`
			a1="`ip -4 addr show dev "$a1" | grep inet | awk -F '[/ ]*' '{print $3; exit}'`"
			[ "$a1" = "" ] && fail "$a1: device address not found"
			underlay="$a1/$a2" 
			;;
	*)		fail "$underlay: unknown underlay network format" ;;
	esac
}

__underlay_lookup_address()
{
	local ipnum="$1"
	local width="$2"

	__width_to_mask "$width"
	local tmp
	local interface
	local what
	local address
	local address_mask="$RET"
	local address_ipnum
	local address_ipnum_prefix
	local address_prefix

	address_prefix="$(( $ipnum & $address_mask ))"
	# If an address on the network was specified find exactly that.
	if [ "$ipnum" -ne "$address_prefix" ]; then
		address_prefix="$ipnum"
		address_mask="$(( ~0 ))"
	fi

	ip -o addr show | \
	while read tmp interface what address tmp
	do
		case "$what" in
		inet)
			__ip_to_num_width "$address"
			address_ipnum="$RET"
			address_ipnum_prefix="$(( $RET & $address_mask ))"
			if [ "$address_ipnum_prefix" -eq "$address_prefix" ]; then
				__num_to_ip "$address_ipnum"
				echo "$RET/$width"
			fi
			;;
		esac
	done
}

underlay_lookup_address()
{
	eval RET=\'`__underlay_lookup_address "$@"`\'
}

networks_decode_addresses()
{
	local overlay="$1"
	local underlay="$2"

	local format="`echo "$overlay" | sed -n \
		-e 's@^\([0-9][0-9]*\)$@A \1.0.0.0/8@p' \
		-e 's@^\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\/[0-9][0-9]*\)$@A \1@p'
	`"
	overlay_device $format

	local format="`echo "$underlay" | sed -n \
		-e 's@^\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$@A \1/16@p' \
		-e 's@^\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\/[0-9][0-9]*\)$@A \1@p' \
		-e 's@^\([a-z][a-z]*[0-9][0-9]*\|default\)$@B \1 16@p' \
		-e 's@^\([a-z][a-z]*[0-9][0-9]*\|default\)/\([0-9][0-9]*\)$@B \1 \2@p' \
	`"
	underlay_device $format

	# Find matching address(es) ...
        __ip_to_num_width "$underlay"
        local underlay_raw_ipnum="$RET"
        local underlay_width="$RET2"

        underlay_lookup_address "$underlay_raw_ipnum" "$underlay_width"
}

# Default the network interface to the one connected to our default route.
parse_commandline()
{
	local operation="$1"
	shift

	TEMP=$(getopt \
		-n "fanatic: $operation:" \
		-o 'u:o:r:' -l 'underlay:,overlay:,remote:' \
		-l 'no-docker-restart' \
		-- "$@"
	)
	if [ "$?" != 0 ]; then
		fail "$operation: invalid options"
	fi

	eval set -- "$TEMP"

	O_underlay=''
	O_overlay=''
	O_remote=''
	O_docker_restart=''

	# Legacy mode.
	if [ "$1" = '--' ]; then
		shift

		if [ "$#" -eq 0 ]; then
			return
		fi

		if [ "$#" -lt 2 ]; then
			fail "$operation: invalid options"
		fi
		O_overlay="$1"
		O_underlay="$2"
		shift 2

		if [ "$#" -lt 1 ]; then
			return
		fi
		O_remote="$1"
		shift

		if [ "$#" -gt 1 ]; then
			fail "$operation: invalid options"
		fi

		return
	fi

	while [ "$#" -gt 0 ]
	do
		case "$1" in
		--)
			shift
			break
			;;
		-u|--underlay)
			O_underlay="$2"
			shift 2
			;;
		-o|--overlay)
			O_overlay="$2"
			shift 2
			;;
		-r|--remote)
			O_remote="$2"
			shift 2
			;;
		--no-docker-restart)
			O_docker_restart=n
			shift
			;;
		esac
	done
}

identify_network()
{
	local operation="$1"

	local underlay="$O_underlay"
	local overlay="$O_overlay"

	local provided=1
	if [ "$overlay" = '' ]; then
		provided=0
		overlay='default'
	fi
	if [ "$underlay" = '' ]; then
		provided=0
		underlay='default'
	fi

	# Clear out the overlay/underlay specifiers.
	if [ "$overlay" = 'default' -o "$overlay" = '-' ]; then
		overlay="$network_overlay_default"
	fi

	if [ "$underlay" = 'default' -o "$underlay" = '-' ]; then
		# Work up a network prefix match for the default device.
		detect_network 'default'
		local underlay_addr="$RET2"

		__ip_to_num_width "$underlay_addr"
		local underlay_addr_num="$RET"

		__width_to_mask "$network_underlay_width"
		local underlay_mask="$RET"

		local underlay_prefix_num="$(( $underlay_addr_num & $underlay_mask ))"
		__num_to_ip "$underlay_prefix_num"

		underlay="$RET/$network_underlay_width"

	fi

	networks_decode_addresses "$overlay" "$underlay"

	#echo "overlay<$overlay> underlay<$underlay> RET<$RET>"

	network_tag=$( echo "$overlay" | sed -e 's@/@_@g' )
	network_overlay="$overlay"
	network_underlay="$underlay"
	network_underlay_addr="${RET%% *}"

	if [ "$provided" -eq 0 ]; then
		local over
		local under
		read -p "$operation fan underlay (hit return to accept, or specify alternative) [$underlay]: " under
		read -p "$operation fan overlay (hit return to accept, or specify alternative) [$overlay]: " over
		if [ "$under" != '' -o "$over" != '' ]; then
			O_underlay="${under:-$underlay}"
			O_overlay="${over:-$overlay}"
			identify_network "$operation"
		fi
	fi
}

welcome()
{
	cat - <<EOM
Welcome to the fanatic fan networking wizard.  This will help you set
up an example fan network and optionally configure docker and/or LXD to
use this network.  See fanatic(8) (man 8 fanatic) for more details.

EOM
}

help()
{
	echo "Usage: $0 [<command>] [<options>...]"
	echo ""
	welcome

	echo "Basic commands:"
	echo "  configure        - interactively create Fan configuration"
	echo "  deconfigure      - interactively deconfigure Fan configuration"
	echo "  test             - interactively test Fan configuration"
	echo "  help             - display this help"

	echo ""
	echo "Non-interactive commands (see fanatic(8) for more details):"
	echo "  enable-fan -u <underlay> -o <overlay>"
	echo "  disable-fan -u <underlay> -o <overlay>"
	echo "  enable-lxd -u <underlay> -o <overlay>"
	echo "  disable-lxd -u <underlay> -o <overlay>"
	echo "  enable-docker -u <underlay> -o <overlay>"
	echo "  disable-docker -u <underlay> -o <overlay>"
	echo "  test-host -u <underlay> -o <overlay> -r <remote host IP>"
	echo "  test-local-lxd -u <underlay> -o <overlay>"
	echo "  test-local-docker -u <underlay> -o <overlay>"
}

interactive=0
cmd="$1"
[ "$#" -ge 1 ] && shift 1
[ "$cmd" = '' ] && cmd='configure'

case "$cmd" in	
-?|-h|--help|help)
	help "$@"
	exit 0
	;;
configure)
	interactive=1
	parse_commandline 'Configure' "$@"

	#echo "O_underlay<$O_underlay> O_overlay<$O_overlay> O_remote<$O_remote>"

	[ "$interactive" -eq 1 ] && welcome


	identify_network 'Configure'
	#echo "network_overlay<$network_overlay> network_underlay<$network_underlay>"

	enable_fan "$network_tag" "$network_overlay" "$network_underlay"
	enable_lxd "$network_tag" "$network_overlay" "$network_underlay"
	enable_docker "$network_tag" "$network_overlay" "$network_underlay" "$network_underlay_addr"

	test_local_all "$network_tag" "$network_overlay" "$network_underlay_addr"

	identify_remote
	#echo "remote_ip<$remote_up>"

	test_all "$network_tag" "$network_overlay" "$network_underlay_addr" "$remote_ip"
	;;
deconfigure|unconfigure)
	interactive=1
	parse_commandline 'Deconfigure' "$@"

	identify_network 'Deconfigure'
	disable_docker "$network_tag" "$network_overlay" "$network_underlay" "$network_underlay_addr"
	disable_lxd "$network_tag" "$network_overlay" "$network_underlay"
	disable_fan "$network_tag" "$network_overlay" "$network_underlay"
	;;
enable-fan)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Reconfigure'
	enable_fan "$network_tag" "$network_overlay" "$network_underlay"
	;;
disable-fan)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Reconfigure'
	disable_fan "$network_tag" "$network_overlay" "$network_underlay"
	;;
enable-docker)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Reconfigure'
	enable_docker "$network_tag" "$network_overlay" "$network_underlay" "$network_underlay_addr"
	;;
disable-docker)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Reconfigure'
	disable_docker "$network_tag" "$network_overlay" "$network_underlay" "$network_underlay_addr"
	;;
enable-lxd)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Reconfigure'
	enable_lxd "$network_tag" "$network_overlay" "$network_underlay"
	;;
disable-lxd)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Reconfigure'
	disable_lxd "$network_tag" "$network_overlay" "$network_underlay"
	;;
test)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Test'
	
	test_local_all "$network_tag" "$network_overlay" "$network_underlay_addr"

	identify_remote
	test_all "$network_tag" "$network_overlay" "$network_underlay_addr" "$remote_ip"
	;;
test-host)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Test'
	identify_remote
	test_host "$network_tag" "$network_overlay" "$network_underlay_addr" "$remote_ip"
	;;
test-local-lxd)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Test'
	test_local_lxd "$network_tag" "$network_overlay" "$network_underlay_addr"
	;;
test-local-docker)
	parse_commandline 'Reconfigure' "$@"
	identify_network 'Test'
	test_local_docker "$network_tag" "$network_overlay" "$network_underlay_addr"
	;;
*)
	usage "$cmd: unknown command"
	;;
esac

Filemanager

Name Type Size Permission Actions
ModemManager File 1.37 MB 0755
NetworkManager File 2.54 MB 0755
a2disconf File 15.89 KB 0755
a2dismod File 15.89 KB 0755
a2dissite File 15.89 KB 0755
a2enconf File 15.89 KB 0755
a2enmod File 15.89 KB 0755
a2ensite File 15.89 KB 0755
a2query File 9.64 KB 0755
aa-remove-unknown File 2.85 KB 0755
aa-status File 8.41 KB 0755
accessdb File 10.23 KB 0755
acpid File 50.84 KB 0755
add-shell File 860 B 0755
addgnupghome File 3.01 KB 0755
addgroup File 36.45 KB 0755
adduser File 36.45 KB 0755
apache2 File 659.69 KB 0755
apache2ctl File 7.06 KB 0755
apachectl File 7.06 KB 0755
apparmor_status File 8.41 KB 0755
applygnupgdefaults File 2.17 KB 0755
arp File 61.3 KB 0755
arpd File 54.03 KB 0755
aspell-autobuildhash File 13.22 KB 0755
atd File 26.01 KB 0755
bcache-super-show File 13.99 KB 0755
biosdecode File 18.87 KB 0755
chat File 30.01 KB 0755
check_forensic File 952 B 0755
chgpasswd File 57.83 KB 0755
chmem File 42.08 KB 0755
chpasswd File 53.86 KB 0755
chroot File 38.18 KB 0755
cpgr File 55.96 KB 0755
cppw File 55.96 KB 0755
cron File 46.3 KB 0755
cryptdisks_start File 1.11 KB 0755
cryptdisks_stop File 1.16 KB 0755
danted File 858.54 KB 0755
dbconfig-generate-include File 12.37 KB 0755
dbconfig-load-include File 5.57 KB 0755
delgroup File 16.11 KB 0755
deluser File 16.11 KB 0755
dmidecode File 106.54 KB 0755
dnsmasq File 379.6 KB 0755
dpkg-preconfigure File 3.58 KB 0755
dpkg-reconfigure File 4.34 KB 0755
e2freefrag File 14.07 KB 0755
e4crypt File 22.07 KB 0755
e4defrag File 25.99 KB 0755
escapesrc File 22.16 KB 0755
faillock File 13.99 KB 0755
fanatic File 35.21 KB 0755
fanctl File 41.98 KB 0755
fdformat File 30.08 KB 0755
filefrag File 14.02 KB 0755
gconf-schemas File 4.45 KB 0755
genccode File 10.36 KB 0755
gencmn File 10.44 KB 0755
genl File 58.05 KB 0755
gennorm2 File 54.59 KB 0755
gensprep File 18.5 KB 0755
groupadd File 61.92 KB 0755
groupdel File 70.37 KB 0755
groupmems File 57.87 KB 0755
groupmod File 68.18 KB 0755
grpck File 53.8 KB 0755
grpconv File 49.68 KB 0755
grpunconv File 49.68 KB 0755
grub-install File 1003.51 KB 0755
grub-macbless File 780.84 KB 0755
grub-mkconfig File 8.03 KB 0755
grub-mkdevicemap File 207.62 KB 0755
grub-probe File 793.09 KB 0755
grub-reboot File 4.73 KB 0755
grub-set-default File 832 B 0755
grub-set-default-legacy-ec2 File 3.13 KB 0755
grub-set-default.real File 3.47 KB 0755
hddtemp File 38.68 KB 0755
httxt2dbm File 9.99 KB 0755
iconvconfig File 30.25 KB 0755
icupkg File 18.77 KB 0755
init.lxc File 38.5 KB 0755
init.lxc.static File 1005.91 KB 0755
invoke-rc.d File 15.66 KB 0755
ip6tables-apply File 6.85 KB 0755
iptables-apply File 6.85 KB 0755
irqbalance File 62.68 KB 0755
irqbalance-ui File 34.06 KB 0755
isadump File 13.99 KB 0755
isaset File 9.99 KB 0755
iscsi-iname File 9.99 KB 0755
iscsi_discovery File 5.16 KB 0755
iscsid File 398.15 KB 0755
iscsistart File 358.13 KB 0755
ispell-autobuildhash File 15.39 KB 0755
ldattach File 30.08 KB 0755
locale-gen File 4.3 KB 0755
logrotate File 74.09 KB 0755
luksformat File 3.32 KB 0755
make-bcache File 18.07 KB 0755
make-ssl-cert File 3.78 KB 0755
mkinitramfs File 10.89 KB 0755
mklost+found File 9.99 KB 0755
mysqld File 23.16 MB 0755
netfilter-persistent File 1.05 KB 0755
netplan File 798 B 0755
newusers File 82.39 KB 0755
nfnl_osf File 13.99 KB 0755
nologin File 5.99 KB 0755
openvpn File 750.27 KB 0755
overlayroot-chroot File 2.45 KB 0755
ownership File 10.13 KB 0755
pam-auth-update File 19.38 KB 0755
pam_getenv File 2.82 KB 0755
pam_timestamp_check File 9.99 KB 0755
paperconfig File 4.07 KB 0755
php7-fpm File 37.24 MB 0755
phpdismod File 7.11 KB 0755
phpenmod File 7.11 KB 0755
phpquery File 6.24 KB 0755
pma-configure File 299 B 0755
pma-secure File 157 B 0755
popcon-largest-unused File 543 B 0755
popularity-contest File 4.92 KB 0755
pppd File 369.73 KB 4754
pppdump File 18.1 KB 0755
pppoe-discovery File 18 KB 0755
pppstats File 13.99 KB 0755
pptp File 62.98 KB 0755
pptpsetup File 6.46 KB 0755
pwck File 49.8 KB 0755
pwconv File 45.7 KB 0755
pwunconv File 45.68 KB 0755
readprofile File 18.11 KB 0755
recvtty File 3.4 MB 0755
remove-default-ispell File 2.86 KB 0755
remove-default-wordlist File 2.86 KB 0755
remove-shell File 904 B 0755
rmt File 58.39 KB 0755
rmt-tar File 58.39 KB 0755
rsyslogd File 668.54 KB 0755
rtcwake File 42.08 KB 0755
rtkitctl File 10.06 KB 0755
runc File 8.37 MB 0755
sd-helper File 3.26 MB 0755
seccompagent File 2.18 MB 0755
select-default-ispell File 3.23 KB 0755
select-default-wordlist File 3.21 KB 0755
sensors-detect File 204.66 KB 0755
service File 9.04 KB 0755
setvesablank File 14.07 KB 0755
split-logfile File 2.36 KB 0755
sshd File 772.41 KB 0755
tarcat File 936 B 0755
tcpdump File 999.6 KB 0755
tzconfig File 106 B 0755
ufw File 4.82 KB 0755
update-ca-certificates File 5.27 KB 0755
update-default-aspell File 1 KB 0755
update-default-ispell File 9.68 KB 0755
update-default-wordlist File 7.5 KB 0755
update-dictcommon-aspell File 1 KB 0755
update-dictcommon-hunspell File 782 B 0755
update-fonts-alias File 5.71 KB 0755
update-fonts-dir File 3.98 KB 0755
update-fonts-scale File 6.1 KB 0755
update-grub File 64 B 0755
update-grub-legacy-ec2 File 43.96 KB 0755
update-grub2 File 64 B 0755
update-gsfontmap File 450 B 0755
update-icon-caches File 596 B 0755
update-info-dir File 1.66 KB 0755
update-initramfs File 8.04 KB 0755
update-locale File 2.99 KB 0755
update-mime File 8.84 KB 0755
update-passwd File 30.41 KB 0755
update-pciids File 2.84 KB 0755
update-rc.d File 16.12 KB 0755
update-secureboot-policy File 7.43 KB 0755
update-usbids File 1.05 KB 0755
usb_modeswitch File 59.51 KB 0755
usb_modeswitch_dispatcher File 46.16 KB 0755
usbmuxd File 70.38 KB 0755
useradd File 123.28 KB 0755
userdel File 82.48 KB 0755
usermod File 123.06 KB 0755
uuidd File 34.16 KB 0755
validlocale File 1.73 KB 0755
vcstime File 9.99 KB 0755
vigr File 60.18 KB 0755
vipw File 60.18 KB 0755
visudo File 208.8 KB 0755
vpddecode File 14.27 KB 0755
xfce4-kiosk-query File 9.99 KB 0755
xfce4-pm-helper File 9.99 KB 0755
xfpm-power-backlight-helper File 13.99 KB 0755
xfs_admin File 1.35 KB 0755
xfs_bmap File 638 B 0755
xfs_copy File 394.31 KB 0755
xfs_db File 667.63 KB 0755
xfs_estimate File 10.01 KB 0755
xfs_freeze File 767 B 0755
xfs_fsr File 30.02 KB 0755
xfs_growfs File 382.27 KB 0755
xfs_info File 472 B 0755
xfs_io File 130.93 KB 0755
xfs_logprint File 414.27 KB 0755
xfs_mdrestore File 370.28 KB 0755
xfs_metadump File 747 B 0755
xfs_mkfile File 1007 B 0755
xfs_ncheck File 650 B 0755
xfs_quota File 86.01 KB 0755
xfs_rtcp File 13.99 KB 0755
zerofree File 9.99 KB 0755
zic File 54.14 KB 0755