23. Modifier l'étape de boot

23.1. Application

Vérification des niveaux d'exécution du script rc.local


vanvincq@CP2L ~/Bureau $ sudo chkconfig --list | grep rc.local
rc.local                  0:off  1:off  2:on   3:on   4:on   5:on   6:off
Modification du script pour y ajouter ce qu'on y souhaite.

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing

# Réglage des DNS Orange
echo "domain home" > /etc/resolv.conf
echo "search home" >> /etc/resolv.conf
echo "nameserver 80.10.246.2" >> /etc/resolv.conf
echo "nameserver 80.10.246.129" >> /etc/resolv.conf

exit 0
Après redémarrage :

vanvincq@CP2L ~ $ cat /etc/resolv.conf 
domain home
search home
nameserver 80.10.246.2
nameserver 80.10.246.129