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

Re: Pass argument from Pre-Install-Pkgs to Post-Invoke

Hi Julien,

Julien Valroff <julien@kirya.net> wrote:
> The aim is to only update file properties of the changed packages.
> To achieve this goal, I need to get the list of changed packages, which
> I do in a script invokef through Pre-Install-Pkgs.
> The file properties can however only be updated once the packages are
> installed, hence I need to run rkhunter --propupd on Post-Invoke.
> How could I pass the list of changed packages between my both scripts?
> For now, I use a temporary file (I cannot even use a random name). Is it
> the right way? Could this have any security issues?

I think this idea is fine. I don't have any other idea. As long as you
save only the names of the packages in the file, you shouldn't open any
security holes. Where do you save the file? In /var/lib/rkhunter?

> As a (better) alternative, is there a way to get the list of changed
> packages in Post-Invoke?

You can search in dpkg's logfile /var/log/dpkg.log, but apt doesn't tell
you this in the post-invoke hook.

Bye, Jörg.
Man soll Denken lehren, nicht Gedachtes.

Reply to: