LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-30-2013, 05:02 AM   #1
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229
Angry 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.
 
Old 12-30-2013, 12:18 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
If network manager is getting in the way, try wicd.
 
Old 12-31-2013, 04:20 PM   #3
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Original Poster
Rep: Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229
Well, network manager is part of the official distro while wicd is not.
 
Old 12-31-2013, 05:54 PM   #4
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 01-01-2014, 10:33 AM   #5
cwizardone
LQ Veteran
 
Registered: Feb 2007
Distribution: Slackware64-current with KDE4Town.
Posts: 9,496

Rep: Reputation: 7747Reputation: 7747Reputation: 7747Reputation: 7747Reputation: 7747Reputation: 7747Reputation: 7747Reputation: 7747Reputation: 7747Reputation: 7747Reputation: 7747
Quote:
Originally Posted by metaschima View Post
...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.
 
Old 01-01-2014, 12:58 PM   #6
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 308

Rep: Reputation: 92
Quote:
Originally Posted by Richard Cranium View Post
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.
 
Old 01-01-2014, 04:54 PM   #7
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Original Poster
Rep: Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229
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".
 
Old 01-01-2014, 04:58 PM   #8
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Original Poster
Rep: Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229Reputation: 2229
Quote:
Originally Posted by fskmh View Post
Another option that might be worth looking at is option ntp-servers ip-address [, ip-address... ]; in /etc/dhcpcd.conf.
If the dhcpcd hook scripts aren't run, that won't do any good.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dnsmasq as dhcp server on eth0 and networkmanager R03L Linux - Networking 31 04-13-2013 09:57 AM
NetworkManager wierd beahaviour communicating with DHCP server Pizzicato Linux - Networking 1 08-23-2012 05:18 AM
ntp drift file in /etc/ntp instead of /var/lib/ntp - suggestion for a patch in Slack niels.horn Slackware 16 05-07-2009 08:35 PM
NetworkManager connects to DHCP AP but dhclient doesn't krkhan Linux - Wireless Networking 1 01-08-2008 04:49 PM
config DNS w/NetworkManager, DHCP otoomet Linux - Networking 2 09-30-2007 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration