Merge branch 'master' of ssh://srvgitgnv/gitstore/g_tr65/debian6500
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Tue, 15 Sep 2015 10:22:44 +0000 (12:22 +0200)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Tue, 15 Sep 2015 10:22:44 +0000 (12:22 +0200)
92 files changed:
.gitignore
Makefile [new file with mode: 0644]
install_debian.txt
lite [new symlink]
master/etc/apt/sources.list.d/reseau_integration.list [deleted file]
master/etc/apt/sources.list.d/reseau_integration.list~ [new file with mode: 0644]
master/etc/default/rproxy [deleted file]
master/etc/dhcp/dhcpd.conf.blank.lite [new file with mode: 0644]
master/etc/dhcp/dhcpd.conf.cl0
master/etc/dhcp/dhcpd.conf.cl0.lite [new file with mode: 0644]
master/etc/fstab
master/etc/hosts.30MHzMDF
master/etc/hosts.30MHzMDF.lite [new file with mode: 0644]
master/etc/init.d/ammwake
master/etc/init.d/waitslaves
master/etc/init.d/waitswitches
master/etc/network/interfaces
master/etc/rproxy/sites.csv [deleted file]
master/etc/sudoers.d/pdmenu
master/etc/sudoers.d/webconfig
master/etc/sysctl.d/swap.conf [new file with mode: 0644]
master/etc/webconfig/alias.csv
master/opt/cluster/acq/etc/rc.local
master/opt/cluster/bin/create_slave_tarball.sh
master/opt/cluster/lite/etc/rc.local [new file with mode: 0755]
master/opt/cluster/rec/etc/fstab
master/opt/cluster/rec/etc/rc.local
master/opt/cluster/slave/etc/fstab
master/opt/cluster/slave/etc/network/interfaces
master/opt/cluster/slave/etc/rc.local
master/opt/tftp/pxelinux.cfg/lite [new file with mode: 0644]
master/opt/tftp/sw1.txt [new file with mode: 0644]
master/opt/tftp/sw2.txt [new file with mode: 0644]
master/opt/tftp/swg1.txt
master/opt/tftp/swg2.txt
master/opt/tftp/swm.txt
master/root/bin/conf_switch_integration.tcl [new file with mode: 0755]
master/root/bin/conf_swm_integration.tcl [deleted file]
master/root/bin/deploiement_conf_reseau_integration.sh
simple-cdd/additional_scripts/change_configuration.sh [deleted file]
simple-cdd/additional_scripts/check_network.sh [deleted file]
simple-cdd/additional_scripts/configure_fe306.sh [deleted file]
simple-cdd/additional_scripts/configure_matrix.tcl [deleted file]
simple-cdd/additional_scripts/configure_switch.tcl [deleted file]
simple-cdd/additional_scripts/configure_switch_bootstrap.tcl [deleted file]
simple-cdd/additional_scripts/connect_switch.tcl [deleted file]
simple-cdd/additional_scripts/flash_fe306.sh [deleted file]
simple-cdd/additional_scripts/set_mediatray.tcl [deleted file]
simple-cdd/deb_build/Makefile [deleted file]
simple-cdd/deb_build/debian-binary [deleted file]
simple-cdd/deb_build/debian/debian-changelog [deleted file]
simple-cdd/deb_build/debian/debian-control [deleted file]
simple-cdd/deb_build/debian/debian-postinst [deleted file]
simple-cdd/deb_build/debian/debian-postrm [deleted file]
simple-cdd/deb_build/debian/debian-preinst [deleted file]
simple-cdd/deb_build/master-files [deleted symlink]
simple-cdd/deb_build/readme [deleted file]
simple-cdd/local_packages/dce_1.10.2-1_all.deb [deleted file]
simple-cdd/local_packages/libmadb-dev_0.8.1-1_amd64.deb [deleted file]
simple-cdd/local_packages/libmadb-dev_0.8.1-2_amd64.deb [new file with mode: 0644]
simple-cdd/local_packages/libmadb0_0.8.1-1_amd64.deb [deleted file]
simple-cdd/local_packages/libmadb0_0.8.1-2_amd64.deb [new file with mode: 0644]
simple-cdd/local_packages/swb_1.2.0-1_all.deb [deleted file]
simple-cdd/local_packages/webconfig_1.12.5-2_all.deb [deleted file]
simple-cdd/local_packages/webconfig_1.12.6-1_all.deb [deleted file]
simple-cdd/local_packages/webconfig_1.16.0-2_all.deb [new file with mode: 0644]
simple-cdd/local_packages/xcfe_1.6.2-1_all.deb [deleted file]
simple-cdd/local_packages/xcfe_1.6.3-1_all.deb [deleted file]
simple-cdd/local_packages/xcfe_1.6.5-1_all.deb [new file with mode: 0644]
simple-cdd/profiles/trc6500.postinst
simple-cdd/profiles/trc6500.preseed
simple-cdd/readme [deleted file]
simple-cdd/readme.txt [new file with mode: 0644]
simple-cdd/simple-cdd.conf
trc6500-master-file/Makefile [new file with mode: 0644]
trc6500-master-file/debian-binary [new file with mode: 0644]
trc6500-master-file/debian/debian-changelog [new file with mode: 0644]
trc6500-master-file/debian/debian-control [new file with mode: 0644]
trc6500-master-file/debian/debian-postinst [new file with mode: 0755]
trc6500-master-file/debian/debian-postrm [new file with mode: 0755]
trc6500-master-file/debian/debian-preinst [new file with mode: 0755]
trc6500-master-file/readme.txt [new file with mode: 0644]
trc6500-master-file/script/change_configuration.sh [new file with mode: 0755]
trc6500-master-file/script/check_network.sh [new file with mode: 0755]
trc6500-master-file/script/configure_fe306.sh [new file with mode: 0755]
trc6500-master-file/script/configure_matrix.tcl [new file with mode: 0755]
trc6500-master-file/script/configure_switch.tcl [new file with mode: 0755]
trc6500-master-file/script/configure_switch_bootstrap.tcl [new file with mode: 0755]
trc6500-master-file/script/connect_switch.tcl [new file with mode: 0755]
trc6500-master-file/script/cpumon_lite [new file with mode: 0755]
trc6500-master-file/script/flash_fe306.sh [new file with mode: 0755]
trc6500-master-file/script/set_mediatray.tcl [new file with mode: 0755]

index 5d5e210e5242da77ae4703e21a428dc347b93bcf..210664f942ba91bcd06ae7bf1a0f6540f0aae933 100644 (file)
 *.orig
 .*project
 .settings
+*.iso
+trc6500-master-file_*.deb
+simple-cdd/build.log
+simple-cdd/dists/
+simple-cdd/images/
 
+trc6500-master-file/deb
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..2c2a28a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+SHELL=/bin/bash
+
+MASTERFILE = trc6500-master-file
+
+VERSION = $(shell awk '/^$(MASTERFILE)/ {gsub(/[()]/, ""); print $$2; exit}' $(MASTERFILE)/debian/debian-changelog)
+
+ISOVER = $(shell echo $(VERSION) | sed 's/-.*$$//')
+
+ISO = simple-cdd/images/debian-7.8-amd64-CD-1.iso
+
+TARGET_ISO = debian-trc6500-$(ISOVER).iso
+
+TARGET_DEB = $(MASTERFILE)_$(VERSION)_all.deb
+
+all: iso masterfile
+
+iso: $(TARGET_ISO) 
+
+$(TARGET_ISO): $(ISO)
+       mv $< $@
+
+$(ISO): $(TARGET_DEB)
+       cd simple-cdd && build-simple-cdd --dist wheezy --conf ./simple-cdd.conf
+
+masterfile: $(TARGET_DEB)
+
+$(TARGET_DEB):
+       make -C $(MASTERFILE)
+
+clean:
+       rm -f $(TARGET_DEB) $(TARGET_ISO)
index c44aee341020b5c51a630d6c1382df0c9c6d8547..91ff75394150a21bef3202a3247c111062ac1866 100644 (file)
@@ -2,7 +2,7 @@ Step 1: Minimalist Debian install
 * locale: English/US
 * timezone: France
 * keboard: French
-* eth1 / 10.133.28.160 / 255.255.255.0 / 10.133.28.231 / no dns
+* eth1 / 10.133.26.160 / 255.255.255.0 / 10.133.26.231 / no dns
 * hostname: trc00.thalesgroup.com
 * root password: thales
 * local user: trc6500
@@ -23,7 +23,7 @@ Step 2: First configuration
   aptitude install openssh-server rsync
   eject
 * on server
-  ~/debian6500/master/opt/cluster/bin/sync_master.sh 10.133.28.160
+  ~/debian6500/master/opt/cluster/bin/sync_master.sh 10.133.26.160
 * on blade
   mount -a
   mv /home /var/media/backup
@@ -34,12 +34,12 @@ Step 2: First configuration
 Step 3: 
 * on server
   ## restore network connection
-  cat ~trc6500/ftp/TRC6500.pub | ssh root@10.133.28.160 apt-key add -
+  cat ~trc6500/ftp/TRC6500.pub | ssh root@10.133.26.160 apt-key add -
 * on blade
   aptitude update
   aptitude install $(cat /root/debian-list.txt)
 * on server
-  ~/debian6500/master/opt/cluster/bin/sync_master.sh 10.133.28.160
+  ~/debian6500/master/opt/cluster/bin/sync_master.sh 10.133.26.160
 * on blade
   update-rc.d waitswitches defaults
   update-rc.d waitswitches enable
diff --git a/lite b/lite
new file mode 120000 (symlink)
index 0000000..36f4478
--- /dev/null
+++ b/lite
@@ -0,0 +1 @@
+master/opt/cluster/lite
\ No newline at end of file
diff --git a/master/etc/apt/sources.list.d/reseau_integration.list b/master/etc/apt/sources.list.d/reseau_integration.list
deleted file mode 100644 (file)
index d8fae89..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-deb [arch=amd64,all] http://192.168.0.53/debian-amd64 wheezy contrib main non-free
-deb [arch=amd64,all] http://192.168.0.53/cots softndesign main debug
diff --git a/master/etc/apt/sources.list.d/reseau_integration.list~ b/master/etc/apt/sources.list.d/reseau_integration.list~
new file mode 100644 (file)
index 0000000..d8fae89
--- /dev/null
@@ -0,0 +1,2 @@
+deb [arch=amd64,all] http://192.168.0.53/debian-amd64 wheezy contrib main non-free
+deb [arch=amd64,all] http://192.168.0.53/cots softndesign main debug
diff --git a/master/etc/default/rproxy b/master/etc/default/rproxy
deleted file mode 100644 (file)
index 7b0dcda..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# rproxy configure options
-
-# Should webconfig be enabled?
-SERVICE=yes
-
-# SITES: filename containing site declarations
-SITES=/etc/rproxy/sites.csv
diff --git a/master/etc/dhcp/dhcpd.conf.blank.lite b/master/etc/dhcp/dhcpd.conf.blank.lite
new file mode 100644 (file)
index 0000000..a171e01
--- /dev/null
@@ -0,0 +1,78 @@
+# /etc/dhcp3/dhcpd.conf
+# Fichier de configuration du serveur DHCP de l'ISC (package 'dhcp3-server')
+# Formation Debian GNU/Linux par Alexis de Lattre
+# http://formation-debian.via.ecp.fr/
+
+# Consultez "man dhcpd.conf" pour avoir toutes les informations sur les options
+
+# DEBUT des options GLOBALES
+# Les options globales s'appliqueront par defaut a tous les sous-reseaux
+
+# Nom de domaine
+ddns-domainname "trc6500.thalesgroup.com";
+option domain-name "trc6500.thalesgroup.com";
+
+# Duree du bail en secondes
+default-lease-time 6000;
+max-lease-time 6000;
+server-name "maitre";
+
+# FIN des options GLOBALES
+
+# DEBUT de la declaration des sous-reseaux et des machines
+
+subnet 10.133.26.0 netmask 255.255.255.0
+{
+  next-server 10.133.26.160;
+  filename "pxelinux.0";
+  option domain-name-servers 10.133.26.160;
+  use-host-decl-names on;
+  authoritative;
+}
+
+# liste des lames a completer dans l'ordre de la baie
+
+#lame fusion, pistage, LSU
+host trc02 { hardware ethernet 00:00:00:00:00:02; fixed-address 10.133.26.162;}
+host trc03 { hardware ethernet 00:00:00:00:00:03; fixed-address 10.133.26.163;}
+
+#lames gonio
+host trc04 { hardware ethernet 00:00:00:00:00:04; fixed-address 10.133.26.164;}
+host trc05 { hardware ethernet 00:00:00:00:00:05; fixed-address 10.133.26.165;}
+host trc06 { hardware ethernet 00:00:00:00:00:06; fixed-address 10.133.26.166;}
+host trc07 { hardware ethernet 00:00:00:00:00:07; fixed-address 10.133.26.167;}
+host trc08 { hardware ethernet 00:00:00:00:00:08; fixed-address 10.133.26.168;}
+host trc09 { hardware ethernet 00:00:00:00:00:09; fixed-address 10.133.26.169;}
+host trc10 { hardware ethernet 00:00:00:00:00:0A; fixed-address 10.133.26.170;}
+host trc11 { hardware ethernet 00:00:00:00:00:0B; fixed-address 10.133.26.171;}
+host trc12 { hardware ethernet 00:00:00:00:00:0C; fixed-address 10.133.26.172;}
+host trc13 { hardware ethernet 00:00:00:00:00:0D; fixed-address 10.133.26.173;}
+host trc14 { hardware ethernet 00:00:00:00:00:0E; fixed-address 10.133.26.174;}
+host trc15 { hardware ethernet 00:00:00:00:00:0F; fixed-address 10.133.26.175;}
+host trc16 { hardware ethernet 00:00:00:00:00:10; fixed-address 10.133.26.176;}
+host trc17 { hardware ethernet 00:00:00:00:00:11; fixed-address 10.133.26.177;}
+host trc18 { hardware ethernet 00:00:00:00:00:12; fixed-address 10.133.26.178;}
+host trc19 { hardware ethernet 00:00:00:00:00:13; fixed-address 10.133.26.179;}
+host trc20 { hardware ethernet 00:00:00:00:00:14; fixed-address 10.133.26.180;}
+host trc21 { hardware ethernet 00:00:00:00:00:15; fixed-address 10.133.26.181;}
+host trc22 { hardware ethernet 00:00:00:00:00:16; fixed-address 10.133.26.182;}
+host trc23 { hardware ethernet 00:00:00:00:00:17; fixed-address 10.133.26.183;}
+host trc24 { hardware ethernet 00:00:00:00:00:18; fixed-address 10.133.26.184;}
+host trc25 { hardware ethernet 00:00:00:00:00:19; fixed-address 10.133.26.185;}
+host trc26 { hardware ethernet 00:00:00:00:00:1A; fixed-address 10.133.26.186;}
+host trc27 { hardware ethernet 00:00:00:00:00:1B; fixed-address 10.133.26.187;}
+host trc28 { hardware ethernet 00:00:00:00:00:1C; fixed-address 10.133.26.188;}
+host trc29 { hardware ethernet 00:00:00:00:00:1D; fixed-address 10.133.26.189;}
+host trc30 { hardware ethernet 00:00:00:00:00:1E; fixed-address 10.133.26.190;}
+host trc31 { hardware ethernet 00:00:00:00:00:1F; fixed-address 10.133.26.191;}
+host trc32 { hardware ethernet 00:00:00:00:00:20; fixed-address 10.133.26.192;}
+host trc33 { hardware ethernet 00:00:00:00:00:21; fixed-address 10.133.26.193;}
+host trc34 { hardware ethernet 00:00:00:00:00:22; fixed-address 10.133.26.194;}
+host trc35 { hardware ethernet 00:00:00:00:00:23; fixed-address 10.133.26.195;}
+
+#lames monitoring
+host trc36 { hardware ethernet 00:00:00:00:00:24; fixed-address 10.133.26.196;}
+host trc37 { hardware ethernet 00:00:00:00:00:25; fixed-address 10.133.26.197;}
+host trc38 { hardware ethernet 00:00:00:00:00:26; fixed-address 10.133.26.198;}
+host trc39 { hardware ethernet 00:00:00:00:00:27; fixed-address 10.133.26.199;}
+
index 2e3f910f7200d921dd8b2b49f4c797ff4f6012d2..35ee1e2c1a8ff17842cba9f914912184efa1bdf9 100644 (file)
@@ -35,7 +35,7 @@ option domain-name "trc6500.thalesgroup.com";
 # Duree du bail en secondes
 default-lease-time 6000;
 max-lease-time 6000;
-server-name "master";
+server-name "maitre";
 
 # FIN des options GLOBALES
 
@@ -46,47 +46,95 @@ subnet 10.133.26.0 netmask 255.255.255.0
   next-server 10.133.26.160;
   filename "pxelinux.0";
   option domain-name-servers 10.133.26.160;
+  #option routers 10.133.26.231;
   use-host-decl-names on;
   authoritative;
 }
 
+# liste des lames a completer dans l'ordre de la baie
+
 #lame fusion, pistage, LSU
-host trc01 { hardware ethernet 00:25:90:8A:B2:08; fixed-address 10.133.26.161;}
+host trc01-rf { hardware ethernet 00:25:90:8A:B2:08; fixed-address 10.133.26.161;}
 
 #lames gonio
-host trc02 { hardware ethernet 00:25:90:4F:1E:8C; fixed-address 10.133.26.162;}
-host trc03 { hardware ethernet 00:25:90:4F:1E:8D; fixed-address 10.133.26.163;}
-host trc04 { hardware ethernet 00:25:90:4F:23:9E; fixed-address 10.133.26.164;}
-host trc05 { hardware ethernet 00:25:90:4F:23:9F; fixed-address 10.133.26.165;}
-host trc06 { hardware ethernet 00:25:90:4F:23:A4; fixed-address 10.133.26.166;}
-host trc07 { hardware ethernet 00:25:90:4F:23:A5; fixed-address 10.133.26.167;}
-host trc08 { hardware ethernet 00:25:90:4F:18:62; fixed-address 10.133.26.168;}
-host trc09 { hardware ethernet 00:25:90:4F:18:63; fixed-address 10.133.26.169;}
-host trc10 { hardware ethernet 00:25:90:4F:18:58; fixed-address 10.133.26.170;}
-host trc11 { hardware ethernet 00:25:90:4F:18:59; fixed-address 10.133.26.171;}
-host trc12 { hardware ethernet 00:25:90:4F:1A:28; fixed-address 10.133.26.172;}
-host trc13 { hardware ethernet 00:25:90:4F:1A:29; fixed-address 10.133.26.173;}
-host trc14 { hardware ethernet 00:25:90:4F:BB:72; fixed-address 10.133.26.174;}
-host trc15 { hardware ethernet 00:25:90:4F:BB:73; fixed-address 10.133.26.175;}
-host trc16 { hardware ethernet 00:25:90:4F:BB:22; fixed-address 10.133.26.176;}
-host trc17 { hardware ethernet 00:25:90:4F:BB:23; fixed-address 10.133.26.177;}
-host trc18 { hardware ethernet 00:25:90:4F:BA:F2; fixed-address 10.133.26.178;}
-host trc19 { hardware ethernet 00:25:90:4F:BA:F3; fixed-address 10.133.26.179;}
-host trc20 { hardware ethernet 00:25:90:4F:BA:F0; fixed-address 10.133.26.180;}
-host trc21 { hardware ethernet 00:25:90:4F:BA:F1; fixed-address 10.133.26.181;}
-host trc22 { hardware ethernet 00:25:90:4f:bb:1e; fixed-address 10.133.26.182;}
-host trc23 { hardware ethernet 00:25:90:4f:bb:1f; fixed-address 10.133.26.183;}
-host trc24 { hardware ethernet 00:25:90:4F:23:D4; fixed-address 10.133.26.184;}
-host trc25 { hardware ethernet 00:25:90:4F:23:D5; fixed-address 10.133.26.185;}
-host trc26 { hardware ethernet 00:25:90:4F:23:Dc; fixed-address 10.133.26.186;}
-host trc27 { hardware ethernet 00:25:90:4F:23:DD; fixed-address 10.133.26.187;}
-host trc28 { hardware ethernet 00:25:90:4F:BB:20; fixed-address 10.133.26.188;}
-host trc29 { hardware ethernet 00:25:90:4F:BB:21; fixed-address 10.133.26.189;}
-host trc30 { hardware ethernet 00:25:90:4F:E1:66; fixed-address 10.133.26.190;}
-host trc31 { hardware ethernet 00:25:90:4F:E1:67; fixed-address 10.133.26.191;}
-host trc32 { hardware ethernet 00:25:90:4F:EA:20; fixed-address 10.133.26.192;}
-host trc33 { hardware ethernet 00:25:90:4F:EA:21; fixed-address 10.133.26.193;}
+host trc02-rf { hardware ethernet 00:25:90:4F:1E:8C; fixed-address 10.133.26.162;}
+host trc03-rf { hardware ethernet 00:25:90:4F:23:9E; fixed-address 10.133.26.163;}
+host trc04-rf { hardware ethernet 00:25:90:4F:23:A4; fixed-address 10.133.26.164;}
+host trc05-rf { hardware ethernet 00:25:90:4F:18:62; fixed-address 10.133.26.165;}
+host trc06-rf { hardware ethernet 00:25:90:4F:18:58; fixed-address 10.133.26.166;}
+host trc07-rf { hardware ethernet 00:25:90:4F:1A:28; fixed-address 10.133.26.167;}
+host trc08-rf { hardware ethernet 00:25:90:4F:BB:72; fixed-address 10.133.26.168;}
+host trc09-rf { hardware ethernet 00:25:90:4F:BB:22; fixed-address 10.133.26.169;}
+host trc10-rf { hardware ethernet 00:25:90:4F:BA:F2; fixed-address 10.133.26.170;}
+host trc11-rf { hardware ethernet 00:25:90:4F:BA:F0; fixed-address 10.133.26.171;}
+host trc12-rf { hardware ethernet 00:25:90:4f:bb:1e; fixed-address 10.133.26.172;}
+host trc13-rf { hardware ethernet 00:25:90:4F:23:D4; fixed-address 10.133.26.173;}
+host trc14-rf { hardware ethernet 00:25:90:4F:23:Dc; fixed-address 10.133.26.174;}
+host trc15-rf { hardware ethernet 00:25:90:4F:BB:20; fixed-address 10.133.26.175;}
+host trc16-rf { hardware ethernet 00:25:90:4F:E1:66; fixed-address 10.133.26.176;}
+host trc17-rf { hardware ethernet 00:25:90:4F:EA:20; fixed-address 10.133.26.177;}
+host trc18-rf { hardware ethernet 00:25:90:4F:E2:D2; fixed-address 10.133.26.178;}
+host trc19-rf { hardware ethernet 00:25:90:4F:EF:00; fixed-address 10.133.26.179;}
+host trc20-rf { hardware ethernet 00:25:90:4F:E8:0A; fixed-address 10.133.26.180;}
+host trc21-rf { hardware ethernet 00:25:90:4F:C3:3C; fixed-address 10.133.26.181;}
+host trc22-rf { hardware ethernet 00:25:90:4F:BB:68; fixed-address 10.133.26.182;}
+host trc23-rf { hardware ethernet 00:25:90:4F:E1:62; fixed-address 10.133.26.183;}
+host trc24-rf { hardware ethernet 00:25:90:4F:e4:86; fixed-address 10.133.26.184;}
+host trc25-rf { hardware ethernet 00:25:90:4F:bb:74; fixed-address 10.133.26.185;}
 
 #lames monitoring
-host trc34 { hardware ethernet 00:25:90:4F:E2:D2; fixed-address 10.133.26.194;}
-host trc35 { hardware ethernet 00:25:90:4F:EF:00; fixed-address 10.133.26.195;}
+host trc26-rf { hardware ethernet 00:25:90:4F:BB:6E; fixed-address 10.133.26.186;}
+host trc27-rf { hardware ethernet 00:25:90:4F:BB:66; fixed-address 10.133.26.187;}
+
+host trc28-rf { hardware ethernet 00:00:00:00:00:01; fixed-address 10.133.26.188;}
+host trc29-rf { hardware ethernet 00:00:00:00:00:02; fixed-address 10.133.26.189;}
+host trc30-rf { hardware ethernet 00:00:00:00:00:03; fixed-address 10.133.26.190;}
+host trc31-rf { hardware ethernet 00:25:90:88:E3:C2; fixed-address 10.133.26.191;}
+
+subnet 10.133.28.0 netmask 255.255.255.0
+{
+  next-server 10.133.28.160;
+  filename "pxelinux.0";
+  option routers 10.133.28.231;
+  option domain-name-servers 10.133.28.160;
+  use-host-decl-names on;
+  authoritative;
+}
+
+#lame fusion, pistage, LSU
+host trc01 { hardware ethernet 00:25:90:8A:B2:09; fixed-address 10.133.28.161;}
+
+#lames gonio
+host trc02 { hardware ethernet 00:25:90:4F:1E:8D; fixed-address 10.133.28.162;}
+host trc03 { hardware ethernet 00:25:90:4F:23:9F; fixed-address 10.133.28.163;}
+host trc04 { hardware ethernet 00:25:90:4F:23:A5; fixed-address 10.133.28.164;}
+host trc05 { hardware ethernet 00:25:90:4F:18:63; fixed-address 10.133.28.165;}
+host trc06 { hardware ethernet 00:25:90:4F:18:59; fixed-address 10.133.28.166;}
+host trc07 { hardware ethernet 00:25:90:4F:1A:29; fixed-address 10.133.28.167;}
+host trc08 { hardware ethernet 00:25:90:4F:BB:73; fixed-address 10.133.28.168;}
+host trc09 { hardware ethernet 00:25:90:4F:BB:23; fixed-address 10.133.28.169;}
+host trc10 { hardware ethernet 00:25:90:4F:BA:F3; fixed-address 10.133.28.170;}
+host trc11 { hardware ethernet 00:25:90:4F:BA:F1; fixed-address 10.133.28.171;}
+host trc12 { hardware ethernet 00:25:90:4f:bb:1f; fixed-address 10.133.28.172;}
+host trc13 { hardware ethernet 00:25:90:4F:23:D5; fixed-address 10.133.28.173;}
+host trc14 { hardware ethernet 00:25:90:4F:23:DD; fixed-address 10.133.28.174;}
+host trc15 { hardware ethernet 00:25:90:4F:BB:21; fixed-address 10.133.28.175;}
+host trc16 { hardware ethernet 00:25:90:4F:E1:67; fixed-address 10.133.28.176;}
+host trc17 { hardware ethernet 00:25:90:4F:EA:21; fixed-address 10.133.28.177;}
+host trc18 { hardware ethernet 00:25:90:4F:E2:D3; fixed-address 10.133.28.178;}
+host trc19 { hardware ethernet 00:25:90:4F:EF:01; fixed-address 10.133.28.179;}
+host trc20 { hardware ethernet 00:25:90:4F:E8:0B; fixed-address 10.133.28.180;}
+host trc21 { hardware ethernet 00:25:90:4F:C3:3D; fixed-address 10.133.28.181;}
+host trc22 { hardware ethernet 00:25:90:4F:BB:69; fixed-address 10.133.28.182;}
+host trc23 { hardware ethernet 00:25:90:4F:E1:63; fixed-address 10.133.28.183;}
+host trc24 { hardware ethernet 00:25:90:4F:e4:87; fixed-address 10.133.28.184;}
+host trc25 { hardware ethernet 00:25:90:4F:bb:75; fixed-address 10.133.28.185;}
+
+#lames monitoring
+host trc26 { hardware ethernet 00:25:90:4F:BB:6F; fixed-address 10.133.28.186;}
+host trc27 { hardware ethernet 00:25:90:4F:BB:67; fixed-address 10.133.28.187;}
+
+host trc28 { hardware ethernet 00:00:00:00:00:01; fixed-address 10.133.26.188;}
+host trc29 { hardware ethernet 00:00:00:00:00:02; fixed-address 10.133.26.189;}
+host trc30 { hardware ethernet 00:00:00:00:00:03; fixed-address 10.133.26.190;}
+host trc31 { hardware ethernet 00:25:90:88:E3:C3; fixed-address 10.133.28.191;}
diff --git a/master/etc/dhcp/dhcpd.conf.cl0.lite b/master/etc/dhcp/dhcpd.conf.cl0.lite
new file mode 100644 (file)
index 0000000..6c90903
--- /dev/null
@@ -0,0 +1,95 @@
+# /etc/dhcp3/dhcpd.conf
+# Fichier de configuration du serveur DHCP de l'ISC (package 'dhcp3-server')
+# Formation Debian GNU/Linux par Alexis de Lattre
+# http://formation-debian.via.ecp.fr/
+
+# Consultez "man dhcpd.conf" pour avoir toutes les informations sur les options
+
+
+# ============================================================================
+# V1.5
+# Copyright (C) THALES. All rights reserved
+# Author: Jean-Noel Raguenes
+# Date : 07/12/2009
+# Modification:
+# - V1.1: Herve Petit 10/03/2010
+#   Reprise avec ajouts des sub net eth1
+# - V1.2: Herve Petit 24/06/2010
+#   Ajout option routers sur sub net eth1
+# - V1.3: Herve Petit 25/08/2010
+#   Remplacement lame trc13 par lame trc27 a cause pb d'init_statique
+#   qui prennait 2 mn sur cette lame
+# - V1.4: Herve Petit 18/04/2011
+#   Suppression definition de la route par defaut a partir du fichier dhcp
+# - V1.5: Laurent Mazet 09/05/2014
+#   Netoyage
+# ============================================================================
+
+# DEBUT des options GLOBALES
+# Les options globales s'appliqueront par defaut a tous les sous-reseaux
+
+# Nom de domaine
+ddns-domainname "trc6500.thalesgroup.com";
+option domain-name "trc6500.thalesgroup.com";
+
+# Duree du bail en secondes
+default-lease-time 6000;
+max-lease-time 6000;
+server-name "master";
+
+# FIN des options GLOBALES
+
+# DEBUT de la declaration des sous-reseaux et des machines
+
+subnet 10.133.26.0 netmask 255.255.255.0
+{
+  next-server 10.133.26.160;
+  filename "pxelinux.0";
+  option domain-name-servers 10.133.26.160;
+  use-host-decl-names on;
+  authoritative;
+}
+
+#lame fusion, pistage, LSU
+host trc02 { hardware ethernet 00:25:90:8A:B2:08; fixed-address 10.133.26.162;}
+host trc03 { hardware ethernet 00:25:90:8A:B2:09; fixed-address 10.133.26.163;}
+
+#lames gonio
+host trc04 { hardware ethernet 00:25:90:4F:1E:8C; fixed-address 10.133.26.164;}
+host trc05 { hardware ethernet 00:25:90:4F:1E:8D; fixed-address 10.133.26.165;}
+host trc06 { hardware ethernet 00:25:90:4F:23:9E; fixed-address 10.133.26.166;}
+host trc07 { hardware ethernet 00:25:90:4F:23:9F; fixed-address 10.133.26.167;}
+host trc08 { hardware ethernet 00:25:90:4F:23:A4; fixed-address 10.133.26.168;}
+host trc09 { hardware ethernet 00:25:90:4F:23:A5; fixed-address 10.133.26.169;}
+host trc10 { hardware ethernet 00:25:90:4F:18:62; fixed-address 10.133.26.170;}
+host trc11 { hardware ethernet 00:25:90:4F:18:63; fixed-address 10.133.26.171;}
+host trc12 { hardware ethernet 00:25:90:4F:18:58; fixed-address 10.133.26.172;}
+host trc13 { hardware ethernet 00:25:90:4F:18:59; fixed-address 10.133.26.173;}
+host trc14 { hardware ethernet 00:25:90:4F:1A:28; fixed-address 10.133.26.174;}
+host trc15 { hardware ethernet 00:25:90:4F:1A:29; fixed-address 10.133.26.175;}
+host trc16 { hardware ethernet 00:25:90:4F:BB:72; fixed-address 10.133.26.176;}
+host trc17 { hardware ethernet 00:25:90:4F:BB:73; fixed-address 10.133.26.177;}
+host trc18 { hardware ethernet 00:25:90:4F:BB:22; fixed-address 10.133.26.178;}
+host trc19 { hardware ethernet 00:25:90:4F:BB:23; fixed-address 10.133.26.179;}
+host trc20 { hardware ethernet 00:25:90:4F:BA:F2; fixed-address 10.133.26.180;}
+host trc21 { hardware ethernet 00:25:90:4F:BA:F3; fixed-address 10.133.26.181;}
+host trc22 { hardware ethernet 00:25:90:4F:BA:F0; fixed-address 10.133.26.182;}
+host trc23 { hardware ethernet 00:25:90:4F:BA:F1; fixed-address 10.133.26.183;}
+host trc24 { hardware ethernet 00:25:90:4f:bb:1e; fixed-address 10.133.26.184;}
+host trc25 { hardware ethernet 00:25:90:4f:bb:1f; fixed-address 10.133.26.185;}
+host trc26 { hardware ethernet 00:25:90:4F:23:D4; fixed-address 10.133.26.186;}
+host trc27 { hardware ethernet 00:25:90:4F:23:D5; fixed-address 10.133.26.187;}
+host trc28 { hardware ethernet 00:25:90:4F:23:Dc; fixed-address 10.133.26.188;}
+host trc29 { hardware ethernet 00:25:90:4F:23:DD; fixed-address 10.133.26.189;}
+host trc30 { hardware ethernet 00:25:90:4F:BB:20; fixed-address 10.133.26.190;}
+host trc31 { hardware ethernet 00:25:90:4F:BB:21; fixed-address 10.133.26.191;}
+host trc32 { hardware ethernet 00:25:90:4F:E1:66; fixed-address 10.133.26.192;}
+host trc33 { hardware ethernet 00:25:90:4F:E1:67; fixed-address 10.133.26.193;}
+host trc34 { hardware ethernet 00:25:90:4F:EA:20; fixed-address 10.133.26.194;}
+host trc35 { hardware ethernet 00:25:90:4F:EA:21; fixed-address 10.133.26.195;}
+
+#lames monitoring
+host trc36 { hardware ethernet 00:25:90:4F:E2:D2; fixed-address 10.133.26.196;}
+host trc37 { hardware ethernet 00:25:90:4F:E2:D3; fixed-address 10.133.26.197;}
+host trc38 { hardware ethernet 00:25:90:4F:EF:00; fixed-address 10.133.26.198;}
+host trc39 { hardware ethernet 00:25:90:4F:EF:01; fixed-address 10.133.26.199;}
index 3445617fd20e313d2717e27a6e0b3c83037532fe..444d942869c2e83e11a9964fa3a6e7d862ab60f8 100644 (file)
@@ -5,7 +5,7 @@
 # that works even if disks are added and removed. See fstab(5).
 #
 # <dev>   <mount point>     <type>      <options>         <dump>  <pass>
-/dev/sda1 /                 ext4        errors=remount-ro 0       1
-/dev/sda3 /var/media/backup ext4        defaults          0       2
+/dev/sda1 /                 ext4        noatime,errors=remount-ro 0       1
+/dev/sda3 /var/media/backup ext4        noatime,defaults          0       2
 /dev/sda2 none              swap        sw                0       0
 /dev/sr0  /media/cdrom0     udf,iso9660 user,noauto       0       0
index 29906591907f9b23b995d3607c0a2ad1041c800e..e6efa49203f450f3e3f6a32a7cea4d66ff186cef 100644 (file)
@@ -12,65 +12,88 @@ ff02::3 ip6-allhosts
 # Reseau 10.133.26.0
 # ===============================
 
-10.133.26.160  trc00 maitre sup fusion nfsserver
-10.133.26.161  trc01
-10.133.26.162  trc02 lsu
-10.133.26.163  trc03 
-10.133.26.164  trc04 gon00
-10.133.26.165  trc05 gon01
-10.133.26.166  trc06 gon02
-10.133.26.167  trc07 gon03
-10.133.26.168  trc08 gon04
-10.133.26.169  trc09 gon05
-10.133.26.170  trc10 gon06
-10.133.26.171  trc11 gon07
-10.133.26.172  trc12 gon08
-10.133.26.173  trc13 gon09
-10.133.26.174  trc14 gon10
-10.133.26.175  trc15 gon11
-10.133.26.176  trc16 gon12
-10.133.26.177  trc17 gon13
-10.133.26.178  trc18 gon14
-10.133.26.179  trc19 gon15
-10.133.26.180  trc20 gon16
-10.133.26.181  trc21 gon17
-10.133.26.182  trc22 gon18
-10.133.26.183  trc23 gon19
-10.133.26.184  trc24 gon20
-10.133.26.185  trc25 gon21
-10.133.26.186  trc26 gon22
-10.133.26.187  trc27 gon23
-10.133.26.188  trc28 gon24
-10.133.26.189  trc29 gon25
-10.133.26.190  trc30 gon26
-10.133.26.191  trc31 gon27
-10.133.26.192  trc32 gon28
-10.133.26.193  trc33 gon29
-10.133.26.194  trc34 gon30
-10.133.26.195  trc35 gon31
-10.133.26.196  trc36 mon00
-10.133.26.197  trc37
-10.133.26.198  trc38 mon01
-10.133.26.199  trc39
+10.133.26.160  trc00-rf maitre-rf sup-rf fusion-rf
+10.133.26.161  trc01-rf lsu-rf
+10.133.26.162  trc02-rf gon00-rf
+10.133.26.163  trc03-rf gon01-rf
+10.133.26.164  trc04-rf gon02-rf
+10.133.26.165  trc05-rf gon03-rf
+10.133.26.166  trc06-rf gon04-rf
+10.133.26.167  trc07-rf gon05-rf
+10.133.26.168  trc08-rf gon06-rf
+10.133.26.169  trc09-rf gon07-rf
+10.133.26.170  trc10-rf gon08-rf
+10.133.26.171  trc11-rf gon09-rf
+10.133.26.172  trc12-rf gon10-rf
+10.133.26.173  trc13-rf gon11-rf
+10.133.26.174  trc14-rf gon12-rf
+10.133.26.175  trc15-rf gon13-rf
+10.133.26.176  trc16-rf gon14-rf
+10.133.26.177  trc17-rf gon15-rf
+10.133.26.178  trc18-rf gon16-rf
+10.133.26.179  trc19-rf gon17-rf
+10.133.26.180  trc20-rf gon18-rf
+10.133.26.181  trc21-rf gon19-rf
+10.133.26.182  trc22-rf gon20-rf
+10.133.26.183  trc23-rf gon21-rf
+10.133.26.184  trc24-rf gon22-rf
+10.133.26.185  trc25-rf gon23-rf
+10.133.26.186  trc26-rf mon00-rf
+10.133.26.187  trc27-rf mon01-rf
 
 10.133.26.231   swg swg1
 10.133.26.232   swg2
 
+# ===============================
+# Reseau 10.133.28.0
+# ===============================
+
 # prod fe306 1 110->118
-10.133.26.110  fe306-1
+10.133.28.110  fe306-1
 # prod fe306 2 120->128
-10.133.26.120  fe306-2
+10.133.28.120  fe306-2
 # prod fe306 3 130->138
-10.133.26.130  fe306-3
+10.133.28.130  fe306-3
 # prod fe306 4 140->148
-10.133.26.140  fe306-4
+10.133.28.140  fe306-4
 # prod fe306 5 150->158
-10.133.26.150  fe306-5
+10.133.28.150  fe306-5
+
+10.133.28.159  amm00
+10.133.28.158  amm01
+
+10.133.28.160  trc00 maitre sup fusion nfsserver
+10.133.28.161  trc01 lsu
+10.133.28.162  trc02 gon00
+10.133.28.163  trc03 gon01
+10.133.28.164  trc04 gon02
+10.133.28.165  trc05 gon03
+10.133.28.166  trc06 gon04
+10.133.28.167  trc07 gon05
+10.133.28.168  trc08 gon06
+10.133.28.169  trc09 gon07
+10.133.28.170  trc10 gon08
+10.133.28.171  trc11 gon09
+10.133.28.172  trc12 gon10
+10.133.28.173  trc13 gon11
+10.133.28.174  trc14 gon12
+10.133.28.175  trc15 gon13
+10.133.28.176  trc16 gon14
+10.133.28.177  trc17 gon15
+10.133.28.178  trc18 gon16
+10.133.28.179  trc19 gon17
+10.133.28.180  trc20 gon18
+10.133.28.181  trc21 gon19
+10.133.28.182  trc22 gon20
+10.133.28.183  trc23 gon21
+10.133.28.184  trc24 gon22
+10.133.28.185  trc25 gon23
+10.133.28.186  trc26 mon00
+10.133.28.187  trc27 mon01
 
-10.133.26.159  amm00
-10.133.26.158  amm01
+10.133.28.231   swm
 
-10.133.26.253   matrix
-10.133.26.254   gps
+10.133.28.253   matrix
+10.133.28.254   gps
 
 100.100.100.101 tmt
diff --git a/master/etc/hosts.30MHzMDF.lite b/master/etc/hosts.30MHzMDF.lite
new file mode 100644 (file)
index 0000000..fc95772
--- /dev/null
@@ -0,0 +1,72 @@
+127.0.0.1   localhost localhost.localdomain
+
+# The following lines are desirable for IPv6 capable hosts
+::1     ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+ff02::3 ip6-allhosts
+
+10.133.26.160  trc00 master sup fusion nfsserver
+10.133.26.161  trc01
+10.133.26.162  trc02 lsu
+10.133.26.163  trc03 
+10.133.26.164  trc04 gon00
+10.133.26.165  trc05 gon16
+10.133.26.166  trc06 gon01
+10.133.26.167  trc07 gon17
+10.133.26.168  trc08 gon02
+10.133.26.169  trc09 gon18
+10.133.26.170  trc10 gon03
+10.133.26.171  trc11 gon19
+10.133.26.172  trc12 gon04
+10.133.26.173  trc13 gon20
+10.133.26.174  trc14 gon05
+10.133.26.175  trc15 gon21
+10.133.26.176  trc16 gon06
+10.133.26.177  trc17 gon22
+10.133.26.178  trc18 gon07
+10.133.26.179  trc19 gon23
+10.133.26.180  trc20 gon08
+10.133.26.181  trc21 gon24
+10.133.26.182  trc22 gon09
+10.133.26.183  trc23 gon25
+10.133.26.184  trc24 gon10
+10.133.26.185  trc25 gon26
+10.133.26.186  trc26 gon11
+10.133.26.187  trc27 gon27
+10.133.26.188  trc28 gon12
+10.133.26.189  trc29 gon28
+10.133.26.190  trc30 gon13
+10.133.26.191  trc31 gon29
+10.133.26.192  trc32 gon14
+10.133.26.193  trc33 gon30
+10.133.26.194  trc34 gon15
+10.133.26.195  trc35 gon31
+10.133.26.196  trc36 mon00
+10.133.26.197  trc37
+10.133.26.198  trc38 mon01
+10.133.26.199  trc39
+
+10.133.26.231   sw1 swg swm
+10.133.26.232   sw2
+
+# prod fe306 1 110->118
+10.133.26.110  fe306-1
+# prod fe306 2 120->128
+10.133.26.120  fe306-2
+# prod fe306 3 130->138
+10.133.26.130  fe306-3
+# prod fe306 4 140->148
+10.133.26.140  fe306-4
+# prod fe306 5 150->158
+10.133.26.150  fe306-5
+
+10.133.26.159  amm00
+10.133.26.158  amm01
+
+10.133.26.253   matrix
+10.133.26.254   gps
+
+100.100.100.101 tmt
index d592e989c38b03ac445fc2964bd8fd33e012abba..c9828836cb8986cd6b9535e66cb2aa708655f5fa 100755 (executable)
@@ -20,12 +20,14 @@ VER=1.0
 
 HOSTS="/etc/hosts"
 ENABLE="yes"
-SCRIPT=/opt/trc6500/script/set_blade_power.tcl
+SCRIPTS=/opt/script/set_blade_power.tcl /opt/trc6500/script/set_blade_power.tcl
+SCRIPT=
 
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 [ -f /etc/default/ammwake ] && . /etc/default/ammwake
-[ -x $SCRIPT ] || exit 1
+for s in $SCRIPTS; do [ -x $s ] && SCRIPT=$s; done
+[ -x "$SCRIPT" ] || exit 1
 [ "$ENABLE" = "yes" ] || exit 0
 
 . /lib/lsb/init-functions
index 647de2dba4fe7ab31da21daaf4fd6e5ad5af4946..137e109604c3ba9187f36ebe3851f68b0f059635 100755 (executable)
@@ -19,12 +19,14 @@ VER=1.0
 ### END INIT INFO
 
 ENABLE="yes"
-SCRIPT=/opt/trc6500/script/check_network.sh
+SCRIPTS=/opt/script/check_network.sh /opt/trc6500/script/check_network.sh
+SCRIPT=
 TIMEOUT=360
 
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 [ -f /etc/default/waitslaves ] && . /etc/default/waitslaves
-[ -x $SCRIPT ] || exit 1
+for s in $SCRIPTS; do [ -x $s ] && SCRIPT=$s; done
+[ -x "$SCRIPT" ] || exit 1
 [ "$ENABLE" = "yes" ] || exit 0
 
 . /lib/lsb/init-functions
index d807ef12ec7abd013021157d898211cc1f8f1096..f75abba5c3cc043e3f592adbefc5586ba7653101 100755 (executable)
@@ -19,12 +19,14 @@ VER=1.0
 ### END INIT INFO
 
 ENABLE="yes"
-SCRIPT=/opt/trc6500/script/check_switches.sh
+SCRIPTS=/opt/script/check_switches.sh /opt/trc6500/script/check_switches.sh
+SCRIPT=
 TIMEOUT=360
 
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 [ -f /etc/default/waitswitches ] && . /etc/default/waitswitches
-[ -x $SCRIPT ] || exit 1
+for s in $SCRIPTS; do [ -x $s ] && SCRIPT=$s; done
+[ -x "$SCRIPT" ] || exit 1
 [ "$ENABLE" = "yes" ] || exit 0
 
 . /lib/lsb/init-functions
index ea34ae70d5674ddcc2c8b4bd81a581d368d89019..2dd2c2f3404891c0b1ed50e734b5f90f8351c2c6 100644 (file)
@@ -16,7 +16,8 @@ iface eth0 inet static
        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
diff --git a/master/etc/rproxy/sites.csv b/master/etc/rproxy/sites.csv
deleted file mode 100644 (file)
index 6589008..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# Host;portExt;portInt
-fe306-1;8110;80
-fe306-2;8120;80
-fe306-3;8130;80
-fe306-4;8140;80
-fe306-5;8150;80
-swg1;8231;80
-swg2;8232;80
index 789fdd919e57462dd36b52128c0e438e5a0e1a42..b21381d80949f216bbe52fbbff2f423f2ee4f54c 100644 (file)
@@ -1,11 +1,13 @@
 # /etc/sudoers.d/trc6500
 
+trc6500        ALL = (root)NOPASSWD: /opt/script/check_network.sh *
 trc6500        ALL = (root)NOPASSWD: /opt/trc6500/script/check_network.sh *
 trc6500        ALL = (root)NOPASSWD: /sbin/halt
 trc6500        ALL = (root)NOPASSWD: /usr/sbin/service ammwake *
 trc6500        ALL = (root)NOPASSWD: /usr/sbin/service ipmiwake *
 trc6500        ALL = (root)NOPASSWD: /usr/sbin/service trc6500 *
 trc6500        ALL = (root)NOPASSWD: /usr/bin/make *
+trc6500        ALL = (root)NOPASSWD: /opt/script/change_configuration.sh *
 trc6500        ALL = (root)NOPASSWD: /opt/trc6500/script/change_configuration.sh *
 trc6500        ALL = (root)NOPASSWD: /root/bin/change_lgcore.sh *
 
index 4f15b4de27d3db4a2b8988279ad51ab088540b05..e924016177e0590899856cc480ca1f47c9c0c41b 100644 (file)
@@ -1,10 +1,12 @@
 # /etc/sudoers.d/webconfig
 
+webconfig      ALL = (root)NOPASSWD: /opt/script/check_network.sh *
 webconfig      ALL = (root)NOPASSWD: /opt/trc6500/script/check_network.sh *
 webconfig      ALL = (root)NOPASSWD: /sbin/halt
 webconfig      ALL = (root)NOPASSWD: /usr/sbin/service ammwake *
 webconfig      ALL = (root)NOPASSWD: /usr/sbin/service ipmiwake *
 webconfig      ALL = (root)NOPASSWD: /usr/sbin/service trc6500 *
 webconfig      ALL = (root)NOPASSWD: /usr/bin/make *
+webconfig      ALL = (root)NOPASSWD: /opt/script/change_configuration.sh *
 webconfig      ALL = (root)NOPASSWD: /opt/trc6500/script/change_configuration.sh *
 webconfig      ALL = (root)NOPASSWD: /root/bin/change_lgcore.sh *
diff --git a/master/etc/sysctl.d/swap.conf b/master/etc/sysctl.d/swap.conf
new file mode 100644 (file)
index 0000000..c999d40
--- /dev/null
@@ -0,0 +1,4 @@
+# Custom settings
+# minimize the swapping, still swap partition is necessary for hibernation
+vm.swappiness = 1
+vm.vfs_cache_pressure = 50
index c15521e8aaeadce6502e921e80dcde7bf011f2e1..3bc9db2e9c9f69b43909fb4feb30877bb2cf4617 100644 (file)
@@ -16,29 +16,35 @@ start_active_phase;/usr/share/webconfig;;Start active phase;/opt/trc6500/bin/sta
 stop;/usr/share/webconfig;;Stop active phase;/opt/trc6500/bin/stop_active_phase
 halt;/usr/share/webconfig;;Shutdown TRC6500;sudo halt
 ;;;FE306 maintenance actions;
-fe306;/usr/share/webconfig;;Configure all FE306;/opt/trc6500/script/configure_fe306 -a
-FE306-1-flash;/usr/share/webconfig;;Flash FE306-1;/opt/trc6500/script/flash_fe306 -i fe306-1
-FE306-2-flash;/usr/share/webconfig;;Flash FE306-2;/opt/trc6500/script/flash_fe306 -i fe306-2
-FE306-3-flash;/usr/share/webconfig;;Flash FE306-3;/opt/trc6500/script/flash_fe306 -i fe306-3
-FE306-4-flash;/usr/share/webconfig;;Flash FE306-4;/opt/trc6500/script/flash_fe306 -i fe306-4
-FE306-5-flash;/usr/share/webconfig;;Flash FE306-5;/opt/trc6500/script/flash_fe306 -i fe306-5
+fe306;/usr/share/webconfig;;Configure all FE306;/opt/script/configure_fe306 -a
+FE306-1-flash;/usr/share/webconfig;;Flash FE306-1;/opt/script/flash_fe306 -i fe306-1
+FE306-2-flash;/usr/share/webconfig;;Flash FE306-2;/opt/script/flash_fe306 -i fe306-2
+FE306-3-flash;/usr/share/webconfig;;Flash FE306-3;/opt/script/flash_fe306 -i fe306-3
+FE306-4-flash;/usr/share/webconfig;;Flash FE306-4;/opt/script/flash_fe306 -i fe306-4
+FE306-5-flash;/usr/share/webconfig;;Flash FE306-5;/opt/script/flash_fe306 -i fe306-5
 ;;;Matrix maintenance actions;
-maxtrix;/usr/share/webconfig;;Configure matrix;/opt/trc6500/script/configure_matrix
+maxtrix;/usr/share/webconfig;;Configure matrix;/opt/script/configure_matrix
 ;;;Switch maintenance actions;
-swg1-boot;/usr/share/webconfig;;Bootstrap switch SWG1;/opt/trc6500/script/configure_switch_bootstrap swg1
-swg2-boot;/usr/share/webconfig;;Bootstrap switch SWG2;/opt/trc6500/script/configure_switch_bootstrap swg2
-swm-boot;/usr/share/webconfig;;Bootstrap switch SWM;/opt/trc6500/script/configure_switch_bootstrap swm
-swg1;/usr/share/webconfig;;Configure switch SWG1;/opt/trc6500/script/configure_switch swg1
-swg2;/usr/share/webconfig;;Configure switch SWG2;/opt/trc6500/script/configure_switch swg2
-swm;/usr/share/webconfig;;Configure switch SWM;/opt/trc6500/script/configure_switch swm
-swg1-restart;/usr/share/webconfig;;Restart switch SWG1;/opt/trc6500/script/connect_switch.tcl -c reload swg1
-swg2-restart;/usr/share/webconfig;;Restart switch SWG2;/opt/trc6500/script/connect_switch.tcl -c reload swg2
-swm-restart;/usr/share/webconfig;;Restart switch SWM;/opt/trc6500/script/connect_switch.tcl -c reload swm
+sw1-boot;/usr/share/webconfig;;Bootstrap switch SW1;/opt/script/configure_switch_bootstrap sw1
+sw2-boot;/usr/share/webconfig;;Bootstrap switch SW2;/opt/script/configure_switch_bootstrap sw2
+swg1-boot;/usr/share/webconfig;;Bootstrap switch SWG1;/opt/script/configure_switch_bootstrap swg1
+swg2-boot;/usr/share/webconfig;;Bootstrap switch SWG2;/opt/script/configure_switch_bootstrap swg2
+swm-boot;/usr/share/webconfig;;Bootstrap switch SWM;/opt/script/configure_switch_bootstrap swm
+sw1;/usr/share/webconfig;;Configure switch SW1;/opt/script/configure_switch sw1
+sw2;/usr/share/webconfig;;Configure switch SW2;/opt/script/configure_switch sw2
+swg1;/usr/share/webconfig;;Configure switch SWG1;/opt/script/configure_switch swg1
+swg2;/usr/share/webconfig;;Configure switch SWG2;/opt/script/configure_switch swg2
+swm;/usr/share/webconfig;;Configure switch SWM;/opt/script/configure_switch swm
+sw1-restart;/usr/share/webconfig;;Restart switch SW1;/opt/script/connect_switch.tcl -c reload sw1
+sw2-restart;/usr/share/webconfig;;Restart switch SW2;/opt/script/connect_switch.tcl -c reload sw2
+swg1-restart;/usr/share/webconfig;;Restart switch SWG1;/opt/script/connect_switch.tcl -c reload swg1
+swg2-restart;/usr/share/webconfig;;Restart switch SWG2;/opt/script/connect_switch.tcl -c reload swg2
+swm-restart;/usr/share/webconfig;;Restart switch SWM;/opt/script/connect_switch.tcl -c reload swm
 ;;;Blade maintenance actions;
-bios;/usr/share/webconfig;;Configure BIOS for all Supermicro blades;sudo /opt/trc6500/script/check_network.sh -c '/opt/bios/update_bios_cfg.sh -y -Y' -o
-ipmi;/usr/share/webconfig;;Configure IPMI for all Supermicro blades;sudo /opt/trc6500/script/check_network.sh -c '/opt/ipmi/update_blade_cfg.sh -y -Y' -o
+bios;/usr/share/webconfig;;Configure BIOS for all Supermicro blades;sudo /opt/script/check_network.sh -c '/opt/bios/update_bios_cfg.sh -y -Y' -o
+ipmi;/usr/share/webconfig;;Configure IPMI for all Supermicro blades;sudo /opt/script/check_network.sh -c '/opt/ipmi/update_blade_cfg.sh -y -Y' -o
 /dce;/usr/share/dce;/etc/dhcp/dhcpd.conf;DHCPD Configuration Editor;sudo service isc-dhcp-server restart
-ntp;/usr/share/webconfig;;Synchronize time and date on all blades;sudo /opt/trc6500/script/check_network.sh -c 'service chrony stop; ntpdate-debian; service chrony start' -o
+ntp;/usr/share/webconfig;;Synchronize time and date on all blades;sudo /opt/script/check_network.sh -c 'service chrony stop; ntpdate-debian; service chrony start' -o
 ;;;Internal equipements;
 http://10.133.26.160:8110;/usr/share/webconfig;;FE306-1;:goto:
 http://10.133.26.160:8120;/usr/share/webconfig;;FE306-2;:goto:
@@ -56,18 +62,19 @@ ammwake;/usr/share/webconfig;;Power on all HS22 IBM slaves;sudo service ammwake
 ipmiwake;/usr/share/webconfig;;Power on all SuperMicro slaves;sudo service ipmiwake start
 ammwake;/usr/share/webconfig;;Power off all HS22 IBM slaves;sudo service ammwake stop
 ipmiwake;/usr/share/webconfig;;Power off all SuperMicro slaves;sudo service ipmiwake stop
-mediatray;/usr/share/webconfig;;Set media-tray to HS22 master blade;/opt/trc6500/script/set_mediatray amm00 -b 1
-mediatray;/usr/share/webconfig;;Remove media-tray on HS22 chassis;/opt/trc6500/script/set_mediatray amm00 -b 0 && /opt/trc6500/script/set_mediatray amm01 -b 0
+mediatray;/usr/share/webconfig;;Set media-tray to HS22 master blade;/opt/script/set_mediatray amm00 -b 1
+mediatray;/usr/share/webconfig;;Remove media-tray on HS22 chassis;/opt/script/set_mediatray amm00 -b 0 && /opt/script/set_mediatray amm01 -b 0
 ;;;Setup hardware actions;
-8mhzmhf;/usr/share/webconfig;;Setup 8MHzMHF mode;sudo /opt/trc6500/script/change_configuration.sh 8MHzMHF
-12mhzdf;/usr/share/webconfig;;Setup 12MHzDF mode;sudo /opt/trc6500/script/change_configuration.sh 12MHzDF
-12mhzmdf;/usr/share/webconfig;;Setup 12MHzMDF mode;sudo /opt/trc6500/script/change_configuration.sh 12MHzMDF
-30mhzmdf;/usr/share/webconfig;;Setup 30MHzMDF mode;sudo /opt/trc6500/script/change_configuration.sh 30MHzMDF
-30mhzmhf;/usr/share/webconfig;;Setup 30MHzMHF mode;sudo /opt/trc6500/script/change_configuration.sh 30MHzMHF
-hw_ibm;/usr/share/webconfig;;Setup IBM HS22 chassis mode;sudo /opt/trc6500/script/change_configuration.sh hw_ibm
-hw_supermicro;/usr/share/webconfig;;Setup FatTwin Supermicro chassis mode;sudo /opt/trc6500/script/change_configuration.sh hw_supermicro
-tz_zulu;/usr/share/webconfig;;Setup Zulu timezone;sudo /opt/trc6500/script/change_configuration.sh tz_zulu
-tz_paris;/usr/share/webconfig;;Setup Europe/Paris timezone;sudo /opt/trc6500/script/change_configuration.sh tz_paris
+8mhzmhf;/usr/share/webconfig;;Setup 8MHzMHF mode;sudo /opt/script/change_configuration.sh 8MHzMHF
+12mhzdf;/usr/share/webconfig;;Setup 12MHzDF mode;sudo /opt/script/change_configuration.sh 12MHzDF
+12mhzmdf;/usr/share/webconfig;;Setup 12MHzMDF mode;sudo /opt/script/change_configuration.sh 12MHzMDF
+30mhzmdf;/usr/share/webconfig;;Setup 30MHzMDF mode;sudo /opt/script/change_configuration.sh 30MHzMDF
+30mhzmdf.lite;/usr/share/webconfig;;Setup 30MHzMDF lite mode;sudo /opt/script/change_configuration.sh 30MHzMDF.lite
+30mhzmhf;/usr/share/webconfig;;Setup 30MHzMHF mode;sudo /opt/script/change_configuration.sh 30MHzMHF
+hw_ibm;/usr/share/webconfig;;Setup IBM HS22 chassis mode;sudo /opt/script/change_configuration.sh hw_ibm
+hw_supermicro;/usr/share/webconfig;;Setup FatTwin Supermicro chassis mode;sudo /opt/script/change_configuration.sh hw_supermicro
+tz_zulu;/usr/share/webconfig;;Setup Zulu timezone;sudo /opt/script/change_configuration.sh tz_zulu
+tz_paris;/usr/share/webconfig;;Setup Europe/Paris timezone;sudo /opt/script/change_configuration.sh tz_paris
 tarballs;/usr/share/webconfig;;Build tarballs;sudo make -f /opt/cluster/Makefile all
 ;;;Install LgCore actions;
 install-usb;/usr/share/webconfig;;Install LgCore from USB key;sudo /root/bin/change_lgcore.sh usb
index 72417e6ae61e805fcc9d5c005f4d61b180b8f172..5a9a5d94c6f4144ea29322f064b21a63def0e8e1 100755 (executable)
@@ -8,16 +8,21 @@
 #
 # In order to enable or disable this script just change the execution
 # bits.
-#
-# By default this script does nothing.
 
-# distribute interrupt for eth0 on core 1-5
-core=(2 4 8 10 20)
+# distribute interrupt for eth0 on core 1-4
+core=(2 4 8 10)
+eth=0
+l=0
+for i in $(awk '/eth'$eth'/ {sub(/:/, ""); print $1}' /proc/interrupts); do
+  echo "echo ${core[$l]} > /proc/irq/$i/smp_affinity"
+  l=$(expr $l + 1)
+  [ $l -eq ${#core[*]} ] && l=1
+done
 l=0
-for i in $(awk '/eth0/ {sub(/:/, ""); print $1}' /proc/interrupts); do
-  echo ${core[$l]} > /proc/irq/$i/smp_affinity
-  let l++
-  [ $l -eq 6 ] && l=1
+
+# fill screen of dummy lines to keep last messages in history
+for i in $(seq 1 25); do
+  echo TRC6500
 done
 
 exit 0
index 11ff8da8a636d58801c3adcd4ecbb49ae4bb7e05..26f9146fde4ab533a9882961c0ad542ac42ba42b 100755 (executable)
@@ -11,7 +11,7 @@
 # *
 
 PROGNAME=$(basename $0)
-BLADES="acq slave rec"
+BLADES="acq slave lite rec"
 CLUSTER=/opt/cluster
 EXCLUDE=/tmp/$PROGNAME-exclude-$$
 TFTP=/opt/tftp
diff --git a/master/opt/cluster/lite/etc/rc.local b/master/opt/cluster/lite/etc/rc.local
new file mode 100755 (executable)
index 0000000..234bce1
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash -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.
+
+# distribute interrupt for eth0 on core 0
+core=(800)
+eth=0
+l=0
+for i in $(awk '/eth'$eth'/ {sub(/:/, ""); print $1}' /proc/interrupts); do
+  echo "echo ${core[$l]} > /proc/irq/$i/smp_affinity"
+  l=$(expr $l + 1)
+  [ $l -eq ${#core[*]} ] && l=1
+done
+
+# distribute interrupt for eth1 on core 11
+core=(1)
+eth=1
+l=0
+for i in $(awk '/eth'$eth'/ {sub(/:/, ""); print $1}' /proc/interrupts); do
+  echo "echo ${core[$l]} > /proc/irq/$i/smp_affinity"
+  l=$(expr $l + 1)
+  [ $l -eq ${#core[*]} ] && l=1
+done
+
+# fill screen of dummy lines to keep last messages in history
+for i in $(seq 1 25); do
+  echo TRC6500
+done
+
+exit 0
index d5f7fa1b16e8afeca1293be4ddb16e634417c227..fd8837d31b8eef04c084b4e06f1baa8113809cf4 100644 (file)
@@ -23,8 +23,8 @@
 tmpfs                /tmp                  tmpfs   defaults                       0       0
 
 #export du repertoire de dump
-nfsserver:/dump      /dump                 nfs     acregmax=5,acdirmax=5,defaults 0       0
-nfsserver:/opt       /opt                  nfs     acregmax=5,acdirmax=5,defaults 0       0
-nfsserver:/home      /home                 nfs     acregmax=5,acdirmax=5,defaults 0       0
+nfsserver:/dump      /dump                 nfs     acregmax=5,acdirmax=5,noatime,async,defaults 0       0
+nfsserver:/opt       /opt                  nfs     acregmax=5,acdirmax=5,noatime,async,defaults 0       0
+nfsserver:/home      /home                 nfs     acregmax=5,acdirmax=5,noatime,async,defaults 0       0
 
-LABEL=REC            /var/media/rec       ext4    defaults                       0       2
+LABEL=REC            /var/media/rec       ext4    noatime,defaults                       0       2
index 03c36a059bb41b68295bebdb391eba65b95baef5..93e8b66c219584bfac10f1d8aeda349b57d98eb1 100755 (executable)
@@ -8,10 +8,13 @@
 #
 # In order to enable or disable this script just change the execution
 # bits.
-#
-# By default this script does nothing.
 
 # fix f*0^$#g local mount
 mount -a
 
+# fill screen of dummy lines to keep last messages in history
+for i in $(seq 1 25); do
+  echo TRC6500
+done
+
 exit 0
index 01bb7103bc05517a104bc193c3c68d8ca5f4fa3f..5dad15bc298fc104a9d84723fa449ece0a27f942 100644 (file)
@@ -23,6 +23,6 @@
 tmpfs                /tmp                  tmpfs   defaults                       0       0
 
 #export du repertoire de dump
-nfsserver:/dump      /dump                 nfs     acregmax=5,acdirmax=5,defaults 0       0
-nfsserver:/opt       /opt                  nfs     acregmax=5,acdirmax=5,defaults 0       0
-nfsserver:/home      /home                 nfs     acregmax=5,acdirmax=5,defaults 0       0
+nfsserver:/dump      /dump                 nfs     acregmax=5,acdirmax=5,noatime,async,defaults 0       0
+nfsserver:/opt       /opt                  nfs     acregmax=5,acdirmax=5,noatime,async,defaults 0       0
+nfsserver:/home      /home                 nfs     acregmax=5,acdirmax=5,noatime,async,defaults 0       0
index c9960515527560971f737e2b48cbb7a5e30528bf..10a14dc0287d16d19f46b31cc708fb2d6b6b6472 100644 (file)
@@ -9,25 +9,8 @@ iface lo inet loopback
 auto eth0
 iface eth0 inet dhcp
        pre-up ip addr flush 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
-       # FE306 authentification
-       post-up ip route add 238.0.0.0/24 dev eth0
-       # Sensor prod
-       post-up ip route add 225.0.0.0/8 dev eth0
 
 auto eth1
 iface eth1 inet dhcp
+       pre-up ip addr flush dev eth1
 
index 563698d0bf4d39777571457c9781530eac98af42..9268f57b2dcdcffa0b87dce04dd817a6acfa8f08 100755 (executable)
@@ -8,20 +8,10 @@
 #
 # In order to enable or disable this script just change the execution
 # bits.
-#
-# By default this script does nothing.
 
+# fill screen of dummy lines to keep last messages in history
 for i in $(seq 1 25); do
   echo TRC6500
 done
 
-# distribute interrupt for eth0 on core 1-6
-core=(2 4 8 10 20 40)
-l=0
-for i in $(awk '/eth0/ {sub(/:/, ""); print $1}' /proc/interrupts); do
-  echo ${core[$l]} > /proc/irq/$i/smp_affinity
-  let l++
-  [ $l -eq 6 ] && l=1
-done
-
 exit 0
diff --git a/master/opt/tftp/pxelinux.cfg/lite b/master/opt/tftp/pxelinux.cfg/lite
new file mode 100644 (file)
index 0000000..dab0dd9
--- /dev/null
@@ -0,0 +1,21 @@
+PROMPT 2
+TIMEOUT 30
+UI /menu.c32
+
+KBDMAP /fr.kmp
+
+MENU TITLE [[ PXE BOOT ]]
+
+DEFAULT debian
+
+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,lite.tgz
+
+LABEL freedos
+       MENU LABEL ^FreeDos 1.0
+       KERNEL /memdisk
+       INITRD /balder10.imz
+       APPEND -
diff --git a/master/opt/tftp/sw1.txt b/master/opt/tftp/sw1.txt
new file mode 100644 (file)
index 0000000..9c5f7fd
--- /dev/null
@@ -0,0 +1,357 @@
+macro name VERSION
+macro description 2.3 full-duplex
+@
+!
+version 12.2
+no service pad
+service timestamps debug datetime msec
+service timestamps log datetime msec
+service password-encryption
+service compress-config
+service sequence-numbers
+!
+hostname SWG1
+!
+boot-start-marker
+boot system flash bootflash:cat4500-ipbase-mz.122-54.SG1.bin
+boot system flash bootflash:cat4500e-ipbase-mz.122-54.SG1.bin
+boot-end-marker
+!
+enable secret 5 $1$OMTZ$xM5SrEPag4m7MGrV1u86/0
+!
+!
+no aaa new-model
+ip subnet-zero
+no ip domain-lookup
+!
+!
+ip vrf mgmtVrf
+!
+ip routing
+ip multicast-routing 
+ip igmp snooping vlan 1 immediate-leave
+vtp mode transparent
+!
+power redundancy-mode redundant
+!
+!
+!
+!
+spanning-tree mode rapid-pvst
+spanning-tree extend system-id
+!
+vlan internal allocation policy ascending
+!
+vlan 10
+ name IFORMATION-SYSTEM
+!
+!
+!
+interface Port-channel1
+ switchport
+!
+interface FastEthernet1
+ ip vrf forwarding mgmtVrf
+ no ip address
+ speed auto
+ duplex auto
+!
+interface GigabitEthernet1/1
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/2
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/3
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/4
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/5
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/6
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/7
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/8
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/9
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/10
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/11
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/12
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/13
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/14
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/15
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/16
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/17
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/18
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/19
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/20
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/21
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/22
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/23
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/24
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/25
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/26
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/27
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/28
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/29
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/30
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/31
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/32
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/33
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/34
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/35
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/36
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/37
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/38
+ speed auto
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/39
+ speed 100
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/40
+ speed 100
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/41
+ speed 100
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/42
+ speed 100
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/43
+ speed 100
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/44
+ speed 100
+ duplex full
+ spanning-tree portfast
+!
+interface GigabitEthernet1/45
+ media-type rj45
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/46
+ media-type rj45
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/47
+ media-type rj45
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/48
+ switchport access vlan 10
+ switchport mode access
+ media-type rj45
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface TenGigabitEthernet1/49
+ channel-protocol pagp
+ channel-group 1 mode desirable
+!
+interface TenGigabitEthernet1/50
+ channel-protocol pagp
+ channel-group 1 mode desirable
+!
+interface TenGigabitEthernet1/51
+ channel-protocol pagp
+ channel-group 1 mode desirable
+!
+interface TenGigabitEthernet1/52
+ channel-protocol pagp
+ channel-group 1 mode desirable
+!
+interface Vlan1
+ ip address 10.133.26.231 255.255.248.0
+ ip pim dense-mode
+!
+interface Vlan10
+ ip address 100.100.100.100 255.255.255.0
+ ip pim sparse-mode
+!
+ip forward-protocol udp echo
+ip route 0.0.0.0 0.0.0.0 100.100.100.101
+ip http server
+ip pim rp-address 10.133.26.231
+!
+access-list 101 permit udp host 10.133.26.160 any eq echo
+!
+control-plane
+!
+!
+snmp-server community public RO
+!
+!
+line con 0
+ password 7 01070E05570E15
+ logging synchronous
+ login
+ stopbits 1
+line vty 0 4
+ password 7 071B294D420C0A
+ login
+line vty 5 15
+ password 7 120D0D161E0E1F
+ login
+!
+ntp clock-period 17179594
+ntp server 10.133.26.254
+ntp server 10.133.26.160
+end
diff --git a/master/opt/tftp/sw2.txt b/master/opt/tftp/sw2.txt
new file mode 100644 (file)
index 0000000..0e50bda
--- /dev/null
@@ -0,0 +1,357 @@
+macro name VERSION
+macro description 2.3 full-duplex
+@
+!
+version 12.2
+no service pad
+service timestamps debug datetime msec
+service timestamps log datetime msec
+service password-encryption
+service compress-config
+service sequence-numbers
+!
+hostname SWG2
+!
+boot-start-marker
+boot system flash bootflash:cat4500-ipbase-mz.122-54.SG1.bin
+boot system flash bootflash:cat4500e-ipbase-mz.122-54.SG1.bin
+boot-end-marker
+!
+enable secret 5 $1$OMTZ$xM5SrEPag4m7MGrV1u86/0
+!
+!
+no aaa new-model
+ip subnet-zero
+no ip domain-lookup
+!
+!
+ip vrf mgmtVrf
+!
+ip routing
+ip multicast-routing 
+ip igmp snooping vlan 1 immediate-leave
+vtp mode transparent
+!
+power redundancy-mode redundant
+!
+!
+!
+!
+spanning-tree mode rapid-pvst
+spanning-tree extend system-id
+!
+vlan internal allocation policy ascending
+!
+!
+!
+!
+!
+!
+interface Port-channel1
+ switchport
+!
+interface FastEthernet1
+ ip vrf forwarding mgmtVrf
+ no ip address
+ speed auto
+ duplex auto
+!
+interface GigabitEthernet1/1
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/2
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/3
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/4
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/5
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/6
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/7
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/8
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/9
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/10
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/11
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/12
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/13
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/14
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/15
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/16
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/17
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/18
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/19
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/20
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/21
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/22
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/23
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/24
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/25
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/26
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/27
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/28
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/29
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/30
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/31
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/32
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/33
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/34
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/35
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/36
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/37
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/38
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/39
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/40
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/41
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/42
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/43
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/44
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/45
+ media-type rj45
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/46
+ media-type rj45
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/47
+ media-type rj45
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface GigabitEthernet1/48
+!
+!
+ media-type rj45
+ speed auto
+ duplex auto
+ spanning-tree portfast
+!
+interface TenGigabitEthernet1/49
+ channel-protocol pagp
+ channel-group 1 mode desirable
+!
+interface TenGigabitEthernet1/50
+ channel-protocol pagp
+ channel-group 1 mode desirable
+!
+interface TenGigabitEthernet1/51
+ channel-protocol pagp
+ channel-group 1 mode desirable
+!
+interface TenGigabitEthernet1/52
+ channel-protocol pagp
+ channel-group 1 mode desirable
+!
+interface Vlan1
+ ip address 10.133.26.232 255.255.248.0
+ ip pim dense-mode
+!
+!
+!
+!
+!
+!
+!
+ip http server
+ip pim rp-address 10.133.26.232
+!
+!
+!
+control-plane
+!
+!
+snmp-server community public RO
+!
+!
+line con 0
+ password 7 01070E05570E15
+ logging synchronous
+ login
+ stopbits 1
+line vty 0 4
+ password 7 071B294D420C0A
+ login
+line vty 5 15
+ password 7 120D0D161E0E1F
+ login
+!
+ntp clock-period 17179594
+ntp server 10.133.26.254
+ntp server 10.133.26.160
+end
index 77dd38db8c3239e13bd7f001deb69a840ae33555..1fc0598fb9da259e5953fdd04f625a8fe1775fe7 100644 (file)
@@ -63,222 +63,222 @@ interface FastEthernet1
 !
 interface GigabitEthernet1/1
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/2
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/3
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/4
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/5
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/6
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/7
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/8
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/9
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/10
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/11
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/12
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/13
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/14
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/15
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/16
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/17
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/18
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/19
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/20
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/21
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/22
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/23
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/24
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/25
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/26
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/27
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/28
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/29
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/30
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/31
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/32
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/33
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/34
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/35
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/36
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/37
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/38
  speed auto
- duplex full
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/39
- speed 100
- duplex full
+ speed auto
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/40
- speed 100
- duplex full
+ speed auto
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/41
- speed 100
- duplex full
+ speed auto
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/42
- speed 100
- duplex full
+ speed auto
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/43
- speed 100
- duplex full
+ speed auto
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/44
- speed 100
- duplex full
+ speed auto
+ duplex auto
  spanning-tree portfast
 !
 interface GigabitEthernet1/45
@@ -300,8 +300,6 @@ interface GigabitEthernet1/47
  spanning-tree portfast
 !
 interface GigabitEthernet1/48
- switchport access vlan 10
- switchport mode access
  media-type rj45
  speed auto
  duplex auto
@@ -327,23 +325,13 @@ interface Vlan1
  ip address 10.133.26.231 255.255.255.0
  ip pim dense-mode
 !
-interface Vlan10
- ip address 100.100.100.100 255.255.255.0
- ip pim sparse-mode
-!
-ip forward-protocol udp echo
-ip route 0.0.0.0 0.0.0.0 100.100.100.101
 ip http server
 ip pim rp-address 10.133.26.231
 !
-access-list 101 permit udp host 10.133.26.160 any eq echo
 !
 control-plane
 !
 !
-snmp-server community public RO
-!
-!
 line con 0
  password 7 01070E05570E15
  logging synchronous
@@ -356,7 +344,8 @@ line vty 5 15
  password 7 120D0D161E0E1F
  login
 !
-ntp clock-period 17179594
-ntp server 10.133.26.254
+ntp clock-period 17179537
 ntp server 10.133.26.160
+ntp server 10.133.28.160
+ntp server 10.133.28.254
 end
index 1f0d9e06a54026ff24cb6f23f2336333deca1fe4..7dc952d41b3e3919ec4c9ddd5a90ef83406ac2e3 100644 (file)
@@ -1,6 +1,7 @@
-macro name VERSION
-macro description 2.3 full-duplex
-@
+
+!
+! Last configuration change at 08:13:53 UTC Wed Jun 12 2013
+! NVRAM config last updated at 08:21:36 UTC Wed Jun 12 2013
 !
 version 12.2
 no service pad
@@ -20,6 +21,10 @@ boot-end-marker
 enable secret 5 $1$OMTZ$xM5SrEPag4m7MGrV1u86/0
 !
 !
+macro name VERSION
+macro description 2.3
+@
+!
 no aaa new-model
 ip subnet-zero
 no ip domain-lookup
@@ -44,9 +49,6 @@ vlan internal allocation policy ascending
 !
 !
 !
-!
-!
-!
 interface Port-channel1
  switchport
 !
@@ -295,8 +297,6 @@ interface GigabitEthernet1/47
  spanning-tree portfast
 !
 interface GigabitEthernet1/48
-!
-!
  media-type rj45
  speed auto
  duplex auto
@@ -315,30 +315,18 @@ interface TenGigabitEthernet1/51
  channel-group 1 mode desirable
 !
 interface TenGigabitEthernet1/52
- channel-protocol pagp
- channel-group 1 mode desirable
 !
 interface Vlan1
  ip address 10.133.26.232 255.255.255.0
  ip pim dense-mode
 !
-!
-!
-!
-!
-!
-!
 ip http server
 ip pim rp-address 10.133.26.232
 !
 !
-!
 control-plane
 !
 !
-snmp-server community public RO
-!
-!
 line con 0
  password 7 01070E05570E15
  logging synchronous
@@ -351,7 +339,8 @@ line vty 5 15
  password 7 120D0D161E0E1F
  login
 !
-ntp clock-period 17179594
-ntp server 10.133.26.254
+ntp clock-period 17179537
 ntp server 10.133.26.160
+ntp server 10.133.28.160
+ntp server 10.133.28.254
 end
index e16444574b24446c1405e563b60aa482802688b2..c6356901ea45c245432b215060d198ef9af1be9f 100644 (file)
@@ -1,6 +1,7 @@
-macro name VERSION
-macro description 2.3
-@
+
+!
+! Last configuration change at 12:23:15 UTC Mon Sep 1 2014
+! NVRAM config last updated at 17:38:50 UTC Fri Jul 11 2014
 !
 version 12.2
 no service pad
@@ -20,6 +21,10 @@ boot-end-marker
 enable secret 5 $1$OMTZ$xM5SrEPag4m7MGrV1u86/0
 !
 !
+macro name VERSION
+macro description 2.3
+@
+!
 no aaa new-model
 ip subnet-zero
 no ip domain-lookup
diff --git a/master/root/bin/conf_switch_integration.tcl b/master/root/bin/conf_switch_integration.tcl
new file mode 100755 (executable)
index 0000000..b454138
--- /dev/null
@@ -0,0 +1,40 @@
+#!/usr/bin/expect
+
+set sub [lrange $argv 0 0]
+if { $sub == "" } { set sub "1" }
+spawn telnet sw1
+
+expect {
+        "Password:" { send "thales\r" }
+        incorrect { send_user "invalid password or account\n"; exit }
+        timeout { send_user "connection to $sub timed out\n"; exit }
+        eof { send_user "connection to host failed\n"; exit }
+}
+expect -exact ">" { send "enable\r" }
+expect "Password:" { send "thales\r" }
+
+expect -exact "#" { send "config terminal\r" }
+
+expect -exact "#" { send "vlan 192\r" }
+expect -exact "#" { send "name Integration\r" }
+expect -exact "#" { send "exit\r" }
+f
+expect -exact "#" { send "interface gigabitEthernet 1/47\r" }
+expect -exact "#" { send "switchport mode access\r" }
+expect -exact "#" { send "switchport access vlan 192\r" }
+expect -exact "#" { send "exit\r" }
+
+expect -exact "#" { send "interface vlan 192\r" }
+expect -exact "#" { send "ip address 192.168.$sub.231 255.255.255.0\r" }
+expect -exact "#" { send "ip pim dense-mode\r" }
+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.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" }
+
+expect -exact "#" { send "exit\r" }
+
diff --git a/master/root/bin/conf_swm_integration.tcl b/master/root/bin/conf_swm_integration.tcl
deleted file mode 100755 (executable)
index 8230cf9..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/expect
-
-set sub [lrange $argv 0 0]
-if { $sub == "" } { set sub "1" }
-spawn telnet swg
-
-expect {
-        "Password:" { send "thales\r" }
-        incorrect { send_user "invalid password or account\n"; exit }
-        timeout { send_user "connection to $sub timed out\n"; exit }
-        eof { send_user "connection to host failed\n"; exit }
-}
-expect -exact ">" { send "enable\r" }
-expect "Password:" { send "thales\r" }
-
-expect -exact "#" { send "config terminal\r" }
-
-expect -exact "#" { send "vlan 192\r" }
-expect -exact "#" { send "name Integration\r" }
-expect -exact "#" { send "exit\r" }
-
-expect -exact "#" { send "interface gigabitEthernet 1/47\r" }
-expect -exact "#" { send "switchport mode access\r" }
-expect -exact "#" { send "switchport access vlan 192\r" }
-expect -exact "#" { send "exit\r" }
-
-expect -exact "#" { send "interface vlan 192\r" }
-expect -exact "#" { send "ip address 192.168.$sub.231 255.255.255.0\r" }
-expect -exact "#" { send "ip pim dense-mode\r" }
-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.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" }
-
-expect -exact "#" { send "exit\r" }
-
index dbdb5e2156700950ce0760007ce751d0b89ff149..c0bcfd1bf780a1ee0159259a1a318a78f5a7f8a3 100755 (executable)
@@ -52,7 +52,7 @@ if [ $SWITCH -eq 1 ]; then
     mydir=$(dirname $0)
     [ "$mydir" ] || mydir=.
     [[ "$mydir" =~ ^/ ]] || mydir=$(cd $mydir; pwd)
-    $mydir/conf_swm_integration.tcl $SUB
+    $mydir/conf_switch_integration.tcl $SUB
 fi
 
 # Ajout des depots debian
diff --git a/simple-cdd/additional_scripts/change_configuration.sh b/simple-cdd/additional_scripts/change_configuration.sh
deleted file mode 100755 (executable)
index 918b64e..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/bin/bash
-# ============================================================================
-#
-# Copyright (C) THALES. All rights reserved
-# Author: Laurent Mazet
-#
-
-# Date : 10/10/2013
-#
-# 05/11/2013 : LMa configuration des timezone Zulu(GMT) et Paris
-#              Desactivation de pam pour ssh
-# ============================================================================
-
-# Switch configuration
-
-# TODO
-# *
-
-MODE_BW=""
-MODE_FIX=""
-MODE_HW=""
-MODE_NET=""
-MODE_TZ=""
-TARBALLS=""
-PROGNAME=$(basename $0)
-VER=1.0
-TMPLOG=/tmp/$PROGNAME-$$.log
-
-# help function
-
-function usage () {
-  echo "usage: $PROGNAME <mode>"
-  echo "  switch trc6500 mode"
-  echo "  avaliable modes are:"
-  echo "  - 8MHzMHF, 12MHzDF, 12MHzMDF, 30MHzMDF or 30MHzMHF"
-  echo "  - fix_ssh"
-  echo "  - hw_ibm or hw_supermicro"
-  echo "  - network"
-  echo "  - tz_zulu or tz_paris"
-  exit $@
-}
-
-# formating functions
-
-function title () { echo -e "\033[0;1m$*\033[0;0m"; }
-function pass () { echo -e "\033[1;32m$*\033[0;0m"; }
-function warn () { echo -e "\033[1;33m$*\033[0;0m"; }
-function fail () { echo -e "\033[1;31m$*\033[0;0m"; }
-
-# check command
-
-function check () {
-  echo -n "$@: "
-  $@ 2>$TMPLOG && pass OK || { fail KO; cat $TMPLOG; exit 1; }
-  rm -f $TMPLOG
-}
-
-# argument processing
-
-while [ $# -gt 0 ]; do
-    case "$1" in
-    -h) usage 0;;
-    8mhz|8MHz|12mhzdf|12MHzDF|12mhzmdf|12MHzMDF|30mhz|30MHz) MODE_BW="${1^^}";;
-    fix_ssh) MODE_FIX="$1";;
-    hw_ibm|hw_supermicro) MODE_HW="$1";;
-    network) MODE_NET="$1";;
-    tz_paris|tz_zulu) MODE_TZ="$1";;
-    *) usage 1;;
-    esac
-    shift
-done
-
-# main process
-
-action=""
-
-if [ "$MODE_BW" ]; then
-    title "updating /etc/hosts"
-    check rm -f /etc/hosts 
-    check ln -s /etc/hosts.${MODE_BW/MHZ/MHz} /etc/hosts
-    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
-    8MHzMHF)
-        #for ip in 0A851{A,C}A{1..2}; do check ln -T -f -s acq /opt/tftp/pxelinux.cfg/$ip; done
-        for ip in 0A851{A,C}A5; do      check ln -T -f -s rec /opt/tftp/pxelinux.cfg/$ip; done
-    ;;
-    12MHzDF) ;;
-    12MHzMDF) ;;
-    30MHzMDF) ;;
-    30MHzMHF)
-        for ip in 0A851{A,C}A{1..6}; do check ln -T -f -s acq /opt/tftp/pxelinux.cfg/$ip; done
-        for ip in 0A851{A,C}A9; do      check ln -T -f -s rec /opt/tftp/pxelinux.cfg/$ip; done
-    ;;
-    esac
-    action="done"
-fi
-
-if [ "$MODE_FIX" ]; then
-
-    case "$MODE_FIX" in
-    fix_ssh)
-        sed -i 's/^\(UsePAM\) yes/\1 no/' /etc/ssh/sshd_config
-        TARBALLS+=" root"
-
-        action="done"
-    esac
-
-fi
-
-if [ "$MODE_HW" ]; then
-
-    conf=/etc/default/shutdownallblades
-
-    title "change shutdownallblades"
-    if $(grep -sq '^#*REBOOT=' $conf); then
-        case "$MODE_HW" in
-        hw_ibm) check sed -i 's/^#*REBOOT=.*$/#REBOOT=yes/' $conf;;
-        hw_supermicro) check sed -i 's/^#*REBOOT=.*$/REBOOT=yes/' $conf;;
-        esac
-    else
-        case "$MODE_HW" in
-        hw_ibm) check sed -i '$a#REBOOT=yes' $conf;;
-        hw_supermicro) check sed -i '$aREBOOT=yes' $conf;;
-        esac
-    fi
-
-    action="done"
-fi
-
-if [ "$MODE_NET" ]; then
-
-    conf=/etc/dhcp/dhcpd.conf
-
-    title "update network configuraton"
-    if $(grep -sq 'trc[0-9]*_1' $conf); then
-        check sed -i 's/\(host.*trc[0-9][0-9]\)\([^_]\)/\1-rf\2/;s/\(host.*trc[0-9][0-9]\)_1/\1/' $conf
-    fi
-    TARBALLS+=" root"
-
-    action="done"
-fi
-
-if [ "$MODE_TZ" ]; then
-    case "$MODE_TZ" in
-    tz_paris) TZ="Europe/Paris";;
-    tz_zulu) TZ="Etc/Zulu";;
-    *) TZ="";;
-    esac
-
-    if [ "$TZ" ]; then
-        echo $TZ > /etc/timezone
-        TARBALLS+=" root"
-
-        action="done"
-    fi
-fi
-
-# last check
-[ "$action" ] || { echo "no mode specified"; exit 1; }
-
-[ "$TARBALLS" ] && make -f /opt/cluster/Makefile $TARBALLS
-
-# vim:set tabstop=4 expandtab shiftwidth=4:
diff --git a/simple-cdd/additional_scripts/check_network.sh b/simple-cdd/additional_scripts/check_network.sh
deleted file mode 100755 (executable)
index 5c17bf2..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/bash
-#
-# ============================================================================
-#
-# Copyright (C) THALES. All rights reserved
-# Author: Alexandre Cazalis
-# 
-# Gestion attente lames esclaves au boot (ping,ssh)
-#
-# 2013-11-20 : V1.2 LMa 
-#   - Ajout de la personalisation de la commande a executer
-#     par defaut (uptime). Ajout attente montage nfs avant demarrage
-# 2014-05-28 : V1.3 LMa
-#   - Ajout d'un mode foreground pour ne tenter qu'une fois chaque commande
-#   - Ajout d'une commande pour exclude la lame maitre
-#
-# 2014-10-28 : Change owner
-# ============================================================================
-
-# TODO
-# *
-
-CMD="uptime"
-MODE="iter"
-PROGNAME=$(basename $0)
-VER=1.3
-EXCLUDE="___"
-
-function usage () {
-    echo "usage: $PROGNAME [-c command] [-h] [-i] [-o] [-t seconds] [-v] [-w] [-x] host1 host2..."
-    echo "   -c: set command (default '$CMD')"
-    echo "   -h: help message"
-    echo "   -i: infinity loop mode [default]"
-    echo "   -o: only try ones"
-    echo "   -t: timeout"
-    echo "   -v: version message"
-    echo "   -w: wait mode"
-    echo "   -x: avoid master blade"
-    exit $@
-}
-
-while [ $# -gt 0 ]; do
-    case "$1" in
-    -c) shift; CMD=$1;;
-    -h) usage 0;;
-    -i) MODE="iter";;
-    -o) MODE="ones";;
-    -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";;
-    *) list+=" "$1;;
-    esac
-    shift
-done
-
-# list
-[ "$list" ] || list=$(awk '{sub(/#.*/, "")} /trc[0-9][0-9]/ && ! /-rf/ {print $2}' /etc/hosts)
-list=$(echo $list" "|sed s/$EXCLUDE//)
-
-# timeout
-if [ "$TIMEOUT" ]; then
-    trap "echo 'timeout expired (${TIMEOUT}s)'; exit 0;" SIGVTALRM
-    ( sleep $TIMEOUT; kill -SIGVTALRM $$ 2>/dev/null; [ $? -eq 0 ] && rc=1 || rc=0; exit $rc) &
-fi
-trap "exit 0;" SIGINT
-
-# main loop
-while true; do
-    for host in $list; do
-       stat=0
-       echo -n ${host}:" "
-       ping -c 1 $host >&/dev/null && { ssh -t -o ConnectTimeout=1 root@$host "$CMD" 2>/dev/null && stat=1 || echo "soon..."; } || echo
-       [ "$MODE" = "wait" -a $stat -eq 1 ] && list=${list/$host }
-    done
-    [ "$MODE" = "ones" ] && break;
-    [[ "$list" =~ [a-zA-Z0-9_-] ]] && sleep 1 || break;
-done
diff --git a/simple-cdd/additional_scripts/configure_fe306.sh b/simple-cdd/additional_scripts/configure_fe306.sh
deleted file mode 100755 (executable)
index d0b685d..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/bin/bash
-
-# parameters
-#
-# ============================================================================
-#
-# Copyright (C) THALES. All rights reserved
-# Author: Laurent Mazet
-# 
-# 2013-11-10 V1.0 : Creation 
-#
-# 2013-11-20 V1.1 :  L.Mazet ajout possibilite de configuration du switch
-# 
-# ============================================================================
-
-DRY=
-ID=
-IP=192.168.0.1
-#TRC6500_SCRIPT_DIR=/opt/trc6500/script
-TRC6500_SCRIPT_DIR=$(dirname $0)
-
-# help function
-
-function usage () {
-  echo "usage: $PROGNAME [-a] [-d] [-h] [-i <id>]"
-  echo " -a: configure all boards"
-  echo " -d: dry mode"
-  echo " -h: help message"
-  echo " -i: board id (from 1 to 5)"
-  exit $@
-  }
-
-# formating functions
-
-function title () { echo -e "\033[0;1m$*\033[0;0m"; }
-function pass () { echo -e "\033[1;32m$*\033[0;0m"; }
-function warn () { echo -e "\033[1;33m$*\033[0;0m"; }
-function fail () { echo -e "\033[1;31m$*\033[0;0m"; }
-
-# configuration values
-
-# argument processing
-
-while [ $# -gt 0 ]; do
-    case "$1" in
-    -a) ID=all;;
-    -d) DRY=yes;;
-    -h) usage 0;;
-    -i) shift; ID=$1;;
-    *) usage 1;;
-    esac
-    shift
-done
-
-# switch port configure function ()
-
-function sw_configure () {
-    case "$1" in 
-    off) CMD="-c 'configure terminal' -c 'interface range g1/39-44' -c 'shutdown' -c end -c 'clear mac address-table dynamic' -c 'clear ip arp inspection log' -c exit";;
-    on) CMD="-c 'configure terminal' -c 'interface range g1/39-44' -c 'no shutdown' -c end -c exit";;
-    1) CMD="-c 'configure terminal' -c 'interface g1/39' -c 'no shutdown' -c end -c exit";;
-    2) CMD="-c 'configure terminal' -c 'interface g1/40' -c 'no shutdown' -c end -c exit";;
-    3) CMD="-c 'configure terminal' -c 'interface g1/41' -c 'no shutdown' -c end -c exit";;
-    4) CMD="-c 'configure terminal' -c 'interface g1/42' -c 'no shutdown' -c end -c exit";;
-    5) CMD="-c 'configure terminal' -c 'interface g1/43' -c 'no shutdown' -c end -c exit";;
-    6) CMD="-c 'configure terminal' -c 'interface g1/44' -c 'no shutdown' -c end -c exit";;
-    esac
-
-    if [ "$DRY" = "yes" ]; then
-        echo connect_switch.tcl -h swm $CMD
-    else
-               LOG=/tmp/$PROGNAME-$$.log
-               echo -n "sw_configure $1: "
-        eval $TRC6500_SCRIPT_DIR/connect_switch.tcl $CMD swm >&$LOG && pass OK || { fail KO; cat $LOG; exit 1; }
-               rm -f $LOG
-    fi
-}
-
-case "$ID" in
-1) CH1=0; CH2=1; CLOCKREF=external;;
-2) CH1=2; CH2=3; CLOCKREF=internal;;
-3) CH1=4; CH2=5; CLOCKREF=internal;;
-4) CH1=6; CH2=7; CLOCKREF=internal;;
-5) CH1=8; CH2=9; CLOCKREF=internal;;
-6) CH1=10; CH2=11; CLOCKREF=internal;;
-all)
-    for id in $(seq 1 5); do
-        title "switch off all fe306 ports"
-        sw_configure off
-        title "switch on port for fe306 $id"
-        sw_configure $id
-        title "configure fe306 $id"
-        if [ "$DRY" = "yes" ]; then
-            echo $(basename $0) -i $id
-        else
-            { $0 -i $id | mawk -W interactive '{print "  " $0}'; } && pass OK || { fail KO; exit 1; }
-        fi
-    done
-    title "switch on all fe306 ports"
-    sw_configure on
-    exit 0
-    ;;
-*) echo "unknown fe306 id ($ID)"; exit 1;;
-esac
-
-# configure function
-
-function configure () {
-    echo -n "$1 [$2 <= $3]: "
-    if [ "$DRY" = "yes" ]; then
-       echo wget -q -O - http://$IP/$1?$2=$3
-    else
-        wget -q -O - http://$IP/$1?$2=$3 >/dev/null && pass OK || { fail KO; exit 1; }
-    fi
-}
-
-# setup local address
-
-title "setup local address"
-cmd="ifconfig eth1:1 192.168.0.2 netmask 255.255.255.0"
-[ "$DRY" = "yes" ] && echo $cmd || { echo -n $cmd" "; eval $cmd && pass OK || { fail KO; exit 1; }; }
-
-# check if fe306 is connected
-
-#title "check presence of $IP"
-#cmd="ping -c 1 -w 10 -W 10 $IP"
-#[ "$DRY" = "yes" ] && echo $cmd || { echo -n $cmd" "; eval $cmd >&/dev/null && pass OK || { warn KO; ifconfig eth1:1 down; exit 0; }; }
-
-# get serial number
-
-[ "$DRY" = "yes" ] && SN=00 || \
-    SN=$(wget -q -O - http://$IP/versions_en.html | mawk '/MODULE/ { module = 1 } /Serial Number/ { if (module) { printf "%02X", $4; exit 0 } }')
-
-[[ "$SN" =~ ^[0-9A-F][0-9A-F]$ ]] || { echo "unknown serial number ($SN)"; exit 1; }
-
-# configure ip
-
-title "configure ip"
-
-configure ModeServ.cmd serv_mode MANUAL
-configure MacServ.cmd serv_mac 00.80.EE.00.$SN.01
-configure IpServ.cmd serv_ip 10.133.26.1${ID}0
-configure MaskServ.cmd serv_mask 255.255.255.0
-
-for i in $(seq 1 8); do
-    configure MacProd$i.cmd prod_mac$i 00.80.EE.00.$SN.0$((i+1))
-    configure IpProd$i.cmd prod_ip$i 10.133.26.1$ID$i
-done
-
-configure IpMulticast.cmd multicast_ip 238.0.0.0
-configure RxMulticast.cmd multicast_rx 62002
-configure TxMulticast.cmd multicast_tx 62004
-configure TTL.cmd ttl 10
-
-# configure gps
-
-title "configure gps"
-
-configure GpsRate.cmd gps_rate 19200
-configure GpsChar.cmd gps_char 8
-configure GpsStop.cmd gps_stop 1
-configure GpsParity.cmd gps_parity no
-
-# configure miscellaneous
-
-title "configure miscellaneous"
-configure BoardNum.cmd board_num $ID
-configure RackNum.cmd rack_num 1
-configure Chan1Num.cmd channel1_num $CH1
-configure Chan2Num.cmd channel2_num $CH2
-
-configure FpgaLoc.cmd fpga_loc FLASH
-configure Clk10Mhz.cmd clk_10 $CLOCKREF
-configure PllConfig.cmd pll_cfg pll_cfg_02
-
-# unset local address
-
-title "unset local address"
-cmd="ifconfig eth1:1 down"
-[ "$DRY" = "yes" ] && echo $cmd || { echo -n $cmd" "; eval $cmd && pass OK || { fail KO; exit 1; }; }
-
-# vim:set tabstop=4 shiftwidth=4 softtabstop=4:
diff --git a/simple-cdd/additional_scripts/configure_matrix.tcl b/simple-cdd/additional_scripts/configure_matrix.tcl
deleted file mode 100755 (executable)
index 540c3d1..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/expect
-
-# ============================================================================
-#
-# Copyright (C) THALES. All rights reserved
-#
-# * V1.0 Laurent Mazet 29/04/2013 
-#   creation script de configuration de la matrice par ligne de commande
-# ============================================================================
-
-spawn /opt/trc6500/tools/matrix_tool
-
-set timeout 3
-
-exec ifconfig eth1:0 192.168.1.1 netmask 255.255.255.0
-
-proc cleanexit {rc} {
-    exec ifconfig eth1:0 down
-    exit $rc
-}
-
-expect {
-    "taper la commande choisie" { send "0\r" }
-    timeout { send_user "connection to $host timed out\n"; cleanexit 1 }
-    eof { send_user "connection to host failed\n"; cleanexit 1 }
-}
-expect {
-    "timeout detected" { send_user "can't connect on defaut ip\n"; cleanexit 1 }
-    "taper la commande choisie" { send "10\r" }
-}
-
-expect "nouvelle adresse" { send "010.133.026.253\r" }
-
-expect "taper la commande choisie" { send "12\r" }
-
-expect "taper la commande choisie" { send "14\r" }
-
-cleanexit 0
-# vim:set tabstop=4 expandtab shiftwidth=4:
diff --git a/simple-cdd/additional_scripts/configure_switch.tcl b/simple-cdd/additional_scripts/configure_switch.tcl
deleted file mode 100755 (executable)
index 7782906..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/expect
-
-# ============================================================================
-#
-# Copyright (C) THALES. All rights reserved
-# Author: Laurent Mazet
-# 
-# Script de configuration du switchs
-#
-# 2013-10-10 V1.0 : Creation
-#
-# ============================================================================
-
-set host [lrange $argv 0 0]
-if { $host == "" } {
-    puts "usage: configure_switch.tcl \[swg1|swg2|swm\]"
-    exit 1
-}
-
-set tftpserver ""
-if { $host == "swg1" } { set tftpserver "10.133.26.160" }
-if { $host == "swg2" } { set tftpserver "10.133.26.160" }
-if { $host == "swm" } { set tftpserver "10.133.28.160" }
-if { $host == "sw1" } { set tftpserver "10.133.26.160" }
-if { $host == "sw2" } { set tftpserver "10.133.26.160" }
-if { $tftpserver == "" } { puts "unknown switch '$host'"; exit }
-
-set date [ exec date +%Y%m%d-%H:%m:%S ]
-set backup "$host-$date.txt"
-
-spawn telnet $host
-
-set timeout 30
-
-expect {
-    "Password:" { send "thales\r" }
-    incorrect { send_user "invalid password or account\n"; exit 1 }
-    timeout { send_user "connection to $host timed out\n"; exit 1 }
-    eof { send_user "connection to host failed\n"; exit 1 }
-}
-expect -exact ">" { send "enable\r" }
-expect "Password:" { send "thales\r" }
-expect "#" { send "copy running-config tftp://$tftpserver/$backup\r" }
-expect -exact "?" { send "$tftpserver\r" }
-expect -exact "?" { send "$backup\r" }
-expect "#" { send "copy tftp://$tftpserver/$host.txt startup-config\r" }
-expect -exact "?" { send "startup-config\r" }
-#expect "#" { send_user " << reload or exit ? >> "; interact }
-expect "#" { send "reload\r" }
-
-exit 0
-# vim:set tabstop=4 expandtab shiftwidth=4:
diff --git a/simple-cdd/additional_scripts/configure_switch_bootstrap.tcl b/simple-cdd/additional_scripts/configure_switch_bootstrap.tcl
deleted file mode 100755 (executable)
index 42fb513..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/expect
-
-set host [lrange $argv 0 0]
-if { $host == "" } {
-    puts "usage: configure_switch_bootstrap.tcl \[swg1|swg2|swm\]"
-    exit 1
-}
-
-set ipaddress ""
-if { $host == "swg1" } { set ipaddress "10.133.26.231" }
-if { $host == "swg2" } { set ipaddress "10.133.26.232" }
-if { $host == "swm" } { set ipaddress "10.133.28.231" }
-if { $host == "sw1" } { set ipaddress "10.133.26.231" }
-if { $host == "sw2" } { set ipaddress "10.133.26.232" }
-if { $ipaddress == "" } { puts "unknown switch '$host'""; exit 1 }
-
-spawn screen -c . /dev/ttyUSB0
-
-set timeout 5
-
-set state 0
-while { $state != 1 } {
-    expect {
-        timeout { send "\r" }
-        -exact ">" { send "enable\r" }
-        "#" { set state 1 }
-        "Password:" { send "thales\r" }
-        eof { send_user "connection to host failed\n"; exit 1 }
-    }
-}
-
-send "configure terminal\r"
-expect "#" { send "interface vlan 1\r" }
-expect "#" { send "ip address $ipaddress 255.255.255.0\r" }
-expect "#" { send "exit\r" }
-expect "#" { send "line vty 0 4\r" }
-expect "#" { send "password thales\r" }
-expect "#" { send "enable password thales\r" }
-expect "#" { send "end\r" }
-
-# quit switch connection
-expect "#" { send "exit\r" }
-
-# to quit screen we need to send C-a \.
-send "\001\\"
-expect "kill all your windows" { send "y\r" }
-
-exit 0
-# vim:set tabstop=4 expandtab shiftwidth=4:
diff --git a/simple-cdd/additional_scripts/connect_switch.tcl b/simple-cdd/additional_scripts/connect_switch.tcl
deleted file mode 100755 (executable)
index 5f2299e..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/expect
-
-# ============================================================================
-#
-# Copyright (C) THALES. All rights reserved
-# Author: Laurent Mazet
-# 
-# Script de connection au switchs
-#
-# 2013-10-10 V1.0 : Creation
-#
-# 2014-03-05 V1.1 : LMa ajout de passage de commande CISCO en parametre
-#
-# 2014-06-10 V1.2 : LMa ajout d'un fichier de commandes
-# 
-# ============================================================================
-
-# default value
-set adminpassword "thales"
-set cmd {}
-set host ""
-set loginpassword "thales"
-set prompt "SW*"
-
-proc usage {rc} {
-    puts "usage: connect_switch.tcl \[host\] \[-a adminpassword\] \[-c command\] \[-f file\] \[-h\] \[-l loginpassword\] \[-p prompt\]"
-    exit $rc
-}
-
-# process argument
-set action ""
-for {set i 0} {$i < [llength $argv]} {incr i} {
-    set arg [lindex $argv $i]
-    switch $arg {
-        -a { set action "-adminpassword" }
-        -c { set action "-cmd" }
-        -f { set action "-file" }
-        -h { usage 0 }
-        -l { set action "-loginpassword" }
-        -p { set action "-prompt" }
-        default {
-            switch $action {
-                -adminpassword { set adminpassword $arg }
-                -cmd { set cmd [lappend cmd $arg] }
-                -file {
-                    if {[file isfile $arg] == 1} then {
-                        set f [open $arg "r"]
-                        set data [read $f]
-                        close $f
-                        foreach line [split $data "\n"] {
-                            set cmd [lappend cmd $line]
-                        }
-                    } else {
-                        puts "can't open file '$arg'"
-                        exit 1
-                    }
-                }
-                -loginpassword { set loginpassword $arg }
-                -prompt { set prompt $arg }
-                default { set host $arg }
-            }
-        set action ""
-        }
-    }
-}
-if {$action != ""} {
-    puts "missing arguments"
-    exit 1
-}
-if { $host == "" } {
-    usage 1
-}
-
-# start connection
-spawn telnet $host
-
-# login password
-expect {
-    "Password:" { send "$loginpassword\r" }
-    timeout { send_user "connection to host failed\n"; exit 1 }
-    eof { send_user "connection to host failed\n"; exit 1 }
-}
-
-# admin password
-expect {
-    "$prompt>" { send "enable\r" }
-    timeout { send_user "connection to host failed\n"; exit 1 }
-    "Password:" { send_user "invalid login password\n"; exit 1 }
-}
-expect "Password:" { send "$adminpassword\r" }
-expect {
-    "$prompt#" { send "\r" }
-    "Password:" { send_user "invalid admin password\n"; exit 1 }
-}
-
-# commands or interactive mode
-if {[llength $cmd] == 0 } {
-    expect "$prompt#" { interact }
-} else {
-    expect "$prompt#" { send "terminal length 0\r" }
-    for {set i 0} {$i < [llength $cmd]} {incr i} {
-        expect {
-            "$prompt#" { send "[lindex $cmd $i]\r" }
-            "confirm" { send "\r"; continue }
-        }
-    }
-    expect {
-        "confirm" { send "\r"; expect "$prompt" { send "exit\r" } }
-        "$prompt" { send "exit\r" }
-    }
-    send_user "\n"
-}
-
-exit 0
-# vim:set tabstop=4 shiftwidth=4 softtabstop=4:
diff --git a/simple-cdd/additional_scripts/flash_fe306.sh b/simple-cdd/additional_scripts/flash_fe306.sh
deleted file mode 100755 (executable)
index b728862..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-
-# parameters
-#
-# ============================================================================
-#
-# Copyright (C) THALES. All rights reserved
-# Author: Laurent Mazet
-# 
-# 2014-10-06 V1.0 : Creation 
-# 
-# ============================================================================
-
-DRY=
-FIRMWARE=/opt/trc6500/config/code_metier/libHwCtrl/Bitstream
-LIST="application.out production.bin ts12_fp_pano.bin ts22_fp_pano.bin firmware.out"
-HOST=
-#TRC6500_SCRIPT_DIR=/opt/trc6500/script
-TRC6500_SCRIPT_DIR=$(dirname $0)
-
-# help function
-
-function usage () {
-  echo "usage: $PROGNAME [-d] [-f dir] [-h] [-i host] [-l list]"
-  echo " -d: dry mode"
-  echo " -f: firmware directory ($FIRMWARE)"
-  echo " -h: help message"
-  echo " -i: board hostname (or ip)"
-  echo " -l: list of firmware ($LIST)"
-  exit $@
-  }
-
-# formating functions
-
-function title () { echo -e "\033[0;1m$*\033[0;0m"; }
-function pass () { echo -e "\033[1;32m$*\033[0;0m"; }
-function warn () { echo -e "\033[1;33m$*\033[0;0m"; }
-function fail () { echo -e "\033[1;31m$*\033[0;0m"; }
-
-# argument processing
-
-while [ $# -gt 0 ]; do
-    case "$1" in
-    -d) DRY=yes;;
-    -f) shift; FIRMWARE=$1;;
-    -h) usage 0;;
-    -i) shift; HOST=$1;;
-    -l) shift; LIST=$1;;
-    *) usage 1;;
-    esac
-    shift
-done
-
-# check host
-
-[ "$HOST" ] || ping -c 1 $HOST >&/dev/null || \
-    { fail "Can't connect '$HOST'"; exit 1; }
-
-# check firmware
-
-for f in $LIST; do
-    [ -f $FIRMWARE/$f ] || { fail "Can't find '$FIRMWARE/$f'"; exit 1; }
-done
-
-# check mode
-
-protect=""
-[ "$DRY" = yes ] && protect="!echo"
-
-# flash firmware
-
-title "flash fe306 '$HOST'"
-
-ftp -n <<EOF
-open $HOST
-quote USER none
-quote PASS none
-binary
-cd flash
-$(for f in $LIST; do echo "$protect send $FIRMWARE/$f"; done)
-bye
-EOF
-
-# vim:set tabstop=4 shiftwidth=4 softtabstop=4:
diff --git a/simple-cdd/additional_scripts/set_mediatray.tcl b/simple-cdd/additional_scripts/set_mediatray.tcl
deleted file mode 100755 (executable)
index 02f76b2..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/expect
-
-# ============================================================================
-#
-# Copyright (C) THALES. All rights reserved
-# Author: Laurent Mazet
-# 
-# Script de connection au switchs
-#
-# 2014-10-06 V1.0 : Creation
-#
-# ============================================================================
-
-# default value
-set blade {0}
-set host ""
-set login "admin"
-set password "thalescom02"
-set prompt "system>"
-
-proc usage {script_name rc} {
-    puts "usage: [exec basename $script_name] \[host\] \[-b blade\] \[-h\] \[-l login\] \[-p password\] \[-x prompt\]"
-    exit $rc
-}
-
-# process argument
-set action ""
-for {set i 0} {$i < [llength $argv]} {incr i} {
-    set arg [lindex $argv $i]
-    switch $arg {
-        -b { set action "-blade" }
-        -h { usage $argv0 0 }
-        -l { set action "-login" }
-        -p { set action "-password" }
-        -x { set action "-prompt" }
-        default {
-            switch $action {
-                -blade { set blade $arg }
-                -login { set login $arg }
-                -password { set password $arg }
-                -prompt { set prompt $arg }
-                default { set host $arg }
-            }
-        set action ""
-        }
-    }
-}
-if {$action != ""} {
-    puts "missing arguments"
-    exit 1
-}
-if { $host == "" } {
-    usage $argv0 1
-}
-
-# start connection
-spawn telnet $host
-
-# login
-expect {
-    "username:" { send "$login\r" }
-    timeout { send_user "connection to host failed\n"; exit 1 }
-    eof { send_user "connection to host failed\n"; exit 1 }
-}
-
-
-# password
-expect {
-    "password:" { send "$password\r" }
-    timeout { send_user "connection to host failed\n"; exit 1 }
-    eof { send_user "connection to host failed\n"; exit 1 }
-}
-
-expect {
-    "$prompt" { send "mt -b $blade\r" }
-    "username:" { send_user "connection to host failed\n"; exit 1 }
-}
-
-expect {
-    "OK" { send "exit\r" }
-    "$prompt" { send_user "error\n"; exit 1 }
-}
-
-send_user "\n"
-exit 0
-# vim:set tabstop=4 shiftwidth=4 softtabstop=4:
diff --git a/simple-cdd/deb_build/Makefile b/simple-cdd/deb_build/Makefile
deleted file mode 100644 (file)
index f2ed7bb..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-# -*- Makefile -*-
-
-DIR = master-files/
-
-CONFIGDIR = debian/
-
-FILES = $(shell cd $(DIR); find etc/ -type f)
-
-TARGET = $(MODULE)_$(VERSION)_$(ARCH).deb
-
-OBJECTS = deb/DEBIAN/preinst \
-         deb/DEBIAN/postrm \
-         deb/DEBIAN/postinst \
-         deb/opt/trc6500/script
-
-SHELL=/bin/bash
-MODULE = trc6500-master-files
-ARCH = all
-
-.DEFAULT: all
-.PHONY: clean deb all
-
-VERSION = $(shell awk '/^$(MODULE)/ { gsub(/[()]/, ""); print $$2; exit }' debian/debian-changelog)
-
-
-all: $(TARGET) deb
-       
-clean:
-       rm -rf deb $(OBJECTS) $(TARGETS)
-
-deb:
-       rm -rf deb
-       mkdir --parent deb/etc/webconfig/ deb/etc/default/ deb/DEBIAN
-
-deb/DEBIAN/preinst: debian/debian-preinst deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST)
-       rm -f $@
-       cat $< > $@~
-       for f in $(FILES); do echo '[ -f "/'$$f'" ] && dpkg-divert --add /'$$f; done >>$@~
-       echo "exit 0" >>$@~
-       chmod +x $@~
-       mv $@~ $@
-
-deb/DEBIAN/postrm: debian/debian-postrm deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST)
-       rm -f $@
-       cat $< > $@~
-       for f in $(FILES); do echo '[ -f "/'$$f'" ] && dpkg-divert --remove /'$$f; done >>$@~
-       echo "exit 0" >>$@~
-       chmod +x $@~
-       mv $@~ $@
-
-deb/DEBIAN/postinst: debian/debian-postinst deb
-       cp $< $@
-
-deb/opt/trc6500/script: ../additional_scripts deb
-       mkdir -p deb/opt/trc6500/script/
-       cp ../additional_scripts/* deb/opt/trc6500/script/
-
-$(TARGET): deb $(OBJECTS)
-       sed s/@@version@@/$(VERSION)/ debian/debian-control > deb/DEBIAN/control
-       mkdir -p deb/usr/share/doc/$(MODULE)
-       cp debian/debian-changelog deb/usr/share/doc/$(MODULE)/changelog
-       cp -r $(DIR)/* deb/
-       fakeroot dpkg --build deb
-       mv deb.deb $@
diff --git a/simple-cdd/deb_build/debian-binary b/simple-cdd/deb_build/debian-binary
deleted file mode 100644 (file)
index cd5ac03..0000000
+++ /dev/null
@@ -1 +0,0 @@
-2.0
diff --git a/simple-cdd/deb_build/debian/debian-changelog b/simple-cdd/deb_build/debian/debian-changelog
deleted file mode 100644 (file)
index 72d5aea..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-trc6500-master-files (7.8.1-1) unstable; urgency=low
-
-  * .deb packaging
-
- -- Olivier Leobal <olivier.leobal@thalesgroup.com>  Wed, 10 Jun 2015 14:16:08 +0200
-
-trc6500-master-files (7.8.0-1) unstable; urgency=low
-
-  * initial release (#1337)
-  * added scripts from lgcore
-  * getswitchtemp fix
-  * inetd removal
-
- -- Olivier Leobal <olivier.leobal@thalesgroup.com>  Wed, 10 Jun 2015 12:46:08 +0200
diff --git a/simple-cdd/deb_build/debian/debian-control b/simple-cdd/deb_build/debian/debian-control
deleted file mode 100644 (file)
index d8fef16..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Section: TRC6500
-Priority: important
-Version: @@version@@
-Architecture: all
-Package: trc6500-master-files
-Maintainer: Olivier Léobal <olivier.leobal@thalesgroup.com>
-Description: files for the TRC6500's computing cluster's operating system
- Contains mainly scripts and configuration files
-Homepage: http://www.thalesgroup.com/
diff --git a/simple-cdd/deb_build/debian/debian-postinst b/simple-cdd/deb_build/debian/debian-postinst
deleted file mode 100755 (executable)
index e26e741..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-
-# since equivs can't handle symlinks, here we are doing them by hand. As of writing this script (2015-05-29), there are 11 symlinks to take care of.
-
-# I don't know why things were that way before, but I'm told to set them that way again.
-echo 'Moving things around..'
-[ -d /home ] && mv /home /var/media/backup
-mkdir -p /var/media/backup/dump/{core,dump_delay_line,dump_track_base,log,prod,rec,trace}
-ln -s /var/media/backup/dump /dump
-ln -s /var/media/backup/home /home
-ln -s /var/media/backup/rec /rec
-ln -s /var/media/prod /var/media/backup/prod
-ln -s /etc/hosts.30MHzMDF /etc/hosts.30MHz
-ln -s /etc/hosts.8MHzMHF /etc/hosts.8MHz
-ln -s /usr/lib/syslinux/menu.c32 /opt/tftp/menu.c32
-ln -s /initrd.img /opt/tftp/initrd.img 
-ln -s /vmlinuz /opt/tftp/vmlinuz
-ln -s /usr/lib/syslinux/pxelinux.0 /opt/tftp/pxelinux.0
-ln -s /usr/lib/syslinux/memdisk /opt/tftp/memdisk
-echo 'Things moved.'
-
-# now enable all the scripts and such..
-echo 'Enabling on-startup scripts..'
-update-rc.d waitswitches defaults
-update-rc.d waitswitches enable
-update-rc.d etherwake defaults
-update-rc.d etherwake enable
-update-rc.d ipmiwake defaults
-update-rc.d ipmiwake enable
-update-rc.d wakeonlan defaults
-update-rc.d wakeonlan enable
-update-rc.d waitslaves defaults
-update-rc.d shutdownallblades defaults
-update-rc.d checkudevrules enable
-update-rc.d checkudevrules defaults
-echo 'Scripts enabled.'
-
-# and these other things too
-echo 'Finalizing configuration..'
-chown webconfig /etc/webconfig/alias.csv /etc/dhcp/dhcpd.conf*
-cp /etc/dhcp/dhcpd.conf.blank /etc/dhcp/dhcpd.conf
-chsh -s /usr/bin/pdmenu trc6500
-
-# from that sync_master.sh script.. Apparently there from Git shenanigans.
-chmod go-rwx /root/.ssh/id_rsa
-chmod go-rwx /opt/cluster/slave/root/.ssh
-chmod go-rwx /opt/cluster/slave/root/.ssh/id_rsa
-chmod a+rwx  /opt/tftp
-
-echo "">/var/log/atftpd.log
-chown nobody /var/log/atftpd.log
-
-update-initramfs -u
-
-cd /opt/cluster
-# now this file is locked away during install and replaced by a dummy. So we put a duplicate of this in a script executed on first boot after the install.
-# this is still here because it is planned we install/update this on established systems
-[ -f /sbin/start-stop-daemon.REAL ] || make all
-echo 'Finalized.'
-
-
diff --git a/simple-cdd/deb_build/debian/debian-postrm b/simple-cdd/deb_build/debian/debian-postrm
deleted file mode 100755 (executable)
index b97cb85..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-# list of diverts
diff --git a/simple-cdd/deb_build/debian/debian-preinst b/simple-cdd/deb_build/debian/debian-preinst
deleted file mode 100755 (executable)
index 7d1b6f3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-# list of diverts
diff --git a/simple-cdd/deb_build/master-files b/simple-cdd/deb_build/master-files
deleted file mode 120000 (symlink)
index eeb5f92..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../master/
\ No newline at end of file
diff --git a/simple-cdd/deb_build/readme b/simple-cdd/deb_build/readme
deleted file mode 100644 (file)
index 1b2e764..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-This puts things and thongs together to get us a makeshift Debian package. Copied from the same in lgcore6500(git repo)/dev/services/webconfig. Use with caution.
-
-
-** How to use
-
-edit things in /debian, notably the control file
-
-edit the Makefile to include the files you want to include (ie, here, the master-files directory which is simply the "master" folder in the debian6500 git repo, without the symlinks)
-
-pray "make" will do the job
-
-
-** What files we need
-
-Everything in the debian/ folder, ie control, preinst, postinst and the like.
-Obviously they are not required for a _debian_ package but for _ours_ they are
-
-the ../additional_scripts folder. Please, please don't trash it away. These scripts come from the lgcore6500 repository, that's why they're no symlinks like for the master-files thing.
-
-
-** About versioning
-
-Let us say our package is version 7.8.1-1. This means it's the version 1 of the customization archive for Debian 7.8, hence 7.8.1. The -1 suffix is a package version, in theory it doesn't affect the contents, only how they're packaged.
-
-That's for version number. Remember also to list your changes in the debian-changelog in the debian/ folder ; it'll be useful to check the OS version on systems once it's installed.
diff --git a/simple-cdd/local_packages/dce_1.10.2-1_all.deb b/simple-cdd/local_packages/dce_1.10.2-1_all.deb
deleted file mode 100644 (file)
index bf5bfe3..0000000
Binary files a/simple-cdd/local_packages/dce_1.10.2-1_all.deb and /dev/null differ
diff --git a/simple-cdd/local_packages/libmadb-dev_0.8.1-1_amd64.deb b/simple-cdd/local_packages/libmadb-dev_0.8.1-1_amd64.deb
deleted file mode 100644 (file)
index 1ca9ed9..0000000
Binary files a/simple-cdd/local_packages/libmadb-dev_0.8.1-1_amd64.deb and /dev/null differ
diff --git a/simple-cdd/local_packages/libmadb-dev_0.8.1-2_amd64.deb b/simple-cdd/local_packages/libmadb-dev_0.8.1-2_amd64.deb
new file mode 100644 (file)
index 0000000..23d882e
Binary files /dev/null and b/simple-cdd/local_packages/libmadb-dev_0.8.1-2_amd64.deb differ
diff --git a/simple-cdd/local_packages/libmadb0_0.8.1-1_amd64.deb b/simple-cdd/local_packages/libmadb0_0.8.1-1_amd64.deb
deleted file mode 100644 (file)
index 31d8bd1..0000000
Binary files a/simple-cdd/local_packages/libmadb0_0.8.1-1_amd64.deb and /dev/null differ
diff --git a/simple-cdd/local_packages/libmadb0_0.8.1-2_amd64.deb b/simple-cdd/local_packages/libmadb0_0.8.1-2_amd64.deb
new file mode 100644 (file)
index 0000000..e323a2a
Binary files /dev/null and b/simple-cdd/local_packages/libmadb0_0.8.1-2_amd64.deb differ
diff --git a/simple-cdd/local_packages/swb_1.2.0-1_all.deb b/simple-cdd/local_packages/swb_1.2.0-1_all.deb
deleted file mode 100644 (file)
index 7d7706d..0000000
Binary files a/simple-cdd/local_packages/swb_1.2.0-1_all.deb and /dev/null differ
diff --git a/simple-cdd/local_packages/webconfig_1.12.5-2_all.deb b/simple-cdd/local_packages/webconfig_1.12.5-2_all.deb
deleted file mode 100644 (file)
index 2b43dae..0000000
Binary files a/simple-cdd/local_packages/webconfig_1.12.5-2_all.deb and /dev/null differ
diff --git a/simple-cdd/local_packages/webconfig_1.12.6-1_all.deb b/simple-cdd/local_packages/webconfig_1.12.6-1_all.deb
deleted file mode 100644 (file)
index fc32b7c..0000000
Binary files a/simple-cdd/local_packages/webconfig_1.12.6-1_all.deb and /dev/null differ
diff --git a/simple-cdd/local_packages/webconfig_1.16.0-2_all.deb b/simple-cdd/local_packages/webconfig_1.16.0-2_all.deb
new file mode 100644 (file)
index 0000000..6c8ae0d
Binary files /dev/null and b/simple-cdd/local_packages/webconfig_1.16.0-2_all.deb differ
diff --git a/simple-cdd/local_packages/xcfe_1.6.2-1_all.deb b/simple-cdd/local_packages/xcfe_1.6.2-1_all.deb
deleted file mode 100644 (file)
index 06b2c33..0000000
Binary files a/simple-cdd/local_packages/xcfe_1.6.2-1_all.deb and /dev/null differ
diff --git a/simple-cdd/local_packages/xcfe_1.6.3-1_all.deb b/simple-cdd/local_packages/xcfe_1.6.3-1_all.deb
deleted file mode 100644 (file)
index ccdc238..0000000
Binary files a/simple-cdd/local_packages/xcfe_1.6.3-1_all.deb and /dev/null differ
diff --git a/simple-cdd/local_packages/xcfe_1.6.5-1_all.deb b/simple-cdd/local_packages/xcfe_1.6.5-1_all.deb
new file mode 100644 (file)
index 0000000..11f9b0b
Binary files /dev/null and b/simple-cdd/local_packages/xcfe_1.6.5-1_all.deb differ
index 4a808e83f7de2605d68db16875a67babb8820376..5670732bcbeb0bf46d02261c78a46cdad6c7868a 100755 (executable)
@@ -18,7 +18,7 @@ echo 'force-confnew' > /etc/dpkg/dpkg.cfg.d/trc6500
 
 # now we unpack our master archive and replace all those conf files and scripts and things
 echo 'Unpacking master config files..'
-dpkg -i /media/cdrom/simple-cdd/trc6500-master-files* # version-proof
+dpkg -i /media/cdrom/simple-cdd/trc6500-master-file* # version-proof
 chown root /etc/cron.d/getswitchtemp
 chown root /root/bin/get_switch_temperature
 echo 'Files unpacked.'
index 7e06ae2d2d7b835bfc843a6d54c9fa7ad34a8ea2..538d9b5a00adc9e59039c51caa863de8f036e3ac 100644 (file)
@@ -18,9 +18,9 @@ d-i netcfg/get_hostname string trc00
 d-i netcfg/get_domain string thalesgroup.com
 # it seems domain preseeding does not work (there are bug reports on the internet..). In theory we're not using it though.
 d-i netcfg/get_nameservers string       
-d-i netcfg/get_ipaddress string 10.133.28.160
+d-i netcfg/get_ipaddress string 10.133.26.160
 d-i netcfg/get_netmask string 255.255.255.0
-d-i netcfg/get_gateway string 10.133.28.231
+d-i netcfg/get_gateway string 10.133.26.231
 # no DNS server
 
 # Important note : most if not all of the net config will get replaced anyway as we unpack /master into the drive.
diff --git a/simple-cdd/readme b/simple-cdd/readme
deleted file mode 100644 (file)
index cd58b5c..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-** Introduction
-
-This uses the simple-cdd package (available on the official Debian repository) to create a custom install CD for the master blade of the TRC6500 system's computing cluster. A number of components are installed automatically (either during install or on first boot) ; the CD also includes useful files for subsequent configuration.
-
-
-** What the built CD includes
-
-- a selection of useful/required packages
-- a selection of custom packages scarcely available elsewhere
-- unpacking of config files and scripts during install
-- automatic execution of some configuration options
-
-This CD does NOT create an usable operating system. All included systems should be reviewed, but particularly the network configuration (/etc/hosts, DHCP config, TFTP config..), which is partly automated thanks to scripts provided by the TRC6500 exploitation software, which is NOT bundled with this CD. 
-
-
-** What files we'll be using
-
-- simple-cdd.conf (name is clear enough) should be passed to the build-simple-cdd program
-- the entire profiles/ directory is used by build-simple-cdd
-- myrc.local is the script executed on first boot
-- the local_packages/ directory contains packages not available on the regular repository, or more recent versions of packages available there. 
-- the additional_scripts/ directory contains useful scripts included in the trc6500-master-files deb archive, in the /opt/trc6500/script/ folder.
-- the deb_build/ folder contains the necessary stuff to build the trc6500-master-files deb package which contains a collection of scripts, config files and config instructions
-- TRC6500.pub is a GPG public key added to the OS's keyring during install, corresponding to a makeshift Debian repo from T. Pérennou
-- splash-thales.png is a 640*480 image used for the splashscreen
-
-
-** How build-simple-cdd works
-
-The build-simple-cdd program is to be called like this :
-build-simple-cdd --dist wheezy --conf ./simple-cdd.conf
-
-Most options described in the documentation are included in the simple-cdd.conf file. The program will use those (in addition to the default settings) to build a list of what is to be included on the CD. Primarily, it includes itself, profile(s) scripts, and pulls packages (from the <profile>.packages list) from whatever repositories are in /etc/apt/sources.list, or from the ./tmp folder if the packages have already been fetched. 
-
-Additional packages are to be put in the local_packages directory (which is specified in our own simple_cdd.conf). It should be noted that packages placed there simply join the pool of available packages : to actually include them on the CD, they should be added in an itself included profile's packages list (say, profiles/trc6500.packages). The list of packages added this way is :
-cpumon dce firmware-bnx2 libcalloc1 libcycle1 libdebug1 libmcore1 raf swb webconfig xcfe
-
-Additional files are included with the all_extras="<path>,<path>" option in our simple-cdd.conf file.
-
-You should look into the provided simple-cdd.conf file ! It is tailored to a quite specific use case, and making your own should be easy enough since the simple-cdd package contains a detailed config file.
-
-
-** Building the trc6500-master-files deb packages
-
-This package has been put together in replacement of an earlier tarball ; the main benefit to using a deb being easier upgrade of existing systems.
-
-Check out the deb_build/ folder to learn more ; most of it is done by the Makefile.
-
-
-** Regarding install vectors
-
-To set up a bootable USB key : 
-cp <iso file> /dev/<key> && sync
-<key> should be the device, not a partition of it. The key will get partitioned like the CD (and how the CD is partitioned is a whole other topic).
-
-To burn your ISO to a CD :
-xorriso -as cdrecord -v dev=/dev/sr0 blank=as_needed <iso file>
-
-
-** Additional documentation
-/usr/share/simple-cdd
-/usr/share/doc/simple-cdd
-/usr/share/doc/installation-guide-amd64 (talks about preseeds)
-
diff --git a/simple-cdd/readme.txt b/simple-cdd/readme.txt
new file mode 100644 (file)
index 0000000..5456125
--- /dev/null
@@ -0,0 +1,63 @@
+** Introduction
+
+This uses the simple-cdd package (available on the official Debian repository) to create a custom install CD for the master blade of the TRC6500 system's computing cluster. A number of components are installed automatically (either during install or on first boot) ; the CD also includes useful files for subsequent configuration.
+
+
+** What the built CD includes
+
+- a selection of useful/required packages
+- a selection of custom packages scarcely available elsewhere
+- unpacking of config files and scripts during install
+- automatic execution of some configuration options
+
+This CD does NOT create an usable operating system. All included systems should be reviewed, but particularly the network configuration (/etc/hosts, DHCP config, TFTP config..), which is partly automated thanks to scripts provided by the TRC6500 exploitation software, which is NOT bundled with this CD. 
+
+
+** What files we'll be using
+
+- simple-cdd.conf (name is clear enough) should be passed to the build-simple-cdd program
+- the entire profiles/ directory is used by build-simple-cdd
+- myrc.local is the script executed on first boot
+- the local_packages/ directory contains packages not available on the regular repository, or more recent versions of packages available there. 
+- the deb_build/ folder contains the necessary stuff to build the trc6500-master-files deb package which contains a collection of scripts, config files and config instructions
+- TRC6500.pub is a GPG public key added to the OS's keyring during install, corresponding to a makeshift Debian repo from T. Pérennou
+- splash-thales.png is a 640*480 image used for the splashscreen
+
+
+** How build-simple-cdd works
+
+The build-simple-cdd program is to be called like this :
+build-simple-cdd --dist wheezy --conf ./simple-cdd.conf
+
+Most options described in the documentation are included in the simple-cdd.conf file. The program will use those (in addition to the default settings) to build a list of what is to be included on the CD. Primarily, it includes itself, profile(s) scripts, and pulls packages (from the <profile>.packages list) from whatever repositories are in /etc/apt/sources.list, or from the ./tmp folder if the packages have already been fetched. 
+
+Additional packages are to be put in the local_packages directory (which is specified in our own simple_cdd.conf). It should be noted that packages placed there simply join the pool of available packages : to actually include them on the CD, they should be added in an itself included profile's packages list (say, profiles/trc6500.packages). The list of packages added this way is :
+cpumon dce firmware-bnx2 libcalloc1 libcycle1 libdebug1 libmcore1 raf swb webconfig xcfe
+
+Additional files are included with the all_extras="<path>,<path>" option in our simple-cdd.conf file.
+
+You should look into the provided simple-cdd.conf file ! It is tailored to a quite specific use case, and making your own should be easy enough since the simple-cdd package contains a detailed config file.
+
+
+** Building the trc6500-master-files deb packages
+
+This package has been put together in replacement of an earlier tarball ; the main benefit to using a deb being easier upgrade of existing systems.
+
+Check out the deb_build/ folder to learn more ; most of it is done by the Makefile.
+
+
+** Regarding install vectors
+
+To set up a bootable USB key : 
+cp <iso file> /dev/<key> && sync
+<key> should be the device, not a partition of it. The key will get partitioned like the CD (and how the CD is partitioned is a whole other topic).
+
+To burn your ISO to a CD :
+xorriso -as cdrecord -v dev=/dev/sr0 blank=as_needed <iso file>
+
+
+** Additional documentation
+/usr/share/simple-cdd
+/usr/share/doc/simple-cdd
+/usr/share/doc/installation-guide-amd64 (talks about preseeds)
+
index ae6faffc580dd9df60b79583e3250a6afb43aae9..5432ae9c4c7277425d7ce14f76b32cf0df27affb 100644 (file)
@@ -3,13 +3,15 @@
 # normally we should use the built-in simple_cdd_dir but I have doubts.. Let's use this.
 # you'll probably want to change that
 working_dir="/home/trc6500/cdd-attempt"
+working_dir=$(pwd)
 
 # Profiles to include on the CD
 profiles="trc6500"
 build_profiles="trc6500"
 auto_profiles="trc6500"
 
-do_mirror="false"
+do_mirror="true"
+debian_mirror="ftp://integration2/debian"
 profiles_udeb_dist="wheezy"
 mirror_component="main"
 mirror_tools="wget"
@@ -23,7 +25,7 @@ local_packages="${working_dir}/local_packages"
 # for now, this includes : myrc.local, TRC6500.pub, local_packages/firmware-bnx2, and the deb package with all the master files
 # additionally, the bnx2 firmware is there because it resists being added to local_packages for some odd reason. So we'll install it by hand.
 #all_extras="${working_dir}/master.tar.gz,${working_dir}/myrc.local,${working_dir}/TRC6500.pub,${working_dir}/local_packages/firmware-bnx2_0.36+wheezy.1_all.deb"
-all_extras="${working_dir}/myrc.local,${working_dir}/TRC6500.pub,${working_dir}/local_packages/firmware-bnx2_0.36+wheezy.1_all.deb, ${working_dir}/deb_build/trc6500-master-files*.deb"
+all_extras="${working_dir}/myrc.local,${working_dir}/TRC6500.pub,${working_dir}/local_packages/firmware-bnx2_0.36+wheezy.1_all.deb, $(find ${working_dir}/.. -maxdepth 1 -name trc6500-master-file\*.deb|sort|tail -1)"
 
 # added value
 export SPLASHPNG="${working_dir}/splash-thales.png"
diff --git a/trc6500-master-file/Makefile b/trc6500-master-file/Makefile
new file mode 100644 (file)
index 0000000..dabfe20
--- /dev/null
@@ -0,0 +1,64 @@
+# -*- Makefile -*-
+
+DIR = ../master/
+
+CONFIGDIR = debian/
+
+FILES = $(shell cd $(DIR); find etc/ -type f)
+
+TARGET = ../$(MODULE)_$(VERSION)_$(ARCH).deb
+
+OBJECTS = deb/DEBIAN/preinst \
+         deb/DEBIAN/postrm \
+         deb/DEBIAN/postinst \
+         deb/opt/script
+
+SHELL=/bin/bash
+MODULE = $(shell basename `pwd`)
+ARCH = all
+
+.DEFAULT: all
+.PHONY: clean deb all
+
+VERSION = $(shell awk '/^$(MODULE)/ { gsub(/[()]/, ""); print $$2; exit }' debian/debian-changelog)
+
+
+all: $(TARGET) deb
+       
+clean:
+       rm -rf deb $(OBJECTS) $(TARGETS)
+
+deb:
+       rm -rf deb
+       mkdir --parent deb/etc/webconfig/ deb/etc/default/ deb/DEBIAN
+
+deb/DEBIAN/preinst: debian/debian-preinst deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST)
+       rm -f $@
+       cat $< > $@~
+       for f in $(FILES); do echo '[ -f "/'$$f'" ] && dpkg-divert --add /'$$f; done >>$@~
+       echo "exit 0" >>$@~
+       chmod +x $@~
+       mv $@~ $@
+
+deb/DEBIAN/postrm: debian/debian-postrm deb $(addprefix $(DIR)/, $(FILES)) $(MAKEFILE_LIST)
+       rm -f $@
+       cat $< > $@~
+       for f in $(FILES); do echo '[ -f "/'$$f'" ] && dpkg-divert --remove /'$$f; done >>$@~
+       echo "exit 0" >>$@~
+       chmod +x $@~
+       mv $@~ $@
+
+deb/DEBIAN/postinst: debian/debian-postinst deb
+       cp $< $@
+
+deb/opt/script: script deb
+       mkdir -p $@
+       cp $</* $@
+
+$(TARGET): deb $(OBJECTS)
+       sed s/@@version@@/$(VERSION)/ debian/debian-control > deb/DEBIAN/control
+       mkdir -p deb/usr/share/doc/$(MODULE)
+       cp debian/debian-changelog deb/usr/share/doc/$(MODULE)/changelog
+       cp -r $(DIR)/* deb/
+       fakeroot dpkg --build deb
+       mv deb.deb $@
diff --git a/trc6500-master-file/debian-binary b/trc6500-master-file/debian-binary
new file mode 100644 (file)
index 0000000..cd5ac03
--- /dev/null
@@ -0,0 +1 @@
+2.0
diff --git a/trc6500-master-file/debian/debian-changelog b/trc6500-master-file/debian/debian-changelog
new file mode 100644 (file)
index 0000000..b95e918
--- /dev/null
@@ -0,0 +1,38 @@
+trc6500-master-file (7.8.4-1) unstable; urgency=low
+  * update softndesign packages
+  * remove rproxy default files
+
+ -- Laurent Mazet <laurent.mazet@thalesgroup.com>  Mon, 14 Sep 2015 20:10:41 +0200
+
+trc6500-master-file (7.8.3-1) unstable; urgency=low
+  * Rebuild trc6500-master-file package to limit conflicts with trc6500 packages
+  * Add lite tarball for xdf-30mhz-lite
+  * Clean rc.local for xdf-12mhz, xdf-30mhz, and mhf
+  * Minimize usage of SDD
+  * Correct post install package script (force links creation)
+  * Remove internal debian mirror from master
+  * Kept aliases for swm and swg
+  * Restore eth1 on clovis-lite configuration
+
+ -- Laurent Mazet <laurent.mazet@thalesgroup.com>  Tue, 28 Jul 2015 14:02:50 +0200
+
+trc6500-master-file (7.8.2-1) unstable; urgency=low
+
+  * Keep standard 30MHzDF and adds the lite configuration
+
+ -- Thomas Pérennou <thomas.perennou@external.thalesgroup.com>  Mon, 22 Jun 2015 15:15:16 +0200
+
+trc6500-master-file (7.8.1-1) unstable; urgency=low
+
+  * .deb packaging
+
+ -- Olivier Leobal <olivier.leobal@thalesgroup.com>  Wed, 10 Jun 2015 14:16:08 +0200
+
+trc6500-master-file (7.8.0-1) unstable; urgency=low
+
+  * initial release (#1337)
+  * added scripts from lgcore
+  * getswitchtemp fix
+  * inetd removal
+
+ -- Olivier Leobal <olivier.leobal@thalesgroup.com>  Wed, 10 Jun 2015 12:46:08 +0200
diff --git a/trc6500-master-file/debian/debian-control b/trc6500-master-file/debian/debian-control
new file mode 100644 (file)
index 0000000..d8fef16
--- /dev/null
@@ -0,0 +1,9 @@
+Section: TRC6500
+Priority: important
+Version: @@version@@
+Architecture: all
+Package: trc6500-master-files
+Maintainer: Olivier Léobal <olivier.leobal@thalesgroup.com>
+Description: files for the TRC6500's computing cluster's operating system
+ Contains mainly scripts and configuration files
+Homepage: http://www.thalesgroup.com/
diff --git a/trc6500-master-file/debian/debian-postinst b/trc6500-master-file/debian/debian-postinst
new file mode 100755 (executable)
index 0000000..4d212a3
--- /dev/null
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# since equivs can't handle symlinks, here we are doing them by hand. As of writing this script (2015-05-29), there are 11 symlinks to take care of.
+
+# I don't know why things were that way before, but I'm told to set them that way again.
+echo 'Moving things around..'
+[ -h /home ] || mv /home /var/media/backup
+mkdir -p /var/media/backup/dump/{core,dump_delay_line,dump_track_base,log,prod,rec,trace}
+ln -sf /var/media/backup/dump /
+ln -sf /var/media/backup/home /
+ln -sf /var/media/backup/rec /
+ln -sf /var/media/prod /var/media/backup/
+ln -sf /etc/hosts.30MHzMDF /etc/hosts.30MHz
+ln -sf /etc/hosts.8MHzMHF /etc/hosts.8MHz
+ln -sf /usr/lib/syslinux/menu.c32 /opt/tftp/menu.c32
+ln -sf /initrd.img /opt/tftp/initrd.img 
+ln -sf /vmlinuz /opt/tftp/vmlinuz
+ln -sf /usr/lib/syslinux/pxelinux.0 /opt/tftp/pxelinux.0
+ln -sf /usr/lib/syslinux/memdisk /opt/tftp/memdisk
+echo 'Things moved.'
+
+# now enable all the scripts and such..
+echo 'Enabling on-startup scripts..'
+update-rc.d waitswitches defaults
+update-rc.d waitswitches enable
+update-rc.d etherwake defaults
+update-rc.d etherwake enable
+update-rc.d ipmiwake defaults
+update-rc.d ipmiwake enable
+update-rc.d wakeonlan defaults
+update-rc.d wakeonlan enable
+update-rc.d waitslaves defaults
+update-rc.d shutdownallblades defaults
+update-rc.d checkudevrules enable
+update-rc.d checkudevrules defaults
+echo 'Scripts enabled.'
+
+# and these other things too
+echo 'Finalizing configuration..'
+chown webconfig /etc/webconfig/alias.csv /etc/dhcp/dhcpd.conf*
+cp /etc/dhcp/dhcpd.conf.blank /etc/dhcp/dhcpd.conf
+chsh -s /usr/bin/pdmenu trc6500
+
+# from that sync_master.sh script.. Apparently there from Git shenanigans.
+chmod go-rwx /root/.ssh/id_rsa
+chmod go-rwx /opt/cluster/slave/root/.ssh
+chmod go-rwx /opt/cluster/slave/root/.ssh/id_rsa
+chmod a+rwx  /opt/tftp
+
+echo "">/var/log/atftpd.log
+chown nobody /var/log/atftpd.log
+
+update-initramfs -u
+
+cd /opt/cluster
+# now this file is locked away during install and replaced by a dummy. So we put a duplicate of this in a script executed on first boot after the install.
+# this is still here because it is planned we install/update this on established systems
+[ -f /sbin/start-stop-daemon.REAL ] || make all
+echo 'Finalized.'
+
+
diff --git a/trc6500-master-file/debian/debian-postrm b/trc6500-master-file/debian/debian-postrm
new file mode 100755 (executable)
index 0000000..b97cb85
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+# list of diverts
diff --git a/trc6500-master-file/debian/debian-preinst b/trc6500-master-file/debian/debian-preinst
new file mode 100755 (executable)
index 0000000..7d1b6f3
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+# list of diverts
diff --git a/trc6500-master-file/readme.txt b/trc6500-master-file/readme.txt
new file mode 100644 (file)
index 0000000..1b2e764
--- /dev/null
@@ -0,0 +1,25 @@
+This puts things and thongs together to get us a makeshift Debian package. Copied from the same in lgcore6500(git repo)/dev/services/webconfig. Use with caution.
+
+
+** How to use
+
+edit things in /debian, notably the control file
+
+edit the Makefile to include the files you want to include (ie, here, the master-files directory which is simply the "master" folder in the debian6500 git repo, without the symlinks)
+
+pray "make" will do the job
+
+
+** What files we need
+
+Everything in the debian/ folder, ie control, preinst, postinst and the like.
+Obviously they are not required for a _debian_ package but for _ours_ they are
+
+the ../additional_scripts folder. Please, please don't trash it away. These scripts come from the lgcore6500 repository, that's why they're no symlinks like for the master-files thing.
+
+
+** About versioning
+
+Let us say our package is version 7.8.1-1. This means it's the version 1 of the customization archive for Debian 7.8, hence 7.8.1. The -1 suffix is a package version, in theory it doesn't affect the contents, only how they're packaged.
+
+That's for version number. Remember also to list your changes in the debian-changelog in the debian/ folder ; it'll be useful to check the OS version on systems once it's installed.
diff --git a/trc6500-master-file/script/change_configuration.sh b/trc6500-master-file/script/change_configuration.sh
new file mode 100755 (executable)
index 0000000..ee4f32c
--- /dev/null
@@ -0,0 +1,168 @@
+#!/bin/bash
+# ============================================================================
+#
+# Copyright (C) THALES. All rights reserved
+# Author: Laurent Mazet
+#
+
+# Date : 10/10/2013
+#
+# 05/11/2013 : LMa configuration des timezone Zulu(GMT) et Paris
+#              Desactivation de pam pour ssh
+# ============================================================================
+
+# Switch configuration
+
+# TODO
+# *
+
+MODE_BW=""
+MODE_FIX=""
+MODE_HW=""
+MODE_NET=""
+MODE_TZ=""
+TARBALLS=""
+PROGNAME=$(basename $0)
+VER=1.0
+TMPLOG=/tmp/$PROGNAME-$$.log
+
+# help function
+
+function usage () {
+  echo "usage: $PROGNAME <mode>"
+  echo "  switch trc6500 mode"
+  echo "  avaliable modes are:"
+  echo "  - 8MHzMHF, 12MHzDF, 12MHzMDF, 30MHzMDF 30MHzMDF.lite or 30MHzMHF"
+  echo "  - fix_ssh"
+  echo "  - hw_ibm or hw_supermicro"
+  echo "  - network"
+  echo "  - tz_zulu or tz_paris"
+  exit $@
+}
+
+# formating functions
+
+function title () { echo -e "\033[0;1m$*\033[0;0m"; }
+function pass () { echo -e "\033[1;32m$*\033[0;0m"; }
+function warn () { echo -e "\033[1;33m$*\033[0;0m"; }
+function fail () { echo -e "\033[1;31m$*\033[0;0m"; }
+
+# check command
+
+function check () {
+  echo -n "$@: "
+  $@ 2>$TMPLOG && pass OK || { fail KO; cat $TMPLOG; exit 1; }
+  rm -f $TMPLOG
+}
+
+# argument processing
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+    -h) usage 0;;
+    8mhz|8MHz|12mhzdf|12MHzDF|12mhzmdf|12MHzMDF|30mhzmdf|30MHzMDF|30mhzmdf.lite|30MHzMDF.lite|30mhzmhf|30MHzMHF) MODE_BW="${1^^}";;
+    fix_ssh) MODE_FIX="$1";;
+    hw_ibm|hw_supermicro) MODE_HW="$1";;
+    network) MODE_NET="$1";;
+    tz_paris|tz_zulu) MODE_TZ="$1";;
+    *) usage 1;;
+    esac
+    shift
+done
+
+# main process
+
+action=""
+
+if [ "$MODE_BW" ]; then
+    title "updating /etc/hosts"
+    MODE_BW=${MODE_BW/MHZ/MHz}
+    check rm -f /etc/hosts 
+    check ln -s /etc/hosts.${MODE_BW/LITE/lite} /etc/hosts
+    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
+    8MHzMHF)
+        for ip in 0A851{A,C}A5; do      check ln -T -f -s rec /opt/tftp/pxelinux.cfg/$ip; done
+    ;;
+    12MHzDF) ;;
+    12MHzMDF) ;;
+    30MHzMDF) ;;
+    30MHzMDF.lite)
+        for ip in 0A851{A,C}; do check ln -T -f -s lite /opt/tftp/pxelinux.cfg/$ip; done
+        check cp /etc/dhcp/dhcpd.conf.lite /etc/dhcp/dhcpd.conf
+    ;;
+    30MHzMHF)
+        for ip in 0A851{A,C}A{1..6}; do check ln -T -f -s acq /opt/tftp/pxelinux.cfg/$ip; done
+        for ip in 0A851{A,C}A9; do      check ln -T -f -s rec /opt/tftp/pxelinux.cfg/$ip; done
+    ;;
+    esac
+    action="done"
+fi
+
+if [ "$MODE_FIX" ]; then
+
+    case "$MODE_FIX" in
+    fix_ssh)
+        sed -i 's/^\(UsePAM\) yes/\1 no/' /etc/ssh/sshd_config
+        TARBALLS+=" root"
+
+        action="done"
+    esac
+
+fi
+
+if [ "$MODE_HW" ]; then
+
+    conf=/etc/default/shutdownallblades
+
+    title "change shutdownallblades"
+    if $(grep -sq '^#*REBOOT=' $conf); then
+        case "$MODE_HW" in
+        hw_ibm) check sed -i 's/^#*REBOOT=.*$/#REBOOT=yes/' $conf;;
+        hw_supermicro) check sed -i 's/^#*REBOOT=.*$/REBOOT=yes/' $conf;;
+        esac
+    else
+        case "$MODE_HW" in
+        hw_ibm) check sed -i '$a#REBOOT=yes' $conf;;
+        hw_supermicro) check sed -i '$aREBOOT=yes' $conf;;
+        esac
+    fi
+
+    action="done"
+fi
+
+if [ "$MODE_NET" ]; then
+
+    conf=/etc/dhcp/dhcpd.conf
+
+    title "update network configuraton"
+    if $(grep -sq 'trc[0-9]*_1' $conf); then
+        check sed -i 's/\(host.*trc[0-9][0-9]\)\([^_]\)/\1-rf\2/;s/\(host.*trc[0-9][0-9]\)_1/\1/' $conf
+    fi
+    TARBALLS+=" root"
+
+    action="done"
+fi
+
+if [ "$MODE_TZ" ]; then
+    case "$MODE_TZ" in
+    tz_paris) TZ="Europe/Paris";;
+    tz_zulu) TZ="Etc/Zulu";;
+    *) TZ="";;
+    esac
+
+    if [ "$TZ" ]; then
+        echo $TZ > /etc/timezone
+        TARBALLS+=" root"
+
+        action="done"
+    fi
+fi
+
+# last check
+[ "$action" ] || { echo "no mode specified"; exit 1; }
+
+[ "$TARBALLS" ] && make -f /opt/cluster/Makefile $TARBALLS
+
+# vim:set tabstop=4 expandtab shiftwidth=4:
diff --git a/trc6500-master-file/script/check_network.sh b/trc6500-master-file/script/check_network.sh
new file mode 100755 (executable)
index 0000000..5c17bf2
--- /dev/null
@@ -0,0 +1,78 @@
+#!/bin/bash
+#
+# ============================================================================
+#
+# Copyright (C) THALES. All rights reserved
+# Author: Alexandre Cazalis
+# 
+# Gestion attente lames esclaves au boot (ping,ssh)
+#
+# 2013-11-20 : V1.2 LMa 
+#   - Ajout de la personalisation de la commande a executer
+#     par defaut (uptime). Ajout attente montage nfs avant demarrage
+# 2014-05-28 : V1.3 LMa
+#   - Ajout d'un mode foreground pour ne tenter qu'une fois chaque commande
+#   - Ajout d'une commande pour exclude la lame maitre
+#
+# 2014-10-28 : Change owner
+# ============================================================================
+
+# TODO
+# *
+
+CMD="uptime"
+MODE="iter"
+PROGNAME=$(basename $0)
+VER=1.3
+EXCLUDE="___"
+
+function usage () {
+    echo "usage: $PROGNAME [-c command] [-h] [-i] [-o] [-t seconds] [-v] [-w] [-x] host1 host2..."
+    echo "   -c: set command (default '$CMD')"
+    echo "   -h: help message"
+    echo "   -i: infinity loop mode [default]"
+    echo "   -o: only try ones"
+    echo "   -t: timeout"
+    echo "   -v: version message"
+    echo "   -w: wait mode"
+    echo "   -x: avoid master blade"
+    exit $@
+}
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+    -c) shift; CMD=$1;;
+    -h) usage 0;;
+    -i) MODE="iter";;
+    -o) MODE="ones";;
+    -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";;
+    *) list+=" "$1;;
+    esac
+    shift
+done
+
+# list
+[ "$list" ] || list=$(awk '{sub(/#.*/, "")} /trc[0-9][0-9]/ && ! /-rf/ {print $2}' /etc/hosts)
+list=$(echo $list" "|sed s/$EXCLUDE//)
+
+# timeout
+if [ "$TIMEOUT" ]; then
+    trap "echo 'timeout expired (${TIMEOUT}s)'; exit 0;" SIGVTALRM
+    ( sleep $TIMEOUT; kill -SIGVTALRM $$ 2>/dev/null; [ $? -eq 0 ] && rc=1 || rc=0; exit $rc) &
+fi
+trap "exit 0;" SIGINT
+
+# main loop
+while true; do
+    for host in $list; do
+       stat=0
+       echo -n ${host}:" "
+       ping -c 1 $host >&/dev/null && { ssh -t -o ConnectTimeout=1 root@$host "$CMD" 2>/dev/null && stat=1 || echo "soon..."; } || echo
+       [ "$MODE" = "wait" -a $stat -eq 1 ] && list=${list/$host }
+    done
+    [ "$MODE" = "ones" ] && break;
+    [[ "$list" =~ [a-zA-Z0-9_-] ]] && sleep 1 || break;
+done
diff --git a/trc6500-master-file/script/configure_fe306.sh b/trc6500-master-file/script/configure_fe306.sh
new file mode 100755 (executable)
index 0000000..53cfae8
--- /dev/null
@@ -0,0 +1,181 @@
+#!/bin/bash
+
+# parameters
+#
+# ============================================================================
+#
+# Copyright (C) THALES. All rights reserved
+# Author: Laurent Mazet
+# 
+# 2013-11-10 V1.0 : Creation 
+#
+# 2013-11-20 V1.1 :  L.Mazet ajout possibilite de configuration du switch
+# 
+# ============================================================================
+
+DRY=
+ID=
+IP=192.168.0.1
+TRC6500_SCRIPT_DIR=$(dirname $0)
+
+# help function
+
+function usage () {
+  echo "usage: $PROGNAME [-a] [-d] [-h] [-i <id>]"
+  echo " -a: configure all boards"
+  echo " -d: dry mode"
+  echo " -h: help message"
+  echo " -i: board id (from 1 to 5)"
+  exit $@
+  }
+
+# formating functions
+
+function title () { echo -e "\033[0;1m$*\033[0;0m"; }
+function pass () { echo -e "\033[1;32m$*\033[0;0m"; }
+function warn () { echo -e "\033[1;33m$*\033[0;0m"; }
+function fail () { echo -e "\033[1;31m$*\033[0;0m"; }
+
+# configuration values
+
+# argument processing
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+    -a) ID=all;;
+    -d) DRY=yes;;
+    -h) usage 0;;
+    -i) shift; ID=$1;;
+    *) usage 1;;
+    esac
+    shift
+done
+
+# switch port configure function ()
+
+function sw_configure () {
+    case "$1" in 
+    off) CMD="-c 'configure terminal' -c 'interface range g1/39-44' -c 'shutdown' -c end -c 'clear mac address-table dynamic' -c 'clear ip arp inspection log' -c exit";;
+    on) CMD="-c 'configure terminal' -c 'interface range g1/39-44' -c 'no shutdown' -c end -c exit";;
+    1) CMD="-c 'configure terminal' -c 'interface g1/39' -c 'no shutdown' -c end -c exit";;
+    2) CMD="-c 'configure terminal' -c 'interface g1/40' -c 'no shutdown' -c end -c exit";;
+    3) CMD="-c 'configure terminal' -c 'interface g1/41' -c 'no shutdown' -c end -c exit";;
+    4) CMD="-c 'configure terminal' -c 'interface g1/42' -c 'no shutdown' -c end -c exit";;
+    5) CMD="-c 'configure terminal' -c 'interface g1/43' -c 'no shutdown' -c end -c exit";;
+    6) CMD="-c 'configure terminal' -c 'interface g1/44' -c 'no shutdown' -c end -c exit";;
+    esac
+
+    if [ "$DRY" = "yes" ]; then
+        echo connect_switch.tcl -h swm $CMD
+    else
+               LOG=/tmp/$PROGNAME-$$.log
+               echo -n "sw_configure $1: "
+        eval $TRC6500_SCRIPT_DIR/connect_switch.tcl $CMD swm >&$LOG && pass OK || { fail KO; cat $LOG; exit 1; }
+               rm -f $LOG
+    fi
+}
+
+case "$ID" in
+1) CH1=0; CH2=1; CLOCKREF=external;;
+2) CH1=2; CH2=3; CLOCKREF=internal;;
+3) CH1=4; CH2=5; CLOCKREF=internal;;
+4) CH1=6; CH2=7; CLOCKREF=internal;;
+5) CH1=8; CH2=9; CLOCKREF=internal;;
+6) CH1=10; CH2=11; CLOCKREF=internal;;
+all)
+    for id in $(seq 1 5); do
+        title "switch off all fe306 ports"
+        sw_configure off
+        title "switch on port for fe306 $id"
+        sw_configure $id
+        title "configure fe306 $id"
+        if [ "$DRY" = "yes" ]; then
+            echo $(basename $0) -i $id
+        else
+            { $0 -i $id | mawk -W interactive '{print "  " $0}'; } && pass OK || { fail KO; exit 1; }
+        fi
+    done
+    title "switch on all fe306 ports"
+    sw_configure on
+    exit 0
+    ;;
+*) echo "unknown fe306 id ($ID)"; exit 1;;
+esac
+
+# configure function
+
+function configure () {
+    echo -n "$1 [$2 <= $3]: "
+    if [ "$DRY" = "yes" ]; then
+       echo wget -q -O - http://$IP/$1?$2=$3
+    else
+        wget -q -O - http://$IP/$1?$2=$3 >/dev/null && pass OK || { fail KO; exit 1; }
+    fi
+}
+
+# setup local address
+
+title "setup local address"
+cmd="ifconfig eth1:1 192.168.0.2 netmask 255.255.255.0"
+[ "$DRY" = "yes" ] && echo $cmd || { echo -n $cmd" "; eval $cmd && pass OK || { fail KO; exit 1; }; }
+
+# check if fe306 is connected
+
+#title "check presence of $IP"
+#cmd="ping -c 1 -w 10 -W 10 $IP"
+#[ "$DRY" = "yes" ] && echo $cmd || { echo -n $cmd" "; eval $cmd >&/dev/null && pass OK || { warn KO; ifconfig eth1:1 down; exit 0; }; }
+
+# get serial number
+
+[ "$DRY" = "yes" ] && SN=00 || \
+    SN=$(wget -q -O - http://$IP/versions_en.html | mawk '/MODULE/ { module = 1 } /Serial Number/ { if (module) { printf "%02X", $4; exit 0 } }')
+
+[[ "$SN" =~ ^[0-9A-F][0-9A-F]$ ]] || { echo "unknown serial number ($SN)"; exit 1; }
+
+# configure ip
+
+title "configure ip"
+
+configure ModeServ.cmd serv_mode MANUAL
+configure MacServ.cmd serv_mac 00.80.EE.00.$SN.01
+configure IpServ.cmd serv_ip $(getent hosts | awk '/fe306-'$ID'/ {print $1}')
+configure MaskServ.cmd serv_mask 255.255.255.0
+
+for i in $(seq 1 8); do
+    configure MacProd$i.cmd prod_mac$i 00.80.EE.00.$SN.0$((i+1))
+    configure IpProd$i.cmd prod_ip$i 10.133.26.1$ID$i
+done
+
+configure IpMulticast.cmd multicast_ip 238.0.0.0
+configure RxMulticast.cmd multicast_rx 62002
+configure TxMulticast.cmd multicast_tx 62004
+configure TTL.cmd ttl 10
+
+# configure gps
+
+title "configure gps"
+
+configure GpsRate.cmd gps_rate 19200
+configure GpsChar.cmd gps_char 8
+configure GpsStop.cmd gps_stop 1
+configure GpsParity.cmd gps_parity no
+
+# configure miscellaneous
+
+title "configure miscellaneous"
+configure BoardNum.cmd board_num $ID
+configure RackNum.cmd rack_num 1
+configure Chan1Num.cmd channel1_num $CH1
+configure Chan2Num.cmd channel2_num $CH2
+
+configure FpgaLoc.cmd fpga_loc FLASH
+configure Clk10Mhz.cmd clk_10 $CLOCKREF
+configure PllConfig.cmd pll_cfg pll_cfg_02
+
+# unset local address
+
+title "unset local address"
+cmd="ifconfig eth1:1 down"
+[ "$DRY" = "yes" ] && echo $cmd || { echo -n $cmd" "; eval $cmd && pass OK || { fail KO; exit 1; }; }
+
+# vim:set tabstop=4 shiftwidth=4 softtabstop=4:
diff --git a/trc6500-master-file/script/configure_matrix.tcl b/trc6500-master-file/script/configure_matrix.tcl
new file mode 100755 (executable)
index 0000000..540c3d1
--- /dev/null
@@ -0,0 +1,39 @@
+#!/usr/bin/expect
+
+# ============================================================================
+#
+# Copyright (C) THALES. All rights reserved
+#
+# * V1.0 Laurent Mazet 29/04/2013 
+#   creation script de configuration de la matrice par ligne de commande
+# ============================================================================
+
+spawn /opt/trc6500/tools/matrix_tool
+
+set timeout 3
+
+exec ifconfig eth1:0 192.168.1.1 netmask 255.255.255.0
+
+proc cleanexit {rc} {
+    exec ifconfig eth1:0 down
+    exit $rc
+}
+
+expect {
+    "taper la commande choisie" { send "0\r" }
+    timeout { send_user "connection to $host timed out\n"; cleanexit 1 }
+    eof { send_user "connection to host failed\n"; cleanexit 1 }
+}
+expect {
+    "timeout detected" { send_user "can't connect on defaut ip\n"; cleanexit 1 }
+    "taper la commande choisie" { send "10\r" }
+}
+
+expect "nouvelle adresse" { send "010.133.026.253\r" }
+
+expect "taper la commande choisie" { send "12\r" }
+
+expect "taper la commande choisie" { send "14\r" }
+
+cleanexit 0
+# vim:set tabstop=4 expandtab shiftwidth=4:
diff --git a/trc6500-master-file/script/configure_switch.tcl b/trc6500-master-file/script/configure_switch.tcl
new file mode 100755 (executable)
index 0000000..4d34d43
--- /dev/null
@@ -0,0 +1,52 @@
+#!/usr/bin/expect
+
+# ============================================================================
+#
+# Copyright (C) THALES. All rights reserved
+# Author: Laurent Mazet
+# 
+# Script de configuration du switchs
+#
+# 2013-10-10 V1.0 : Creation
+#
+# ============================================================================
+
+set host [lrange $argv 0 0]
+if { $host == "" } {
+    puts "usage: configure_switch.tcl \[sw1|sw2|swg1|swg2|swm\]"
+    exit 1
+}
+
+set tftpserver ""
+if { $host == "swg1" } { set tftpserver "10.133.26.160" }
+if { $host == "swg2" } { set tftpserver "10.133.26.160" }
+if { $host == "swm" } { set tftpserver "10.133.28.160" }
+if { $host == "sw1" } { set tftpserver "10.133.26.160" }
+if { $host == "sw2" } { set tftpserver "10.133.26.160" }
+if { $tftpserver == "" } { puts "unknown switch '$host'"; exit }
+
+set date [ exec date +%Y%m%d-%H:%m:%S ]
+set backup "$host-$date.txt"
+
+spawn telnet $host
+
+set timeout 30
+
+expect {
+    "Password:" { send "thales\r" }
+    incorrect { send_user "invalid password or account\n"; exit 1 }
+    timeout { send_user "connection to $host timed out\n"; exit 1 }
+    eof { send_user "connection to host failed\n"; exit 1 }
+}
+expect -exact ">" { send "enable\r" }
+expect "Password:" { send "thales\r" }
+expect "#" { send "copy running-config tftp://$tftpserver/$backup\r" }
+expect -exact "?" { send "$tftpserver\r" }
+expect -exact "?" { send "$backup\r" }
+expect "#" { send "copy tftp://$tftpserver/$host.txt startup-config\r" }
+expect -exact "?" { send "startup-config\r" }
+#expect "#" { send_user " << reload or exit ? >> "; interact }
+expect "#" { send "reload\r" }
+
+exit 0
+# vim:set tabstop=4 expandtab shiftwidth=4:
diff --git a/trc6500-master-file/script/configure_switch_bootstrap.tcl b/trc6500-master-file/script/configure_switch_bootstrap.tcl
new file mode 100755 (executable)
index 0000000..db95d4d
--- /dev/null
@@ -0,0 +1,49 @@
+#!/usr/bin/expect
+
+set host [lrange $argv 0 0]
+if { $host == "" } {
+    puts "usage: configure_switch_bootstrap.tcl \[sw1|sw2|swg1|swg2|swm\]"
+    exit 1
+}
+
+set ipaddress ""
+if { $host == "swg1" } { set ipaddress "10.133.26.231" }
+if { $host == "swg2" } { set ipaddress "10.133.26.232" }
+if { $host == "swm" } { set ipaddress "10.133.28.231" }
+if { $host == "sw1" } { set ipaddress "10.133.26.231" }
+if { $host == "sw2" } { set ipaddress "10.133.26.232" }
+if { $ipaddress == "" } { puts "unknown switch '$host'""; exit 1 }
+
+spawn screen -c . /dev/ttyUSB0
+
+set timeout 5
+
+set state 0
+while { $state != 1 } {
+    expect {
+        timeout { send "\r" }
+        -exact ">" { send "enable\r" }
+        "#" { set state 1 }
+        "Password:" { send "thales\r" }
+        eof { send_user "connection to host failed\n"; exit 1 }
+    }
+}
+
+send "configure terminal\r"
+expect "#" { send "interface vlan 1\r" }
+expect "#" { send "ip address $ipaddress 255.255.255.0\r" }
+expect "#" { send "exit\r" }
+expect "#" { send "line vty 0 4\r" }
+expect "#" { send "password thales\r" }
+expect "#" { send "enable password thales\r" }
+expect "#" { send "end\r" }
+
+# quit switch connection
+expect "#" { send "exit\r" }
+
+# to quit screen we need to send C-a \.
+send "\001\\"
+expect "kill all your windows" { send "y\r" }
+
+exit 0
+# vim:set tabstop=4 expandtab shiftwidth=4:
diff --git a/trc6500-master-file/script/connect_switch.tcl b/trc6500-master-file/script/connect_switch.tcl
new file mode 100755 (executable)
index 0000000..5f2299e
--- /dev/null
@@ -0,0 +1,115 @@
+#!/usr/bin/expect
+
+# ============================================================================
+#
+# Copyright (C) THALES. All rights reserved
+# Author: Laurent Mazet
+# 
+# Script de connection au switchs
+#
+# 2013-10-10 V1.0 : Creation
+#
+# 2014-03-05 V1.1 : LMa ajout de passage de commande CISCO en parametre
+#
+# 2014-06-10 V1.2 : LMa ajout d'un fichier de commandes
+# 
+# ============================================================================
+
+# default value
+set adminpassword "thales"
+set cmd {}
+set host ""
+set loginpassword "thales"
+set prompt "SW*"
+
+proc usage {rc} {
+    puts "usage: connect_switch.tcl \[host\] \[-a adminpassword\] \[-c command\] \[-f file\] \[-h\] \[-l loginpassword\] \[-p prompt\]"
+    exit $rc
+}
+
+# process argument
+set action ""
+for {set i 0} {$i < [llength $argv]} {incr i} {
+    set arg [lindex $argv $i]
+    switch $arg {
+        -a { set action "-adminpassword" }
+        -c { set action "-cmd" }
+        -f { set action "-file" }
+        -h { usage 0 }
+        -l { set action "-loginpassword" }
+        -p { set action "-prompt" }
+        default {
+            switch $action {
+                -adminpassword { set adminpassword $arg }
+                -cmd { set cmd [lappend cmd $arg] }
+                -file {
+                    if {[file isfile $arg] == 1} then {
+                        set f [open $arg "r"]
+                        set data [read $f]
+                        close $f
+                        foreach line [split $data "\n"] {
+                            set cmd [lappend cmd $line]
+                        }
+                    } else {
+                        puts "can't open file '$arg'"
+                        exit 1
+                    }
+                }
+                -loginpassword { set loginpassword $arg }
+                -prompt { set prompt $arg }
+                default { set host $arg }
+            }
+        set action ""
+        }
+    }
+}
+if {$action != ""} {
+    puts "missing arguments"
+    exit 1
+}
+if { $host == "" } {
+    usage 1
+}
+
+# start connection
+spawn telnet $host
+
+# login password
+expect {
+    "Password:" { send "$loginpassword\r" }
+    timeout { send_user "connection to host failed\n"; exit 1 }
+    eof { send_user "connection to host failed\n"; exit 1 }
+}
+
+# admin password
+expect {
+    "$prompt>" { send "enable\r" }
+    timeout { send_user "connection to host failed\n"; exit 1 }
+    "Password:" { send_user "invalid login password\n"; exit 1 }
+}
+expect "Password:" { send "$adminpassword\r" }
+expect {
+    "$prompt#" { send "\r" }
+    "Password:" { send_user "invalid admin password\n"; exit 1 }
+}
+
+# commands or interactive mode
+if {[llength $cmd] == 0 } {
+    expect "$prompt#" { interact }
+} else {
+    expect "$prompt#" { send "terminal length 0\r" }
+    for {set i 0} {$i < [llength $cmd]} {incr i} {
+        expect {
+            "$prompt#" { send "[lindex $cmd $i]\r" }
+            "confirm" { send "\r"; continue }
+        }
+    }
+    expect {
+        "confirm" { send "\r"; expect "$prompt" { send "exit\r" } }
+        "$prompt" { send "exit\r" }
+    }
+    send_user "\n"
+}
+
+exit 0
+# vim:set tabstop=4 shiftwidth=4 softtabstop=4:
diff --git a/trc6500-master-file/script/cpumon_lite b/trc6500-master-file/script/cpumon_lite
new file mode 100755 (executable)
index 0000000..ae99371
--- /dev/null
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+open PROC_STAT, "</proc/stat";
+my @proc_stat=<PROC_STAT>;
+close PROC_STAT;
+my @cpu_stat_t0 = grep {s/^cpu\d+\s//} (@proc_stat);
+sleep 1;
+open PROC_STAT, "</proc/stat";
+my @proc_stat=<PROC_STAT>;
+close PROC_STAT;
+my @cpu_stat_t1 = grep {s/^cpu\d+\s//} (@proc_stat);
+
+my $total = 0;
+for (my $cpu_i=0; $cpu_i<(scalar @cpu_stat_t0); $cpu_i++) {
+    my @stat_t0 = split /\s+/, $cpu_stat_t0[$cpu_i];
+    my @stat_t1 = split /\s+/, $cpu_stat_t1[$cpu_i];
+    my ($t0_idle, $t1_idle) = ($stat_t0[3], $stat_t1[3]);
+    my ($t0_total, $t1_total) = (0, 0);
+    $t0_total += $_ foreach @stat_t0;
+    $t1_total += $_ foreach @stat_t1;
+
+    my $load = ($t1_total - $t0_total == 0) ? 100: int((100 * (($t1_total - $t0_total) - ($t1_idle - $t0_idle))/($t1_total - $t0_total)) + 0.5);
+    print " +" unless ($cpu_i == 0);
+    printf "% 5.1f%% ", $load;
+    $total += $load;
+}
+printf " = % 6.1f%%\n", $total;
diff --git a/trc6500-master-file/script/flash_fe306.sh b/trc6500-master-file/script/flash_fe306.sh
new file mode 100755 (executable)
index 0000000..423b6d4
--- /dev/null
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+# parameters
+#
+# ============================================================================
+#
+# Copyright (C) THALES. All rights reserved
+# Author: Laurent Mazet
+# 
+# 2014-10-06 V1.0 : Creation 
+# 
+# ============================================================================
+
+DRY=
+FIRMWARE=/opt/trc6500/config/code_metier/libHwCtrl/Bitstream
+LIST="application.out production.bin ts12_fp_pano.bin ts22_fp_pano.bin firmware.out"
+HOST=
+TRC6500_SCRIPT_DIR=$(dirname $0)
+
+# help function
+
+function usage () {
+  echo "usage: $PROGNAME [-d] [-f dir] [-h] [-i host] [-l list]"
+  echo " -d: dry mode"
+  echo " -f: firmware directory ($FIRMWARE)"
+  echo " -h: help message"
+  echo " -i: board hostname (or ip)"
+  echo " -l: list of firmware ($LIST)"
+  exit $@
+  }
+
+# formating functions
+
+function title () { echo -e "\033[0;1m$*\033[0;0m"; }
+function pass () { echo -e "\033[1;32m$*\033[0;0m"; }
+function warn () { echo -e "\033[1;33m$*\033[0;0m"; }
+function fail () { echo -e "\033[1;31m$*\033[0;0m"; }
+
+# argument processing
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+    -d) DRY=yes;;
+    -f) shift; FIRMWARE=$1;;
+    -h) usage 0;;
+    -i) shift; HOST=$1;;
+    -l) shift; LIST=$1;;
+    *) usage 1;;
+    esac
+    shift
+done
+
+# check host
+
+[ "$HOST" ] || ping -c 1 $HOST >&/dev/null || \
+    { fail "Can't connect '$HOST'"; exit 1; }
+
+# check firmware
+
+for f in $LIST; do
+    [ -f $FIRMWARE/$f ] || { fail "Can't find '$FIRMWARE/$f'"; exit 1; }
+done
+
+# check mode
+
+protect=""
+[ "$DRY" = yes ] && protect="!echo"
+
+# flash firmware
+
+title "flash fe306 '$HOST'"
+
+ftp -n <<EOF
+open $HOST
+quote USER none
+quote PASS none
+binary
+cd flash
+$(for f in $LIST; do echo "$protect send $FIRMWARE/$f"; done)
+bye
+EOF
+
+# vim:set tabstop=4 shiftwidth=4 softtabstop=4:
diff --git a/trc6500-master-file/script/set_mediatray.tcl b/trc6500-master-file/script/set_mediatray.tcl
new file mode 100755 (executable)
index 0000000..02f76b2
--- /dev/null
@@ -0,0 +1,86 @@
+#!/usr/bin/expect
+
+# ============================================================================
+#
+# Copyright (C) THALES. All rights reserved
+# Author: Laurent Mazet
+# 
+# Script de connection au switchs
+#
+# 2014-10-06 V1.0 : Creation
+#
+# ============================================================================
+
+# default value
+set blade {0}
+set host ""
+set login "admin"
+set password "thalescom02"
+set prompt "system>"
+
+proc usage {script_name rc} {
+    puts "usage: [exec basename $script_name] \[host\] \[-b blade\] \[-h\] \[-l login\] \[-p password\] \[-x prompt\]"
+    exit $rc
+}
+
+# process argument
+set action ""
+for {set i 0} {$i < [llength $argv]} {incr i} {
+    set arg [lindex $argv $i]
+    switch $arg {
+        -b { set action "-blade" }
+        -h { usage $argv0 0 }
+        -l { set action "-login" }
+        -p { set action "-password" }
+        -x { set action "-prompt" }
+        default {
+            switch $action {
+                -blade { set blade $arg }
+                -login { set login $arg }
+                -password { set password $arg }
+                -prompt { set prompt $arg }
+                default { set host $arg }
+            }
+        set action ""
+        }
+    }
+}
+if {$action != ""} {
+    puts "missing arguments"
+    exit 1
+}
+if { $host == "" } {
+    usage $argv0 1
+}
+
+# start connection
+spawn telnet $host
+
+# login
+expect {
+    "username:" { send "$login\r" }
+    timeout { send_user "connection to host failed\n"; exit 1 }
+    eof { send_user "connection to host failed\n"; exit 1 }
+}
+
+
+# password
+expect {
+    "password:" { send "$password\r" }
+    timeout { send_user "connection to host failed\n"; exit 1 }
+    eof { send_user "connection to host failed\n"; exit 1 }
+}
+
+expect {
+    "$prompt" { send "mt -b $blade\r" }
+    "username:" { send_user "connection to host failed\n"; exit 1 }
+}
+
+expect {
+    "OK" { send "exit\r" }
+    "$prompt" { send_user "error\n"; exit 1 }
+}
+
+send_user "\n"
+exit 0
+# vim:set tabstop=4 shiftwidth=4 softtabstop=4: