From: Laurent Mazet Date: Mon, 9 Nov 2015 10:32:14 +0000 (+0100) Subject: Merge branch 'master' of srvgitgnv:/gitstore/g_tr65/debian6500 X-Git-Tag: debian_7.8.8~1 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=9cce4fe28ef5a72d8e24c97a5b1075f23599aced;hp=3c0006159bde5dc407832fc548f39875b1f2a729;p=debian6500.git Merge branch 'master' of srvgitgnv:/gitstore/g_tr65/debian6500 --- diff --git a/.gitignore b/.gitignore index 577e17f..93cfeff 100644 --- a/.gitignore +++ b/.gitignore @@ -4,12 +4,10 @@ *~ *.contrib* *.keep -*.orig *.merge *.pyc *.o *.os -*.orig .*project .settings *.iso diff --git a/master/etc/network/interfaces b/master/etc/network/interfaces deleted file mode 100644 index 2dd2c2f..0000000 --- a/master/etc/network/interfaces +++ /dev/null @@ -1,25 +0,0 @@ -# This file describes the network interfaces available on your system -# and how to activate them. For more information, see interfaces(5). - -# The loopback network interface -auto lo -iface lo inet loopback - -# The primary network interface -auto eth0 -iface eth0 inet static - address 10.133.26.160 - netmask 255.255.255.0 - network 10.133.26.0 - broadcast 10.133.26.255 - pre-up ip addr flush dev eth0 - post-up ip addr add 10.133.28.160/24 dev eth0 - post-up ip route add default dev eth0 - -# The secondary network interface -auto eth1 -iface eth1 inet static - address 10.133.26.161 - netmask 255.255.255.0 - network 10.133.26.0 - broadcast 10.133.26.255 diff --git a/master/etc/network/interfaces.default b/master/etc/network/interfaces.default new file mode 100644 index 0000000..8322cc4 --- /dev/null +++ b/master/etc/network/interfaces.default @@ -0,0 +1,42 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +# The loopback network interface +auto lo +iface lo inet loopback + +# The primary network interface +auto eth0 +iface eth0 inet static + address 10.133.26.160 + netmask 255.255.255.0 + network 10.133.26.0 + broadcast 10.133.26.255 + pre-up ip addr flush dev eth0 + # FE306 authentification + post-up ip route add 238.0.0.0/24 dev eth0 + # FE306 pano + post-up ip route add 238.75.0.0/16 dev eth0 + # FE306 WP channels + # Pour prod voie PV 2eme octet vaut 111X XX11 (cf. libfreqplan/freqplancommon.h) + # => on met val de base vaut 224 (1110 0000) et mask a 224 (1110 0000) + # => 2eme octet associe aux valeurs de 224 a 255 + post-up ip route add 238.224.0.0/11 dev eth0 + # FE306 RF channels + # Pour prod voie RF 2eme octet vaut 110X XX11 (cf. libfreqplan/freqplancommon.h) + # => on met val de base vaut 192 (1100 0000) et mask a 224 (1110 0000) + # => 2eme octet associe aux valeurs de 192 a 223 + post-up ip route add 238.192.0.0/11 dev eth0 + # Delay line + post-up ip route add 239.0.0.0/8 dev eth0 + +# The secondary network interface +auto eth1 +iface eth1 inet static + address 10.133.28.160 + netmask 255.255.255.0 + network 10.133.28.0 + broadcast 10.133.28.255 + gateway 10.133.28.231 + pre-up ip addr flush dev eth1 + # Sensor prod diff --git a/master/etc/network/interfaces.lite b/master/etc/network/interfaces.lite new file mode 100644 index 0000000..2dd2c2f --- /dev/null +++ b/master/etc/network/interfaces.lite @@ -0,0 +1,25 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +# The loopback network interface +auto lo +iface lo inet loopback + +# The primary network interface +auto eth0 +iface eth0 inet static + address 10.133.26.160 + netmask 255.255.255.0 + network 10.133.26.0 + broadcast 10.133.26.255 + pre-up ip addr flush dev eth0 + post-up ip addr add 10.133.28.160/24 dev eth0 + post-up ip route add default dev eth0 + +# The secondary network interface +auto eth1 +iface eth1 inet static + address 10.133.26.161 + netmask 255.255.255.0 + network 10.133.26.0 + broadcast 10.133.26.255 diff --git a/master/etc/webconfig/alias.d/50-trc6500-master-file.csv b/master/etc/webconfig/alias.d/50-trc6500-master-file.csv index dc65735..77ee816 100644 --- a/master/etc/webconfig/alias.d/50-trc6500-master-file.csv +++ b/master/etc/webconfig/alias.d/50-trc6500-master-file.csv @@ -77,7 +77,7 @@ mediatray;/usr/share/webconfig;;Remove media-tray on HS22 chassis;/opt/script/se 12mhzdf;/usr/share/webconfig;;Setup 12MHzDF mode;sudo /opt/script/change_configuration 12MHzDF 12mhzmdf;/usr/share/webconfig;;Setup 12MHzMDF mode;sudo /opt/script/change_configuration 12MHzMDF 30mhzmdf;/usr/share/webconfig;;Setup 30MHzMDF mode;sudo /opt/script/change_configuration 30MHzMDF -30mhzmdf.lite.lite;/usr/share/webconfig;;Setup 30MHzMDF lite mode;sudo /opt/script/change_configuration 30MHzMDF.lite +30mhzmdf.lite;/usr/share/webconfig;;Setup 30MHzMDF lite mode;sudo /opt/script/change_configuration 30MHzMDF.lite 30mhzmhf;/usr/share/webconfig;;Setup 30MHzMHF mode;sudo /opt/script/change_configuration 30MHzMHF hw_ibm;/usr/share/webconfig;;Setup IBM HS22 chassis mode;sudo /opt/script/change_configuration hw_ibm hw_supermicro;/usr/share/webconfig;;Setup FatTwin Supermicro chassis mode;sudo /opt/script/change_configuration hw_supermicro diff --git a/master/opt/cluster/lite/etc/network/interfaces b/master/opt/cluster/lite/etc/network/interfaces new file mode 100644 index 0000000..5e0169c --- /dev/null +++ b/master/opt/cluster/lite/etc/network/interfaces @@ -0,0 +1,17 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +# The loopback network interface +auto lo +iface lo inet loopback + +# The primary network interface +auto eth0 +iface eth0 inet dhcp + pre-up ip addr flush dev eth0 + post-up ip route add default dev eth0 + +auto eth1 +iface eth1 inet dhcp + pre-up ip addr flush dev eth1 + diff --git a/master/opt/cluster/slave/etc/network/interfaces b/master/opt/cluster/slave/etc/network/interfaces index 5e0169c..a5d335d 100644 --- a/master/opt/cluster/slave/etc/network/interfaces +++ b/master/opt/cluster/slave/etc/network/interfaces @@ -9,9 +9,26 @@ iface lo inet loopback auto eth0 iface eth0 inet dhcp pre-up ip addr flush dev eth0 - post-up ip route add default dev eth0 + # FE306 pano + post-up ip route add 238.75.0.0/16 dev eth0 + # FE306 WP channels + # Pour prod voie PV 2eme octet vaut 111X XX11 (cf. libfreqplan/freqplancommon.h) + # => on met val de base vaut 224 (1110 0000) et mask a 224 (1110 0000) + # => 2eme octet associe aux valeurs de 224 a 255 + post-up ip route add 238.224.0.0/11 dev eth0 + # FE306 RF channels + # Pour prod voie RF 2eme octet vaut 110X XX11 (cf. libfreqplan/freqplancommon.h) + # => on met val de base vaut 192 (1100 0000) et mask a 224 (1110 0000) + # => 2eme octet associe aux valeurs de 192 a 223 + post-up ip route add 238.192.0.0/11 dev eth0 + # Delay line + post-up ip route add 239.0.0.0/8 dev eth0 +# The secondary network interface auto eth1 iface eth1 inet dhcp pre-up ip addr flush dev eth1 - + # FE306 authentification + post-up ip route add 238.0.0.0/24 dev eth1 + # Sensor prod + post-up ip route add 225.0.0.0/8 dev eth1 diff --git a/master/opt/script/change_configuration b/master/opt/script/change_configuration index ef715b7..6d72f64 100755 --- a/master/opt/script/change_configuration +++ b/master/opt/script/change_configuration @@ -82,6 +82,15 @@ if [ "$MODE_BW" ]; then title "updating /etc/hosts" check rm -f /etc/hosts check ln -s /etc/hosts.$MODE_BW /etc/hosts + check rm -f /etc/network/interfaces + case "$MODE_BW" in + 30MHzMDF.lite) + check ln -s /etc/network/interfaces.lite /etc/network/interfaces + ;; + *) + check ln -s /etc/network/interfaces.default /etc/network/interfaces + ;; + esac TARBALLS+=" root" for ip in 0A851{A,C}; do check ln -T -f -s default /opt/tftp/pxelinux.cfg/$ip; done case "$MODE_BW" in diff --git a/master/opt/script/check_network b/master/opt/script/check_network index 5c17bf2..edd2069 100755 --- a/master/opt/script/check_network +++ b/master/opt/script/check_network @@ -48,7 +48,7 @@ while [ $# -gt 0 ]; do -t) shift; [[ "$1" =~ [^0-9] ]] && { echo "incorrect timeout ($1)"; exit 1;}; TIMEOUT=$1;; -v) echo "$PROGNAME: version $VER"; exit;; -w) MODE="wait";; - -x) EXCLUDE="trc00";; + -x) EXCLUDE="trc00[^ ]*";; *) list+=" "$1;; esac shift @@ -56,7 +56,7 @@ done # list [ "$list" ] || list=$(awk '{sub(/#.*/, "")} /trc[0-9][0-9]/ && ! /-rf/ {print $2}' /etc/hosts) -list=$(echo $list" "|sed s/$EXCLUDE//) +list=$(echo $list" "|sed "s/$EXCLUDE//") # timeout if [ "$TIMEOUT" ]; then diff --git a/master/opt/tftp/pxelinux.cfg/default b/master/opt/tftp/pxelinux.cfg/default index 911402d..63e5e03 100644 --- a/master/opt/tftp/pxelinux.cfg/default +++ b/master/opt/tftp/pxelinux.cfg/default @@ -12,7 +12,7 @@ LABEL debian MENU LABEL ^Debian 7 (TRC6500) KERNEL /vmlinuz INITRD /initrd.img - APPEND noinitrd ramdisk_size=8192 boot=tftp fastboot tftpserver=10.133.26.160 tarballs=root.tgz,slave.tgz + APPEND noinitrd ramdisk_size=8192 boot=tftp fastboot tftpserver=10.133.28.160 tarballs=root.tgz,slave.tgz LABEL freedos MENU LABEL ^FreeDos 1.0 diff --git a/master/root/bin/conf_switch_integration b/master/root/bin/conf_switch_integration index b454138..1bc0deb 100755 --- a/master/root/bin/conf_switch_integration +++ b/master/root/bin/conf_switch_integration @@ -31,7 +31,8 @@ expect -exact "#" { send "no shutdown\r" } expect -exact "#" { send "exit\r" } expect -exact "#" { send "ip route 192.168.$sub.0 255.255.255.0 Vlan192\r" } -expect -exact "#" { send "ip route 192.168.$sub.160 255.255.255.255 10.133.26.160\r" } +#expect -exact "#" { send "ip route 192.168.$sub.160 255.255.255.255 10.133.26.160\r" } +expect -exact "#" { send "ip route 192.168.$sub.160 255.255.255.255 10.133.28.160\r" } expect -exact "#" { send "ip route 192.168.$sub.101 255.255.255.255 Vlan10\r" } expect -exact "#" { send "ip route 192.168.0.0 255.255.255.0 192.168.$sub.230\r" } expect -exact "#" { send "exit\r" }