tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding openresolv to base



From: Roy Marples <roy%marples.name@localhost>

> The accepted behaviour for all tools like this is if it's installed, use 
> it. resolvconf itself has no option to say "I am enabled", and from a 
> quick perusal of alternative tools from other OS's none of them have an 
> option for this either. At least, if they do, the applications that use 
> it don't make use of it. It's an application choice to use this tool or 
> not to.
> 
> On the other hand, I'm not adverse to adding an option to openresolv for 
> this either. It would make the application code look something like so
> 
> if [ -x /sbin/resolvconf ] && /sbin/resolvconf -e; then
>     echo_resolv_conf | /sbin/resolvconf -a $interface
> else
>     echo_resolv_conf > /etc/resolv.conf
> fi
> 
> Or the setting could just be a passthrough so that
> 
>     echo_resolv_conf | /sbin/resolvconf -a $interface
> is equivalent to
>     echo_resolv_conf > /etc/resolv.conf
> 
> We could still save the resolv.conf per interface so if the user toggled 
> the setting in resolvconf.conf then a simple resolvconf -u would be 
> enough to change things over.

You could have a tristate variable, enabled, passthrough and do not touch 
/etc/resolv.conf. You could even have a fourth 'pass everything to an external 
script' for those who want the ultimate configurability. That could be 
overengineering though...



Home | Main Index | Thread Index | Old Index