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

Re: systemd et fichiers dans /etc/init.d/



Le 29/01/2018 à 17:16, steve a écrit :
> 
> Salut,
> 
> 
> M'intéressant un peu (plus) à systemd (qui tourne sur ma machine
> principale), je me demandais si les fichiers placés dans /etc/init.d/
> sont encore utilisés ou s'ils ne sont là que pour une éventuelle
> compatibilité avec les systèmes utilisant SysVInit plutôt que systemd.
> 
> Dans la négative, y a-t-il un moyen propre de nettoyer le système de ces
> fichiers inutiles ? Je veux dire, sans 'rm -rf /etc/init.d', car ces
> fichiers sont présents dans les paquets Debian. Je sais qu'ils prennent
> une place plus que négligeable, mais ce serait quand même plus élégant
> de ne plus avoir de restes de l'ancien système.
> 
> 
> Merci
> 
> Steve
> 
> 
> 

d'après
https://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions/

"[...]
Q: I have a native systemd service file and a SysV init script installed
which share the same basename, e.g.
/usr/lib/systemd/system/foobar.service vs. /etc/init.d/foobar -- which
one wins?

A: If both files are available the native unit file always takes
precedence and the SysV init script is ignored, regardless whether
either is enabled or disabled. Note that a SysV service that is enabled
but overridden by a native service does not have the effect that the
native service would be enabled, too. Enabling of native and SysV
services is completely independent. Or in other words: you cannot enable
a native service by enabling a SysV service by the same name, and if a
SysV service is enabled but the respective native service is not, this
will not have the effect that the SysV script is executed.
[...]"

ce qui semble indiquer que tu peux retirer toute ce qui est présent dans
/etc/init.d/ pour lequel tu peux trouver un équivalent fonctionnel dans
/usr/lib/systemd/system/ (pas forcément avec le même nom).


Reply to: