[Pkg-swan-devel] resolvconf update script failure leads to forgotten device

Tobias Brunner tobias at strongswan.org
Fri May 6 13:03:35 UTC 2016


Hi Corey,

>         1. Call "resolvconf --disable-updates"
>         2. Call resolvconf the way it is currently in
>         invoke_resolveconf(). This has the effect of installing or
>         deleting the interface without running the update script, and
>         the exit code returned by "pclose()" will tell you whether the
>         resolvconf install succeeded.
>         3. Call "resolvconf --enable-updates" which will cause the
>         postponed update scripts to be run, and the errors here can be
>         ignored or logged with "DBG1()".
>         4. Return the pclose() return value from step 2.

Not sure if that's such a good idea.  Don't failed update scripts
indicate a serious problem?  Actually, resolvconf does not seem to do
much besides some basic checks and writing the passed data to an
interface file before running the update scripts, of which update.d/libc
seems to do the main work of actually "installing" the DNS server by
writing resolv.conf.  So perhaps we could just recursively call
invoke_resolvconf(FALSE) if pclose() indicates the command failed.  That
way the interface file is at least removed again.

Regards,
Tobias




More information about the Pkg-swan-devel mailing list