Forums

khvalera
khvalera
Offline
Resolved
0 votes
If the cable is not connected to any external configured network interface with the DHCP type, I receive a network.service loading error. If you overload the device, the system load time increases by 5 minutes. because network.service still tries to get IP from connections that do not have a link.

Also, for unconfigured connections, the link is always displayed as No, this is not convenient when there are many network interfaces on the computer.
Wednesday, November 29 2023, 05:06 PM
Share this post:
Responses (8)
  • Accepted Answer

    Brodie
    Brodie
    Offline
    Thursday, December 14 2023, 11:36 AM - #Permalink
    Resolved
    0 votes
    I've posted a few times but the forum seems to be eating the posts. I am wondering if it is better to use a built-in bash function?

    Would:
    if [ ${DEVICE:0:3} == "enp" ]; then

    or
    if [ ${DEVICE:0:2} == "en" ]; then

    be better?
    The reply is currently minimized Show
  • Accepted Answer

    Brodie
    Brodie
    Offline
    Sunday, December 03 2023, 04:16 PM - #Permalink
    Resolved
    0 votes
    Is this applicable to just enp* interfaces or all en* interfaces such as ens* and eno*?
    The reply is currently minimized Show
  • Accepted Answer

    khvalera
    khvalera
    Offline
    Wednesday, November 29 2023, 10:55 PM - #Permalink
    Resolved
    0 votes
    I made a patch to ignore enp interfaces that have a disconnected network cable:

    --- /etc/rc.d/init.d/network<-->2020-05-22 13:44:33.000000000 +0300
    +++ /etc/rc.d/init.d/network_new<------>2023-11-30 01:13:11.690761328 +0200
    @@ -95,7 +95,11 @@
    if [ "$SLAVE" = "yes" ] && ( ! is_nm_running || is_false $NM_CONTROLLED ) ; then
    continue
    fi
    -
    + if [ $(echo $DEVICE | grep 'enp') ]; then
    + if [ -n "$(LANG=C ip link show up $DEVICE | grep NO-CARRIER)" ]; then
    + continue
    + fi
    + fi
    if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then
    vpninterfaces="$vpninterfaces $i"
    continue
    @@ -196,6 +200,12 @@
    .
    if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi
    .
    + if [ $(echo $DEVICE | grep 'enp') ]; then
    + if [ -n "$(LANG=C ip link show up $DEVICE | grep NO-CARRIER)" ]; then
    + continue
    + fi
    + fi
    +
    if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then
    vpninterfaces="$vpninterfaces $i"
    continue
    The reply is currently minimized Show
  • Accepted Answer

    khvalera
    khvalera
    Offline
    Wednesday, November 29 2023, 10:54 PM - #Permalink
    Resolved
    0 votes
    Brodie wrote:

    Is this applicable to just enp* interfaces or all en* interfaces such as ens* and eno*?


    I don't have any cards other than enp*, but the problem seems to be common. The patch is not quite working, I'll be free in a few days and I'll try to figure it out
    The reply is currently minimized Show
  • Accepted Answer

    khvalera
    khvalera
    Offline
    Wednesday, November 29 2023, 10:54 PM - #Permalink
    Resolved
    0 votes
    I made a patch to ignore enp interfaces that have a disconnected network cable
    The reply is currently minimized Show
  • Accepted Answer

    khvalera
    khvalera
    Offline
    Wednesday, November 29 2023, 10:54 PM - #Permalink
    Resolved
    -1 votes
    I made a patch to ignore enp interfaces that have a disconnected network cable
    The reply is currently minimized Show
  • Accepted Answer

    khvalera
    khvalera
    Offline
    Wednesday, November 29 2023, 10:53 PM - #Permalink
    Resolved
    0 votes
    I made a patch to ignore enp interfaces that have a disconnected network cable
    The reply is currently minimized Show
  • Accepted Answer

    khvalera
    khvalera
    Offline
    Wednesday, November 29 2023, 10:51 PM - #Permalink
    Resolved
    0 votes
    When I tried to add a patch file, I received a lot of messages, please delete
    The reply is currently minimized Show
Your Reply