Re: Finnishing apt/aptitude runs with a script?

2011-03-31 Thread Paul E Condon
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 "" ...
> 
> 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-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110331123754.ga14...@big.lan.gnu



Re: Finnishing apt/aptitude runs with a script?

2011-03-31 Thread Sven Joachim
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-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87vcyzh74p@turtle.gmx.de



Re: Finnishing apt/aptitude runs with a script?

2011-03-31 Thread Johannes Graumann
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 "" ...
>>
>> 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-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/in1lnm$91b$1...@dough.gmane.org



Re: Finnishing apt/aptitude runs with a script?

2011-03-31 Thread Sven Joachim
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 "" ...
>
> 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-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/871v1nivrq@turtle.gmx.de



Re: Finnishing apt/aptitude runs with a script?

2011-03-30 Thread Andrei Popescu
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 "" ...

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


signature.asc
Description: Digital signature


Finnishing apt/aptitude runs with a script?

2011-03-30 Thread Johannes Graumann
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 "" ...

Thank you for any pointers, Joh


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/in11p8$v49$1...@dough.gmane.org