FG
💻 Software

How to configure `eth0` to retry `dhclient` when unplugged and replugged?

Fresh5 days ago
Mar 15, 202624883 views
Confidence Score0%
0%

Problem

I'm working on a linux gadget. I want it to get DHCP if I plug in the network cable after it has booted up already or if the network cable unplugged and replugged. One solution is to run a script such as this (which works, btw): However, I've got a feeling deep down in my little toe that tells me t…

Error Output

#!/bin/bash

NET_STATUS='different'

while true
do
  NEW_NET_STATUS=`ifconfig | grep RUNNING | grep -v LOOPBACK`
  if [ "${NEW_NET_STATUS}" = "${NET_…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to configure `eth0` to retry `dhclient` when unplugged and replugged?

Low Risk

netplug is the solution that I went with. may work just as well. Installation Interface Configuration Event Configuration Testing

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment