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

Re: Find which package has installed some file under /etc



On 2011-12-22 16:30:57 +0100, Tom H wrote:
> You can check whether a file in "/etc/default/" is sourced by a file
> in "/etc/init.d/".

It's impossible to do this reliably (e.g. recursively), and the
/etc/default/ file may be sourced by another script.

For instance, /etc/default/cryptdisks is not directly sourced by
/etc/init.d/cryptdisks, but by /lib/cryptsetup/cryptdisks.functions
(which is itself sourced by /etc/init.d/cryptdisks).

/etc/default/acpi-support is not sourced by /etc/init.d/acpi-support
either, and not by files sourced from /etc/init.d/acpi-support either.
I've found that it is sourced by scripts from /etc/acpi/ but I don't
see how I could do such detections automatically in the general case.

Another example: /etc/default/debsums is provided by debsums, but
debsums doesn't provide an init.d script. /etc/default/debsums is
actually sourced by the /etc/cron.*/debsums files.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


Reply to: