PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > prevent dpkg from (re-)starting services
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

prevent dpkg from (re-)starting services

Réponse
 
LinkBack Outils de la discussion
Vieux 08/05/2008, 13h40   #1
Olaf Leidinger
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut prevent dpkg from (re-)starting services

Hello List!

On a file server I installed several debian (-based) distributions into
an exported directory using debootstrap. These are used as root
filesystems for diskless clients. To install new packages/updates I
chroot into the directories of the corresponding distributions and run
aptitude. The problem is, that every time I install the update of a
service (e.g. cups), the service is (started in the chrooted
environment, but I don't want to run any service in there.

Is there a way to prevent dpkg from (re-)starting these services?
Deleting them from the /etc/rc* directories is not an option, as they
are needed by the clients.

Thanks in advance!

Olaf Leidinger

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFIIuhX4Yz1Ukx83/kRAv2YAJ9UG9e59iDqY6PkvYt3+FlgbsE29ACgrbvt
KuOiVGNwQxi5ZLsNqwfNGxs=
=bTcC
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 09/05/2008, 02h10   #2
Michael Biebl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: prevent dpkg from (re-)starting services

Michael Biebl wrote:

> Read the man page of invoke-rc.d : "INIT SCRIPT POLICY"


And /usr/share/doc/sysv-rc/README.policy-rc.d.gz


--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFII6J0h7PER70FhVQRAsplAJ9DB0MxzByhasPwoUvXVs 0vTThEWgCgoEun
LQO/DSI0atmgwV1WtlTRUkA=
=od4D
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 09/05/2008, 02h30   #3
Michael Biebl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: prevent dpkg from (re-)starting services

Olaf Leidinger wrote:
> Hello List!
>
> On a file server I installed several debian (-based) distributions into
> an exported directory using debootstrap. These are used as root
> filesystems for diskless clients. To install new packages/updates I
> chroot into the directories of the corresponding distributions and run
> aptitude. The problem is, that every time I install the update of a
> service (e.g. cups), the service is (started in the chrooted
> environment, but I don't want to run any service in there.
>
> Is there a way to prevent dpkg from (re-)starting these services?
> Deleting them from the /etc/rc* directories is not an option, as they
> are needed by the clients.
>
> Thanks in advance!
>


policy-rc.d to your rescue.

Read the man page of invoke-rc.d : "INIT SCRIPT POLICY"

A simple /usr/sbin/policy-rc.d could look like this:

# cat /usr/sbin/policy-rc.d
#!/bin/sh
echo "************************************" >&2
echo "All rc.d operations denied by policy" >&2
echo "************************************" >&2
exit 101

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFII6HKh7PER70FhVQRAvDxAJ4iFM72XBcicURl1ZqO4g Z7iNwisgCfYe+f
gJA29oYsJH9+4B/Off+VQ6g=
=HeVe
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 09/05/2008, 11h20   #4
Olaf Leidinger
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: prevent dpkg from (re-)starting services

Hi!

Thanks a lot!
Seems to work fine!

Ciao,
Olaf

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFIJCK94Yz1Ukx83/kRApDzAJsEcnGxf+4ngxk3FaouWmE77AcykACfbyjF
MNgB22PW9P/a2Jon3mG6sQI=
=DpPH
-----END PGP SIGNATURE-----

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h42.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09562 seconds with 12 queries