[Resolvconf-devel] Bug#568821: improved API

martin f krafft madduck at debian.org
Sun Feb 7 23:49:15 UTC 2010


Package: resolvconf
Version: 1.45
Severity: wishlist

Looking at /etc/resolvconf/update.d/*, I see a lot of code
duplication:

  - formatting nameserver lines
  - uniquifying nameserver/search lists

The reason for this is /lib/resolvconf/list-records, which is the
only API resolvconf exposes, and it's rather brittle anyway, since
it has to be run in the right directory.

I suggest that resolvconf grows a new API:

  register-nameservers $NAME [$IP [$IP …]]
    formats the list of IPs and calls resolvconf -a appropriately
    reads list from stdin if ${2…} is empty

  get-nameserver-ips [-a] [$NAME]
    get a list of IPs associated with an interface, or all
    IPs known to resolvconf, properly sorted and uniquified.
    The -a option causes it to override truncating after localhost
    entries.

  unregister-nameservers $NAME
    calls resolvconf -d for completeness

If there's a strong signal that this is wanted behaviour, I would
write the scripts.

Thanks,

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-trunk-686 (SMP w/1 CPU core)
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages resolvconf depends on:
ii  coreutils                     8.4-1      GNU core utilities
ii  debconf [debconf-2.0]         1.5.28     Debian configuration management sy
ii  lsb-base                      3.2-23     Linux Standard Base 3.2 init scrip

resolvconf recommends no packages.

resolvconf suggests no packages.

-- debconf information excluded


-- 
 .''`.   martin f. krafft <madduck at d.o>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
URL: <http://lists.alioth.debian.org/pipermail/resolvconf-devel/attachments/20100208/eb5f5a6a/attachment.pgp>


More information about the Resolvconf-devel mailing list