FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 09-23-2008, 02:37 PM
Urs Thuermann
 
Default Prevent aptitude from starting services

Is it possible to prevent aptitude from automatically running services
after install? That is, when I install some daemon or some other
package with a start script in /etc/init.d, e.g. bind or ferm, I don't
want that init script to be executed. This is annoying when services
are started before I have configured them, and also if I build a
system with debootstrap, then chroot into the new system to install
some further packages and then services are run or netfilter rules are
changed on the build system.

Looking through the man page of aptitude I haven't found an option to
do this.


urs


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-23-2008, 03:22 PM
"nate"
 
Default Prevent aptitude from starting services

Urs Thuermann wrote:

> Looking through the man page of aptitude I haven't found an option to
> do this.

Because I don't believe it's aptitude that is doing it, it is
the postinstall script being run by dpkg.

I suspect what you want to do is not possible, as there are often
other things in the postinstall script that need to be run, so
even if you could tell aptitude/apt-get/dpkg to not run the postinstall
script you'd likely run into other problems that would otherwise
be solved by executing the postinstall script.

I suppose you could rebuild all of the packages you plan to
install and strip out the portion of the postinstall script
that (re)starts the service.

Take postfix for example, it's postinstall script is over 500
lines long.

The scripts for installed packages are in /var/lib/dpkg/info


nate


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-23-2008, 03:25 PM
Sven Joachim
 
Default Prevent aptitude from starting services

On 2008-09-23 16:37 +0200, Urs Thuermann wrote:

> Is it possible to prevent aptitude from automatically running services
> after install? That is, when I install some daemon or some other
> package with a start script in /etc/init.d, e.g. bind or ferm, I don't
> want that init script to be executed. This is annoying when services
> are started before I have configured them, and also if I build a
> system with debootstrap, then chroot into the new system to install
> some further packages and then services are run or netfilter rules are
> changed on the build system.

Yes, that's possible. Create a script /usr/sbin/policy-rc.d with a
single line containing "exit 101" and no services will be started at
package installation time¹. See
/usr/share/doc/sysv-rc/README.{policy,invoke}-rc.d.gz.

> Looking through the man page of aptitude I haven't found an option to
> do this.

Because that isn't really related to aptitude, it doesn't matter how you
install your package.

Sven


¹ Well, at least if the package maintainer follows the rules and uses
invoke-rc.d instead of executing the init script directly. Doing the
latter is a serious bug, though.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 03:14 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org