2

I'm working on a Phidgets SBC2. It's got emdebian grip, but grip has is over and so I get 404 on those repositories when apt-get is trying to get package lists. I can get things to install using apt-get if I comment out the grip line in the /etc/apt/sources.list.d/multistrap-debian.list file. However, that file keeps getting re-created, as a comment in the file itself warns. Here is the contents:

#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
deb http://www.emdebian.org/grip squeeze main dev java doc
deb http://ftp.us.debian.org/debian squeeze main contrib non-free

What is doing the overwriting, and how can I stop it?

(Edit: I assume multistrap is doing the overwriting, but I can't find the conf file that governs that. I have no /usr/share/multistrap directory. I think it's re-creating the file every time I do an apt-get update, maybe?)

1 Answers1

1

If you can't figure it out from your system configuration or from online searches, use loggedfs or auditd to monitor accesses to the file. See How to determine which process is creating a file?

For example, with the audit subsystem:

auditctl -a exit,always -w /etc/apt/sources.list.d/multistrap-debian.list

and watch the logs in /var/log/audit/audit.log. This will tell you the name of the process that changes the file. You may want to see what invokes it; you can do this by setting a watch on the executable, e.g.

auditctl -a exit,always -w /usr/lib/somewhere/strange/apt-source-list-editor

and you'll get an entry for the execve system call that executes the program.