• [^] # Re: --

    Posté par . En réponse au journal Slackware :: petit script d'admin et plus. Évalué à 4.

    Oups pardon, je n'avais pas tout détaillé...

    L'autre interet est de pouvoir lister les services lancés au démarrage et de les rendre actif/inactif au démarrage de la machine.

    par exemple :

    root@pcad:~# service active
    active services :
    -rwxr-xr-x 1 root root 893 Jan 29 2003 /etc/rc.d/rc.4
    -rwxr-xr-x 1 root root 4782 Sep 12 2003 /etc/rc.d/rc.6
    -rwxr-xr-x 1 root root 2013 Feb 27 2003 /etc/rc.d/rc.K
    -rwxr-xr-x 1 root root 7634 Sep 15 2003 /etc/rc.d/rc.M
    -rwxr-xr-x 1 root root 8312 Aug 28 2003 /etc/rc.d/rc.S
    -rwxr-xr-x 1 root root 3949 Aug 26 2003 /etc/rc.d/rc.cups
    -rwxr-xr-x 1 root root 136 Jun 3 13:09 /etc/rc.d/rc.font
    -rwxr-xr-x 1 root root 401 Mar 5 2003 /etc/rc.d/rc.httpd
    -rwxr-xr-x 1 root root 4038 Sep 21 2003 /etc/rc.d/rc.inet1
    -rwxr-xr-x 1 root root 4419 Sep 21 2003 /etc/rc.d/rc.inet2
    -rwxr-xr-x 1 root root 497 Sep 12 2003 /etc/rc.d/rc.inetd
    -rwxr-xr-x 1 root root 147 Jun 3 11:59 /etc/rc.d/rc.keymap
    -rwxr-xr-x 1 root root 113 Oct 3 1995 /etc/rc.d/rc.local
    -rwxr-xr-x 1 root root 25550 Jun 4 17:33 /etc/rc.d/rc.modules
    -rwxr-xr-x 1 root root 2259 May 20 2004 /etc/rc.d/rc.mysqld
    -rwxr-xr-x 1 root root 126 Jun 3 13:04 /etc/rc.d/rc.netdevice
    -rwxr-xr-x 1 root root 728 Apr 7 2003 /etc/rc.d/rc.samba
    -rwxr-xr-x 1 root root 861 May 29 2002 /etc/rc.d/rc.syslog
    -rwxr-xr-x 1 root root 1740 Sep 11 1999 /etc/rc.d/rc.sysvinit

    Et par exemple, je décides de ne plus lancer le démon mysql au démarrage du PC :

    root@pcad:~# service mysqld -stop
    stopping mysqld ...
    mysqld is now disable at boot time

    certes, ls et chmod font très bien l'affaire, mais bon, hein, fallait bien une bonne raison de faire chauffer vim ;)