Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #164595
| From | Reco <recoverym4n@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Re-exec dhclient without stopping network? |
| Date | 2016-02-24 10:20 +0100 |
| Message-ID | <r5DLX-2n7-17@gated-at.bofh.it> (permalink) |
| References | <r5Cwx-1gD-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi. On Wed, Feb 24, 2016 at 08:54:50PM +1300, Richard Hector wrote: > Anyone know if/how I can restart dhclient without stopping the network? > > It's the only process left holding open the old libc after the > upgrade, and I'd rather avoid restarting the network (or rebooting), > since I'm working remotely. > > This is on a wheezy box. It shouldn't be using dhcp, really, but > that's an issue for another day ... Short version (assuming that you're using stock isc-dhcp-client and your network interface is called eth0): pkill -9 -f dhclient ifup --force eth0 Long version: Sending a SIGKILL to dhclient will force it to terminate, but won't leave it time to deconfigure a network interface. Hence your network interface configuration should be leaved as is. Forcing a network interface into UP state with ifupdown(1) will launch a fresh version of dhclient, which should try to reuse existing lease file at /var/lib/dhcp/dhclient.eth0.leases. And by reusing said lease file dhclient should ask DHCP server for the same client IP. Of course, if you're trying to do it over a network connection, it would be a good idea to do the whole sequence in a screen(1) (or tmux), and to add a timed reboot just in case. I.e: pkill -9 -f dhclient ifup --force eth0 sleep 1800 reboot If all goes well you would be able to re-attach to a existing screen session, and cancel the reboot. If anything goes wrong - you'll have your host alive and kicking after 30 minutes of waiting. Reco
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re-exec dhclient without stopping network? Richard Hector <richard@walnut.gen.nz> - 2016-02-24 09:00 +0100
Re: Re-exec dhclient without stopping network? Reco <recoverym4n@gmail.com> - 2016-02-24 10:20 +0100
Re: Re-exec dhclient without stopping network? Richard Hector <richard@walnut.gen.nz> - 2016-02-24 11:10 +0100
csiph-web