Re: dhclient and dhcp update require restart?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/02/2009 02:33 PM, David Cantrell wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 2 Sep 2009, Dennis J. wrote:

On 08/27/2009 07:49 PM, David Cantrell wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 26 Aug 2009, Dariusz J. Garbowski wrote:

Hi, something that bothers me a bit... More and more system restart
requests with each update (even if one doesn't use the package at the
time).

Is this necessary for dhclient and dhcp update packages to require
restart?
Wouldn't "service network restart" and "service dhcpd restart" in the
install/upgrade
scripts do the trick (after checking that the service is actually
running)?
Ssh used to do that since, well, as far as I remember.

Yes, 'service dhcpd restart' will work fine for dhcpd. For dhclient, it's
not necessarily as simple as restarting the network service. If you are
using
the network service, that will work fine. If you are using NetworkManager, you'll need to either restart NetworkManager or have it down the connection
you're using dhclient on and bring it back up.

Why is a restart of NetworkManager necessary in this case? If dhclient reinitializes the interface and gets the old dhcp data then nothing really changes and NetworkManager shouldn't have to care. If e.g. der IP changes then NetworkManager should detect that and reinitialize the connection info on its end (after all the "new" interface might not be connected to anything and thus have to be marked as down anyway).

It doesn't work that way. dhclient isn't a service with an init.d script. If you are using NetworkManager, dhclient is a child process of NetworkManager. You can't just restart dhclient since NetworkManager is controlling it. You have to either tell NetworkManager to down the interface, stop dhclient, and bring it back up -- or restart NetworkManager. Either way, the result is the
same.

If you are using the network service, dhclient is run when the interface is ifup'ed (so either restart the network service or ifup/ifdown the interface in
that case).

Yeah, dhclient works even if you don't use NetworkManager (I don't). So ifup/ifdown is necessary, which may or not be a good idea if something else running on the system relies on e.g. files open on NFS/SMB.

Yet, can something similar to sshd be done to dhcpd?

--
thufor





- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkqe1pUACgkQ5hsjjIy1VklGugCgxHxszZp60PHjRN5UpRfP59qD
dOkAoLMk8WXoyXnsRaiIWIdwLn6u8mdp
=5WWs
-----END PGP SIGNATURE-----


--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux