Configurer Netkit avec un script
Bonjour,
J'ai installé netkit puis tapé ces commandes pour le configurer
Code:
1 2 3 4 5 6
|
export NETKIT_HOME='/home/user/netkit'
export PATH=$PATH:$NETKIT_HOME/bin
export MANPATH=$MANPATH:$NETKIT_HOME/man
./check_configuration.sh |
tous fonctionne parfaitement (J'ai le mot READY) mais à chaque fois que je redémarre ubuntu il faut que je retape les commandes, j'ai donc mis les commandes dans un script
Dans le dossier $HOME j'ai crée un dossier Script avec mon script 'Config_Netkit.sh' dedans. (le dossier netkit se trouve aussi dans $HOME)
Quand je lance le script avec la commande $HOME/Script/Config_Netkit.sh j'ai le READY.
Config_Netkit.sh (jai mis le droit d'execution avec sudo chmod +x nomDuScript)
Code:
1 2 3 4 5 6 7 8 9
|
#!/bin/sh
export NETKIT_HOME='/home/user/netkit'
export PATH=$PATH:$NETKIT_HOME/bin
export MANPATH=$MANPATH:$NETKIT_HOME/man
cd /home/user/netkit
./check_configuration.sh |
Dans le fichier /etc/rc.local j'ai mis la commande pour lancer mon script $HOME/Script/Config_Netkit.sh, mais quand je rentre dans le dossier netkit et que je fais ./check_configuration.sh il me met ERROR
rc.local
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#!/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.
/home/user/Script/Configuration_Netkit.sh
exit 0 |