Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-30-2013, 05:02 AM
|
#1
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
NetworkManager, DHCP, and NTP
Also known as "a combination that doesn't work".
To be more precise, in my home network I have a gateway PC that's always up (running Slackware 14.1, of course) that serves as a firewall, print server, DNS server, DHCP server, and NTP server for the home network. As part of my DHCP configuration, I tell my clients to use the gateway box as their NTP server; that way, I have only one computer in the network that is talking to the public NTP servers.
Part of the issue is that the NetworkManager developers decided to override standard dhcpcd behavior by not using /lib/dhcpcd/dhcpcd-run-hooks but their own script /usr/libexec/nm-dhcp-client.action (and it isn't obvious to me what exactly nm-dhcp-client.action does even after reading the source). As a result, the various hooks that handle such things under normal dhcpcd operations are not run when dhcpcd is invoked by NetworkManager.
Looking at the NetworkManager implementation for using dhclient, it appears that requests NTP information from the DHCP server and presumably uses it.
I guess the only solution at the moment is to re-write the same *bleeping* code that is in /lib/dhcpcd/dhcpcd-hooks/50-ntp.conf but as a NetworkManager dispatcher script that lives in /etc/NetworkManager/dispatcher.d. That seems like a really stupid waste of time.
|
|
|
12-30-2013, 12:18 PM
|
#2
|
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
|
If network manager is getting in the way, try wicd.
|
|
|
12-31-2013, 04:20 PM
|
#3
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
Original Poster
|
Well, network manager is part of the official distro while wicd is not.
|
|
|
12-31-2013, 05:54 PM
|
#4
|
Senior Member
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982
|
It is in the /extra directory, so it actually is a part of the distro. Either way for my laptop I always use wicd. For my desktop I use network manager because it is already installed and I don't use wifi. I would say that wicd is the better and more predictable / logical of the two.
|
|
|
01-01-2014, 10:33 AM
|
#5
|
LQ Veteran
Registered: Feb 2007
Distribution: Slackware64-current with KDE4Town.
Posts: 9,496
|
Quote:
Originally Posted by metaschima
...I would say that wicd is the better and more predictable / logical of the two.
|
We have had this discussion before.
Over the last 3 three years, using two different boxes, in three different locations and four different ISPs, my experience has been just the opposite. NetworkManager does a far better job of making the connections and holding on to them.
|
|
|
01-01-2014, 12:58 PM
|
#6
|
Member
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 308
Rep:
|
Quote:
Originally Posted by Richard Cranium
I guess the only solution at the moment is to re-write the same *bleeping* code that is in /lib/dhcpcd/dhcpcd-hooks/50-ntp.conf but as a NetworkManager dispatcher script that lives in /etc/NetworkManager/dispatcher.d. That seems like a really stupid waste of time.
|
I see Arch Linux has a package called networkmanager-dispatcher-ntpd which contains a script (/etc/NetworkManager/dispatcher.d/10-ntpd) that just stops/starts ntpd (no ntp.conf juggling). This blog article doesn't really cover any ntp.conf manipulation either, but I'm sure you could hack something in.
Another option that might be worth looking at is option ntp-servers ip-address [, ip-address... ]; in /etc/dhcpcd.conf.
|
|
|
01-01-2014, 04:54 PM
|
#7
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
Original Poster
|
Well, what I find annoying about the whole thing is that dhcpcd already has ways to handle ntp, routing, and the rest (which is precisely what you would want to have your dhcp client handle for you). The NetworkManager clots decided that they would override that behavior and replace it with (by default) nothing but their own hook framework and then claim "well, it's up to the distro to provide proper hooks".
|
|
|
01-01-2014, 04:58 PM
|
#8
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
Original Poster
|
Quote:
Originally Posted by fskmh
|
If the dhcpcd hook scripts aren't run, that won't do any good.
|
|
|
All times are GMT -5. The time now is 10:44 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|