Mailinglist Archive: opensuse-bugs (5295 mails)

< Previous Next >
[Bug 798886] NetworkManager do not provide ntp servers from dhcp requests

https://bugzilla.novell.com/show_bug.cgi?id=798886

https://bugzilla.novell.com/show_bug.cgi?id=798886#c8


--- Comment #8 from Ralf Habacker <ralf.habacker@xxxxxxxxxx> 2013-11-10
17:35:37 UTC ---
If you can come up with a dispatcher that does the right thing, this would be
much easier to maintain.

But you are still be forced to support the remaining netconfig support in
NetworkManager and this patch will not much extend that required support. It
only adds as single line to /var/run/netconfig/NetworkManager.netconfig.

Here is a script which works for me on ipv4 networks:

cat /etc/NetworkManager/dispatcher.d/ntp
#!/bin/bash
#
# network manager writes the config file without the NTPSERVERS settings
#
if test -z "$DHCP4_NTP_SERVERS"; then
exit 0
fi

cfg=/var/run/netconfig/NetworkManager.netconfig
grep -v "NTPSERVERS" $cfg >$cfg.$$
echo "NTPSERVERS='$DHCP4_NTP_SERVERS'" >> $cfg.$$
mv $cfg.$$ $cfg

# update ntp settings
/etc/netconfig.d/ntp-runtime

This script should go on suse distros into the sysconfig package.

# network manager writes the config file without the NTPSERVERS settings
The scripts indicates that this solution looks like a half way workaround as
main part is written by NetworkManager itself and the remaining by a dispatcher
script.

To really reduce required maintenance effort and if there are no other reasons
against, I would mark NetworkManager netconfig support as deprecated yet and
remove it in further release. /var/run/netconfig/NetworkManager.netconfig
should be completely created by a dispatcher script for suse distros (any way
to disable netconfig support in NetworkManager yes ?)

If for some reasons, it is not possible to remove netconfig support from
NetworkManager, please apply this fix.

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >