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

Re: rc.local / commande invoke-rc.d



Le mercredi 07 novembre 2007 à 19:03 -0800, Geoffroy Youri a écrit :
> Le Wed, 07 Nov 2007 00:15:24 +0100,
> Pascal Hambourg <pascal.mail@plouf.fr.eu.org> a écrit :
> > […]
> > PS : au sujet de hdparm.conf
> > 
> > /etc/init.d/<service> <action>  -> MAL
> > invoke-rc.d <service> <action>  -> BIEN :-p
> 
> J'ai moi même découvert/adopté la commande il y a peu de temps.
> J'ai toujours utilisé /etc/init.d/<service> <action> auparavant.
> 
> En quoi invoke-rc.d est elle préférable ?
> 
> Un coup d'œil au manuel m'incite à penser que c'est une commande
> Debian, est-ce juste ?
Oui d'après ce que j'ai compris aussi.

Il me *semble* avoir lu quelque part il y a quelque temps que
invoke-rc.d était plutôt réservé aux scripts des paquets (à
l'installation ou à la suppression notamment).
Un extrait du man :
       All access to the init scripts by Debian packages’  maintainer
scripts should be done through invoke-rc.d.

La principale raison est le code de retour, et surtout, je présume, le
policy-rc.d helper.

Voilà ce que j'ai pu trouver dans le man qui me ferait dire que
invoke-rc.d n'est pas adapté à un usage par un administrateur système
consciencieux :
	invoke-rc.d itself only pays attention to the current runlevel; it will
block any attempts to start a service in a runlevel in which  the
service  is  disabled.

@++
Julien




Reply to: