From: Laurent Mazet Date: Fri, 8 Jan 2016 11:03:22 +0000 (+0100) Subject: correct deploiement_conf_reseau_integration script X-Git-Tag: debian_7.8.10~10 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=04dd5d9830839e8c43d8d4053dfa272c519419f6;hp=42f41509843b02bdbdb950593e07e36557928411;p=debian6500.git correct deploiement_conf_reseau_integration script --- diff --git a/master/root/bin/deploiement_conf_reseau_integration b/master/root/bin/deploiement_conf_reseau_integration index fffec88..c4d1e96 100755 --- a/master/root/bin/deploiement_conf_reseau_integration +++ b/master/root/bin/deploiement_conf_reseau_integration @@ -38,14 +38,14 @@ done [ "$SUB" != "" ] || usage 1 - # Attribution adresse IP au capteur dans le domaine 192.168.$SUB.0 -ip addr add 192.168.$SUB.160/24 dev eth0 +[ "$(gethostip -d swm)" = "10.133.28.231" ] && eth=eth1 || eth=eth0 +ip addr add 192.168.$SUB.160/24 dev $eth # Definition des routes supplementaires -ip route add 192.168.$SUB.160 via 192.168.$SUB.231 dev eth0 -ip route add 192.168.$SUB.231 via 192.168.$SUB.160 dev eth0 -ip route add 192.168.0.53 via 192.168.$SUB.160 dev eth0 +ip route add 192.168.$SUB.160 via 192.168.$SUB.231 dev $eth +ip route add 192.168.$SUB.231 via 192.168.$SUB.160 dev $eth +ip route add 192.168.0.53 via 192.168.$SUB.160 dev $eth if [ $SWITCH -eq 1 ]; then # Recuperation du chemin pour executer le script du switch depuis un chemin quelconque