I'm running a host-based intrusion detection system (HIDS) and have to
update it's database whenever I upgrade the system using apt/aptitude.
Does that package management suite provide the functionality to run a
script/shell command when it's quitting? I'd prefer such a solution over the
current scripting approach as I all to aften find myself automatically
typing "aptitude" instead of "<Myscript>" ...
Thank you for any pointers, Joh
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: in11p8$v49$1@dough.gmane.org">http://lists.debian.org/in11p8$v49$1@dough.gmane.org
03-31-2011, 06:49 AM
Andrei Popescu
Finnishing apt/aptitude runs with a script?
On Jo, 31 mar 11, 08:01:46, Johannes Graumann wrote:
> Hi,
>
> I'm running a host-based intrusion detection system (HIDS) and have to
> update it's database whenever I upgrade the system using apt/aptitude.
>
> Does that package management suite provide the functionality to run a
> script/shell command when it's quitting? I'd prefer such a solution over the
> current scripting approach as I all to aften find myself automatically
> typing "aptitude" instead of "<Myscript>" ...
I think what you need can be achieved with dpkg hooks. Hope this hint
helps, since I never used them and can't tell you exactly where to put
them.
Regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
03-31-2011, 07:39 AM
Sven Joachim
Finnishing apt/aptitude runs with a script?
On 2011-03-31 08:49 +0200, Andrei Popescu wrote:
> On Jo, 31 mar 11, 08:01:46, Johannes Graumann wrote:
>>
>> I'm running a host-based intrusion detection system (HIDS) and have to
>> update it's database whenever I upgrade the system using apt/aptitude.
>>
>> Does that package management suite provide the functionality to run a
>> script/shell command when it's quitting? I'd prefer such a solution over the
>> current scripting approach as I all to aften find myself automatically
>> typing "aptitude" instead of "<Myscript>" ...
>
> I think what you need can be achieved with dpkg hooks.
Yes, but those hooks will be run more often than necessary, since apt
typically invokes dpkg several times during an installation.
> Hope this hint helps, since I never used them and can't tell you
> exactly where to put them.
/etc/dpkg/dpkg.cfg is the place for that (or drop a file into
/etc/dpkg/dpkg.cfg.d).
Sven
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 871v1nivrq.fsf@turtle.gmx.de">http://lists.debian.org/871v1nivrq.fsf@turtle.gmx.de
03-31-2011, 10:42 AM
Johannes Graumann
Finnishing apt/aptitude runs with a script?
Sven Joachim wrote:
> On 2011-03-31 08:49 +0200, Andrei Popescu wrote:
>
>> On Jo, 31 mar 11, 08:01:46, Johannes Graumann wrote:
>>>
>>> I'm running a host-based intrusion detection system (HIDS) and have to
>>> update it's database whenever I upgrade the system using apt/aptitude.
>>>
>>> Does that package management suite provide the functionality to run a
>>> script/shell command when it's quitting? I'd prefer such a solution over
>>> the current scripting approach as I all to aften find myself
>>> automatically typing "aptitude" instead of "<Myscript>" ...
>>
>> I think what you need can be achieved with dpkg hooks.
>
> Yes, but those hooks will be run more often than necessary, since apt
> typically invokes dpkg several times during an installation.
>
>> Hope this hint helps, since I never used them and can't tell you
>> exactly where to put them.
>
> /etc/dpkg/dpkg.cfg is the place for that (or drop a file into
> /etc/dpkg/dpkg.cfg.d).
Thank you for that hint. But as you said: dpkg is run multiple time per apt
invocation, which doesn't make the option very feasible in my scenario ...
no such thing as apt/aptitude hooks?
Joh
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: in1lnm$91b$1@dough.gmane.org">http://lists.debian.org/in1lnm$91b$1@dough.gmane.org
03-31-2011, 11:16 AM
Sven Joachim
Finnishing apt/aptitude runs with a script?
On 2011-03-31 12:42 +0200, Johannes Graumann wrote:
> Thank you for that hint. But as you said: dpkg is run multiple time per apt
> invocation, which doesn't make the option very feasible in my scenario ...
> no such thing as apt/aptitude hooks?
Not currently, no. A wishlist bug has been reported long ago:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=107151.
Meanwhile, there is probably nothing better for you than using wrapper
scripts.
Sven
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87vcyzh74p.fsf@turtle.gmx.de">http://lists.debian.org/87vcyzh74p.fsf@turtle.gmx.de
03-31-2011, 12:37 PM
Paul E Condon
Finnishing apt/aptitude runs with a script?
On 20110331_080146, Johannes Graumann wrote:
> Hi,
>
> I'm running a host-based intrusion detection system (HIDS) and have to
> update it's database whenever I upgrade the system using apt/aptitude.
>
> Does that package management suite provide the functionality to run a
> script/shell command when it's quitting? I'd prefer such a solution over the
> current scripting approach as I all to aften find myself automatically
> typing "aptitude" instead of "<Myscript>" ...
>
> Thank you for any pointers, Joh
Perhaps you could get away with giving your script the name "aptitude" and
placing it in a directory that is searched before the location directory
where the real 'aptitude' is located. e.g. put your 'aptitude' in /root/bin
and put /root/bin at the head of PATH.
I don't know how well this plays with sudo. YMMV
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110331123754.GA14745@big.lan.gnu">http://lists.debian.org/20110331123754.GA14745@big.lan.gnu