Re: non-optimal use of -a flag with resolvconf
Joachim Achtzehnter
Tue Mar 10 14:59:06 2015
Hi Roy,
You wrote:
Hi
On 09/03/2015 22:24, Joachim Achtzehnter wrote:
The command line usage of Debian's resolvconf script, with which
openresolv is supposedly compatible, uses the -a flag with an argument
of the following format:
Enough of the supposedly.
It is compatible. Prove, in the code, otherwise.
Just a few examples: The openresolv variant of the openresolv script
does not support the --enable-updates and --disable-updates command line
parameters, the Debian version includes a maximum of three nameserver
lines, openresolv includes more and if the important one is not among
the first three it will be ignored by glibc's resolver and queries fail,
the ordering is different, openresolv includes both domain and search
keywords even though they are documented as mutually exclusive.
<interface_name>.<program_name>
It seems that dhcpcd uses the following for IPv6:
eth0:dhcp6
and for IPv4 it simply uses the interface name by itself:
eth0
Two comments about this:
1. It would be easier for various scripting purposes if dhcpcd
identified itself as the source of DNS settings for both IPv4 and IPv6
because there may be other sources of DNS settings for the same
interface, i.e, add something like dhcp4 in the IPv4 case.
I find it interesting that you want to use the protocol (dhcp) rather
than the program name as requested by the Debian man page ;)
The program name would be better, but I decided not to complain about
this particular point because nobody will run two dhcp servers for the
same interface and address family, so dhcp6 is sufficient. ;)
Anyway, aside from upgrading issues I'm happy to do this.
2. It would be preferable to use the period as a separator instead of
the colon, both for compatibility with Debian's resolvconf, and because
the colon's special meaning in shell scripts makes it more awkward to
deal with.
The only code change here would be to include the period along with the
colon in the dynamic interface code list in openresolv. Again, how would
upgrades be handled?
Lastly, a colon has no special meaning in shell scripts.
If it did, it would be listed here:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
This may be true, but ls seems to escape the colon in some of its output
variants, although I don't remember the exact circumstance when I saw
this. Not a big deal, but seems an unnecessary deviation.
Thanks,
Joachim
Roy
--
joachima@xxxxxxxxxxxxxx http://www.netacquire.com
Archive administrator: postmaster@marples.name