File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/dhcp.tar
Back
debug 0000644 00000002622 15027410053 0005554 0 ustar 00 # # The purpose of this script is just to show the variables that are # available to all the scripts in this directory. All these scripts are # called from dhclient-script, which exports all the variables shown # before. If you want to debug a problem with your DHCP setup you can # enable this script and take a look at /tmp/dhclient-script.debug. # To enable this script set the following variable to "yes" RUN="no" if [ "$RUN" = "yes" ]; then echo "$(date): entering ${1%/*}, dumping variables." \ >> /tmp/dhclient-script.debug # loop over the 4 possible prefixes: (empty), cur_, new_, old_ for prefix in '' 'cur_' 'new_' 'old_'; do # loop over the DHCP variables passed to dhclient-script for basevar in reason interface medium alias_ip_address \ ip_address host_name network_number subnet_mask \ broadcast_address routers static_routes \ rfc3442_classless_static_routes \ domain_name domain_search domain_name_servers \ netbios_name_servers netbios_scope \ ntp_servers \ ip6_address ip6_prefix ip6_prefixlen \ dhcp6_domain_search dhcp6_name_servers ; do var="${prefix}${basevar}" eval "content=\$$var" # show only variables with values set if [ -n "${content}" ]; then echo "$var='${content}'" >> /tmp/dhclient-script.debug fi done done echo '--------------------------' >> /tmp/dhclient-script.debug fi dhclient.conf 0000644 00000003307 15027410053 0007205 0 ustar 00 # Configuration file for /sbin/dhclient. # # This is a sample configuration file for dhclient. See dhclient.conf's # man page for more information about the syntax of this file # and a more comprehensive list of the parameters understood by # dhclient. # # Normally, if the DHCP server provides reasonable information and does # not leave anything out (like the domain name, for example), then # few changes must be made to this file, if any. # option rfc3442-classless-static-routes code 121 = array of unsigned integer 8; send host-name = gethostname(); request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, domain-search, host-name, dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers, netbios-name-servers, netbios-scope, interface-mtu, rfc3442-classless-static-routes, ntp-servers; #send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; #send dhcp-lease-time 3600; #supersede domain-name "fugue.com home.vix.com"; #prepend domain-name-servers 127.0.0.1; #require subnet-mask, domain-name-servers; timeout 300; #retry 60; #reboot 10; #select-timeout 5; #initial-interval 2; #script "/sbin/dhclient-script"; #media "-link0 -link1 -link2", "link0 link1"; #reject 192.33.137.209; #alias { # interface "eth0"; # fixed-address 192.5.5.213; # option subnet-mask 255.255.255.255; #} #lease { # interface "eth0"; # fixed-address 192.33.137.200; # medium "link0 link1"; # option host-name "andare.swiftmedia.com"; # option subnet-mask 255.255.255.0; # option broadcast-address 192.33.137.255; # option routers 192.33.137.250; # option domain-name-servers 127.0.0.1; # renew 2 2000/1/12 00:00:01; # rebind 2 2000/1/12 00:00:01; # expire 2 2000/1/12 00:00:01; #} dhclient-exit-hooks.d/hook-dhclient 0000755 00000001445 15027410053 0013327 0 ustar 00 #!/bin/sh # This file is part of cloud-init. See LICENSE file for license information. # This script writes DHCP lease information into the cloud-init run directory # It is sourced, not executed. For more information see dhclient-script(8). is_azure() { local dmi_path="/sys/class/dmi/id/board_vendor" vendor="" if [ -e "$dmi_path" ] && read vendor < "$dmi_path"; then [ "$vendor" = "Microsoft Corporation" ] && return 0 fi return 1 } is_enabled() { # only execute hooks if cloud-init is enabled and on azure [ -e /run/cloud-init/enabled ] || return 1 is_azure } if is_enabled; then case "$reason" in BOUND) cloud-init dhclient-hook up "$interface";; DOWN|RELEASE|REBOOT|STOP|EXPIRE) cloud-init dhclient-hook down "$interface";; esac fi dhclient-exit-hooks.d/resolved 0000755 00000012654 15027410053 0012426 0 ustar 00 #!/bin/sh ## Sourced, not exec'ed, but helps syntax highlighting # # Script fragment to make dhclient supply nameserver information to resolved # # Tips: # * Be careful about changing the environment since this is sourced # * This script fragment uses bash features # * As of isc-dhcp-client 4.2 the "reason" (for running the script) can be one of the following. # (Listed on man page:) MEDIUM(0) PREINIT(0) BOUND(M) RENEW(M) REBIND(M) REBOOT(M) EXPIRE(D) FAIL(D) RELEASE(D) STOP(D) NBI(-) TIMEOUT(M) # (Also used in master script:) ARPCHECK(0), ARPSEND(0) # (Also used in master script:) PREINIT6(0) BOUND6(M) RENEW6(M) REBIND6(M) DEPREF6(0) EXPIRE6(D) RELEASE6(D) STOP6(D) # (0) = master script does not run make_resolv_conf # (M) = master script runs make_resolv_conf # (D) = master script downs interface # (-) = master script does nothing with this if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then local mystatedir statedir ifindex if [ ! "$interface" ] ; then return fi ifindex=$(cat "/sys/class/net/$interface/ifindex") if [ ! "$ifindex" ]; then return fi mystatedir=/run/network mkdir -p $mystatedir statedir=/run/systemd/resolve/netif mkdir -p $statedir local oldstate="$(mktemp)" # ignore errors due to nonexistent file md5sum "$mystatedir/isc-dhcp-v4-$interface" "$mystatedir/isc-dhcp-v6-$interface" "$mystatedir/ifupdown-inet-$interface" "$mystatedir/ifupdown-inet6-$interface" > "$oldstate" 2> /dev/null || true case "$reason" in BOUND|RENEW|REBIND|REBOOT|TIMEOUT|BOUND6|RENEW6|REBIND6) if [ -n "$new_domain_name_servers" ] ; then cat <<EOF >"$mystatedir/isc-dhcp-v4-$interface" DNS="$new_domain_name_servers" EOF if [ -n "$new_domain_name" ] || [ -n "$new_domain_search" ] ; then cat <<EOF >>"$mystatedir/isc-dhcp-v4-$interface" DOMAINS="$new_domain_search $new_domain_name" EOF fi fi if [ -n "$new_dhcp6_name_servers" ] ; then cat <<EOF >"$mystatedir/isc-dhcp-v6-$interface" DNS6="$new_dhcp6_name_servers" EOF if [ -n "$new_dhcp6_domain_search" ] ; then cat <<EOF >>"$mystatedir/isc-dhcp-v6-$interface" DOMAINS6="$new_dhcp6_domain_search" EOF fi fi ;; EXPIRE|FAIL|RELEASE|STOP) rm -f "/run/network/isc-dhcp-v4-$interface" ;; EXPIRE6|RELEASE6|STOP6) rm -f "/run/network/isc-dhcp-v6-$interface" ;; esac local newstate="$(mktemp)" # ignore errors due to nonexistent file md5sum "$mystatedir/isc-dhcp-v4-$interface" "$mystatedir/isc-dhcp-v6-$interface" "$mystatedir/ifupdown-inet-$interface" "$mystatedir/ifupdown-inet6-$interface" > "$newstate" 2> /dev/null || true if ! cmp --silent "$oldstate" "$newstate" 2>/dev/null; then local DNS DNS6 DOMAINS DOMAINS6 DEFAULT_ROUTE # v4 first if [ -e "$mystatedir/isc-dhcp-v4-$interface" ]; then . "$mystatedir/isc-dhcp-v4-$interface" fi # v4 manual config overrides if [ -e "$mystatedir/ifupdown-inet-$interface" ]; then . "$mystatedir/ifupdown-inet-$interface" fi # v6 preffered if [ -e "$mystatedir/isc-dhcp-v6-$interface" ]; then . "$mystatedir/isc-dhcp-v6-$interface" fi # v6 manual config overrides if [ -e "$mystatedir/ifupdown-inet6-$interface" ]; then . "$mystatedir/ifupdown-inet6-$interface" fi local resolvectl_failed= if [ "$DNS" ] || [ "$DNS6" ] ; then cat <<EOF >"$statedir/$ifindex" # This is private data. Do not parse. LLMNR=yes MDNS=no SERVERS=$(echo $DNS6 $DNS) DOMAINS=$(echo $DOMAINS6 $DOMAINS) EOF if [ -n "$DEFAULT_ROUTE" ]; then cat <<EOF >>"$statedir/$ifindex" DEFAULT_ROUTE=$DEFAULT_ROUTE EOF fi chown systemd-resolve:systemd-resolve "$statedir/$ifindex" # In addition to creating the state file (needed if we run before # resolved is started), also feed the information directly to # resolved. if systemctl --quiet is-active systemd-resolved; then resolvectl llmnr "$ifindex" yes || resolvectl_failed=$? resolvectl mdns "$ifindex" no || resolvectl_failed=$? if [ "$DOMAINS6" ] || [ "$DOMAINS" ]; then resolvectl domain "$ifindex" $DOMAINS6 $DOMAINS || resolvectl_failed=$? else resolvectl domain "$ifindex" "" || resolvectl_failed=$? fi resolvectl dns "$ifindex" $DNS6 $DNS || resolvectl_failed=$? if [ "$DEFAULT_ROUTE" ]; then resolvectl default-route "$ifindex" $DEFAULT_ROUTE || resolvectl_failed=$? fi fi else rm -f "$statedir/$ifindex" if systemctl --quiet is-active systemd-resolved; then resolvectl revert "$ifindex" || resolvectl_failed=$? fi fi # resolved was running, but without dbus, it means state files # will not be read & resolvectl commands failed, restart it if [ "$resolvectl_failed" ]; then systemctl try-restart systemd-resolved fi fi rm -f "$oldstate" "$newstate" fi dhclient-exit-hooks.d/timesyncd 0000644 00000002554 15027410053 0012575 0 ustar 00 TIMESYNCD_CONF=/run/systemd/timesyncd.conf.d/01-dhclient.conf timesyncd_servers_setup_remove() { if [ ! -d /run/systemd/system ]; then return fi if [ ! -x /lib/systemd/systemd-timesyncd ]; then return fi if [ -e $TIMESYNCD_CONF ]; then rm -f $TIMESYNCD_CONF systemctl try-restart systemd-timesyncd.service || true fi } timesyncd_servers_setup_add() { if [ ! -d /run/systemd/system ]; then return fi if [ ! -x /lib/systemd/systemd-timesyncd ]; then return fi if [ -e $TIMESYNCD_CONF ] && [ "$new_ntp_servers" = "$old_ntp_servers" ]; then return fi if [ -z "$new_ntp_servers" ]; then timesyncd_servers_setup_remove return fi mkdir -p $(dirname $TIMESYNCD_CONF) cat <<EOF > ${TIMESYNCD_CONF}.new # NTP server entries received from DHCP server [Time] NTP=$new_ntp_servers EOF mv ${TIMESYNCD_CONF}.new ${TIMESYNCD_CONF} systemctl try-restart systemd-timesyncd.service || true } case $reason in BOUND|RENEW|REBIND|REBOOT) timesyncd_servers_setup_add ;; EXPIRE|FAIL|RELEASE|STOP) timesyncd_servers_setup_remove ;; esac dhclient-exit-hooks.d/rfc3442-classless-routes 0000644 00000003334 15027410053 0015173 0 ustar 00 # set classless routes based on the format specified in RFC3442 # e.g.: # new_rfc3442_classless_static_routes='24 192 168 10 192 168 1 1 8 10 10 17 66 41' # specifies the routes: # 192.168.10.0/24 via 192.168.1.1 # 10.0.0.0/8 via 10.10.17.66.41 RUN="yes" if [ "$RUN" = "yes" ]; then if [ -n "$new_rfc3442_classless_static_routes" ]; then if [ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then set -- $new_rfc3442_classless_static_routes while [ $# -gt 0 ]; do net_length=$1 via_arg='' case $net_length in 32|31|30|29|28|27|26|25) if [ $# -lt 9 ]; then return 1 fi net_address="${2}.${3}.${4}.${5}" gateway="${6}.${7}.${8}.${9}" shift 9 ;; 24|23|22|21|20|19|18|17) if [ $# -lt 8 ]; then return 1 fi net_address="${2}.${3}.${4}.0" gateway="${5}.${6}.${7}.${8}" shift 8 ;; 16|15|14|13|12|11|10|9) if [ $# -lt 7 ]; then return 1 fi net_address="${2}.${3}.0.0" gateway="${4}.${5}.${6}.${7}" shift 7 ;; 8|7|6|5|4|3|2|1) if [ $# -lt 6 ]; then return 1 fi net_address="${2}.0.0.0" gateway="${3}.${4}.${5}.${6}" shift 6 ;; 0) # default route if [ $# -lt 5 ]; then return 1 fi net_address="0.0.0.0" gateway="${2}.${3}.${4}.${5}" shift 5 ;; *) # error return 1 ;; esac # take care of link-local routes if [ "${gateway}" != '0.0.0.0' ]; then via_arg="via ${gateway}" fi # set route (ip detects host routes automatically) ip -4 route add "${net_address}/${net_length}" \ ${via_arg} dev "${interface}" >/dev/null 2>&1 done fi fi fi dhclient-enter-hooks.d/resolved-enter 0000755 00000000645 15027410053 0013702 0 ustar 00 #!/bin/sh ## Sourced, not exec'ed, but helps syntax highlighting # # Script fragment disabling make_resolv_conf(), # to be used in conjunction with dhclient-exit-hooks.d/resolved # if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then # Undefine the nasty default make_resolv_conf() to avoid it overriding # /etc/resolv.conf (or /run/systemd/resolve/stub-resolv.conf) make_resolv_conf() { : ; } fi
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings