[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: update-rc.d & runlevels



* Saturday 22 March 2003, alle 06:41, Fabio Massimo Di Nitto scrive:
> 
> Magari un po piu' di informazioni potrebbero essere utili. E' una cosa che
> succede su tutti i pacchetti o solo su alcuni? in caso quale?  che distro
> stai usando?  sid? testing?
> 
> Fabio
> 
> On Fri, 21 Mar 2003, Ivo Bellin Salarin wrote:
> 
> > ciao.
> > ho notato una cosa *fastidiosa*. non so se qualcuno l'abbia già fatto
> > notare, quindi scusatemi se la mia osservazione è stupida.
> > insomma, se modifico i miei runlevel e rimuovo da rc3.d (ad esempio) un
> > link, al prossimo aggiornamento debian _riscrive_ lo stesso link, come se io
> > non lo avessi mai tolto. trovo che sia quantomeno fastidioso. c'è un qualche
> > modo per evitarlo?
> > naturalmente, non so se succeda SOLO a me. attualmente l'ho testato su due
> > macchine, il mio x86 e un ibm rs/6000. qualcuno mi può dire se è un problema
> > che riguarda un pacchetto singolo o la struttura stessa di debian?

Se permettete,  in merito a questo  problema ne viene  fatto cenno sul
"Debian securing manual", vi incollo la parte interessata:

*******************************************

3.6.1. Disabling daemon services
--------------------------------

     Disabilitare i servizi attivi in modalità demone

     Disabling a daemon service is quite simple.  There are different
     methods:

     Disabilitare i servizi in modalità demone è piuttosto semplice.  Ci
     sono diversi metodi:

        * remove links from `/etc/rc${runlevel}.d/' or rename the links (so
          that they do not begin with 'S')

        * rimuovere i link da `/etc/rc${runlevel}.d/' o rinominare i link
          (in modo che non comincino con "S")

        * move the script file (`/etc/init.d/_service_name_') to another
          name (for example `/etc/init.d/OFF._service_name_')

        * rinominare il file contenente lo script.  (per esempio da
          `/etc/init.d/_service_name_' a `/etc/init.d/OFF._service_name_')

        * remove the execute permission from the
          `/etc/init.d/_service_name_' file.

        * togliere il permesso di esecuzione al file
          `/etc/init.d/_service_name_'.

        * edit the `/etc/init.d/_service_name_' script to have it stop
          immediately.

        * modificare lo script `/etc/init.d/_service_name_' in modo che si
          interrompa immediatamente.

     You can remove the links from `/etc/rc${runlevel}.d/' manually or
     using `update-rc.d' (see update-rc.d(8)).  For example, you can
     disable a service from executing in the multi-user runlevels by doing:

     Potete rimuovere i link da `/etc/rc${runlevel}.d/' manualmente o
     usando `update-rc.d' (si veda update-rc.d(8)).  Per esempio potete
     disabilitare un servizio nei runlevel multiutente con:

            update-rc.d stop XX 2 3 4 5 .

     Please note that, if you are _not_ using `file-rc', `update-rc.d -f
     _service_ remove' will not work properly, since _all_ links are
     removed, upon re-installation or upgrade of the package these links
     will be re-generated (probably not what you wanted).  If you think
     this is not intuitive you are probably right (see Bug 67095
     (http://bugs.debian.org/67095)).  From the manpage:

     Bisogna notare che se _non_ stiamo utilizzando `file-rc', `update-rc.d
     -f _service_ remove' non funzionerà correttamente, perché _tutti_ i
     link vengono rimossi ma dopo una reinstallazione o un upgrade del
     pacchetto i link vengono ricreati (probabilmente non è quello che si
     desidera).  Chi pensa che questo comportamento non sia intuitivo non
     ha torto (si vedete il Bug 67095 (http://bugs.debian.org/67095)).
     Dalla manpage:

			^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


  If  any   files  /etc/rcrunlevel.d/[SK]??name  already   exist  then
  update-rc.d does nothing.  This  is so that the system administrator
  can rearrange the links, provided  that they leave at least one link
  remaining, without having their configuration overwritten.

  Se  esistono   già  dei  file   /etc/rcrunlevel.d/[SK]??nome  allora
  update-rc.d non fa nulla. In questo modo l'amministratore di sistema
  può risistemare i link, sempre  che abbiate lasciato almeno un link,
  senza dover sovrascrivere la loro configurazione.

     If you are using `file-rc' all the information regarding services
     bootup is handled by a common configuration file and is maintained
     even if packages are removed from the system.

     Se si usa `file-rc' tutte le informazioni che riguardano l'avvio dei
     servizi sono gestite da un file di configurazione comune e sono
     conservate anche se i pacchetti vengono disinstallati dal sistema.


***********************************************

in effetti la gestione è un po' anomala, però è consapevole.

Spero serva, anche se ne saprete sicuramente di più :-)

Ciao
Ferdinando



Reply to: