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

Bug#700385: Improved update script



I wrote:
>  Then include a file named /etc/resolvconf/update-libc.d/000nscd
> in the nscd package with the following content.
>
>    #!/bin/sh
>    [ -x /etc/init.d/nscd ] && /etc/init.d/nscd invalidate-hosts


There's a bug in this one-line script. :)  

The script with accompanying amendment to /etc/init.d/nscd worked well in my casual testing.

However, when I removed the nscd package the "-x" test failed and consequently the script exited with status 1, causing resolvconf also to exit with nonzero status. That was not the intent. So the /etc/resolvconf/update-libc.d/000nscd file should instead have the following content or something equivalent.

    #!/bin/sh
    ! [ -x /etc/init.d/nscd ] || /etc/init.d/nscd invalidate-hosts


Reply to: