Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Run the script after particular package updated

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
anton
Posts: 3
Joined: 2005-03-15 18:27
Location: Russia

Run the script after particular package updated

#1 Post by anton »

What is the effective way to do subject? I need to trace only one package. Is there some place in apt-get system where i could specify such script?

Thnx.

sprucio
Posts: 143
Joined: 2005-03-29 03:30

#2 Post by sprucio »

Can you be more specific on what your problem is?

anton
Posts: 3
Joined: 2005-03-15 18:27
Location: Russia

#3 Post by anton »

In short, I need to patch one of binary files the package contains. I can patch it manually, by after next update it will be replased by fresh original binary. I wish to automatically patch this file each time the package updates.

I know that it is probably not generally good decision, but i think it is the easiest for my situation. I don't want to maintain my own customized package. The diifference is only one byte in one file. It's easier to change that byte in original binary.

sprucio
Posts: 143
Joined: 2005-03-29 03:30

#4 Post by sprucio »

Can't you write a shell script that will take care of this?

anton
Posts: 3
Joined: 2005-03-15 18:27
Location: Russia

#5 Post by anton »

The script itself is not a problem. The problem is how to specify it's execution after package update. Read my 1st post. I could run it by cron -- it will works, but it is not the best decision.

sprucio
Posts: 143
Joined: 2005-03-29 03:30

#6 Post by sprucio »

I see. So you want it to run right after a specific package is updated.

Cron would be efficient but it looks like you are looking for some method that will detect it using the apt-get system.

I just found this in my /etc/apt/apt.conf.d/. There was a file called 70debconf and the contents look something like this:

Code: Select all

[bpark@maple apt.conf.d]$ cat 70debconf
// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
Try finding something like "Post-Install-Pkgs" directive that you can run.

I'm betting that you can probably put a file in here such as XXemacs21, where XX would be replaced by two numbers. Inside it, you probably can use something similiar to this.

It looks like the apt man pages are ready for you.

Post Reply