From: Laurent Mazet Date: Mon, 15 Jun 2015 09:51:43 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/dev_tr65_ole_1086_simple_cdd' X-Git-Tag: debian_7.8.2~3 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=51a972c379cff3eb82e8dcf3cdccc58bd6b23cdf;hp=f57881d3258417af2562d10549b0434097f30146;p=debian6500.git Merge remote-tracking branch 'origin/dev_tr65_ole_1086_simple_cdd' --- diff --git a/master/etc/cron.d/getswitchtemp b/master/etc/cron.d/getswitchtemp index 40140af..e76173b 100644 --- a/master/etc/cron.d/getswitchtemp +++ b/master/etc/cron.d/getswitchtemp @@ -1,2 +1,2 @@ # m h dom mon dow user command -0-59/5 * * * * root /root/bin/getswitchtemp +0-59/5 * * * * root /root/bin/get_switch_temperature diff --git a/master/etc/dhcp/dhcpd.conf.cl0 b/master/etc/dhcp/dhcpd.conf.cl0 index 35ee1e2..4470309 100644 --- a/master/etc/dhcp/dhcpd.conf.cl0 +++ b/master/etc/dhcp/dhcpd.conf.cl0 @@ -54,87 +54,77 @@ subnet 10.133.26.0 netmask 255.255.255.0 # liste des lames a completer dans l'ordre de la baie #lame fusion, pistage, LSU -host trc01-rf { hardware ethernet 00:25:90:8A:B2:08; fixed-address 10.133.26.161;} +host trc01 { hardware ethernet 00:25:90:8A:B2:08; fixed-address 10.133.26.161;} #lames gonio -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;} +host trc02 { hardware ethernet 00:25:90:4F:1E:8C; fixed-address 10.133.26.162;} +host trc03 { hardware ethernet 00:25:90:4F:23:9E; fixed-address 10.133.26.163;} +host trc04 { hardware ethernet 00:25:90:4F:23:A4; fixed-address 10.133.26.164;} +host trc05 { hardware ethernet 00:25:90:4F:18:62; fixed-address 10.133.26.165;} +host trc06 { hardware ethernet 00:25:90:4F:18:58; fixed-address 10.133.26.166;} +host trc07 { hardware ethernet 00:25:90:4F:1A:28; fixed-address 10.133.26.167;} +host trc08 { hardware ethernet 00:25:90:4F:BB:72; fixed-address 10.133.26.168;} +host trc09 { hardware ethernet 00:25:90:4F:BB:22; fixed-address 10.133.26.169;} +host trc10 { hardware ethernet 00:25:90:4F:BA:F2; fixed-address 10.133.26.170;} +host trc11 { hardware ethernet 00:25:90:4F:BA:F0; fixed-address 10.133.26.171;} +host trc12 { hardware ethernet 00:25:90:4f:bb:1e; fixed-address 10.133.26.172;} +host trc13 { hardware ethernet 00:25:90:4F:23:D4; fixed-address 10.133.26.173;} +host trc14 { hardware ethernet 00:25:90:4F:23:Dc; fixed-address 10.133.26.174;} +host trc15 { hardware ethernet 00:25:90:4F:BB:20; fixed-address 10.133.26.175;} +host trc16 { hardware ethernet 00:25:90:4F:E1:66; fixed-address 10.133.26.176;} +host trc17 { hardware ethernet 00:25:90:4F:EA:20; fixed-address 10.133.26.177;} +host trc18 { hardware ethernet 00:25:90:4F:E2:D2; fixed-address 10.133.26.178;} +host trc19 { hardware ethernet 00:25:90:4F:EF:00; fixed-address 10.133.26.179;} +host trc20 { hardware ethernet 00:25:90:4F:E8:0A; fixed-address 10.133.26.180;} +host trc21 { hardware ethernet 00:25:90:4F:C3:3C; fixed-address 10.133.26.181;} +host trc22 { hardware ethernet 00:25:90:4F:BB:68; fixed-address 10.133.26.182;} +host trc23 { hardware ethernet 00:25:90:4F:E1:62; fixed-address 10.133.26.183;} +host trc24 { hardware ethernet 00:25:90:4F:e4:86; fixed-address 10.133.26.184;} +host trc25 { hardware ethernet 00:25:90:4F:bb:74; fixed-address 10.133.26.185;} #lames monitoring -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 trc26 { hardware ethernet 00:25:90:4F:BB:6E; fixed-address 10.133.26.186;} +host trc27 { 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; -} +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:C2; fixed-address 10.133.26.191;} #lame fusion, pistage, LSU -host trc01 { hardware ethernet 00:25:90:8A:B2:09; fixed-address 10.133.28.161;} +#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;} +#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 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;} +#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/hosts.12MHzDF b/master/etc/hosts.12MHzDF index b15f044..a6bed03 100644 --- a/master/etc/hosts.12MHzDF +++ b/master/etc/hosts.12MHzDF @@ -12,24 +12,24 @@ ff02::3 ip6-allhosts # Reseau 10.133.26.0 # =============================== -10.133.26.160 trc00-rf maitre-rf sup-rf fusion-rf enr00-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.160 trc00 maitre sup fusion enr00 nfsserver +10.133.26.161 trc01 lsu +10.133.26.162 trc02 gon00 +10.133.26.163 trc03 gon01 +10.133.26.164 trc04 gon02 +10.133.26.165 trc05 gon03 +10.133.26.166 trc06 gon04 +10.133.26.167 trc07 gon05 +10.133.26.168 trc08 gon06 +10.133.26.169 trc09 gon07 +10.133.26.170 trc10 gon08 +10.133.26.171 trc11 gon09 +10.133.26.172 trc12 gon10 +10.133.26.173 trc13 gon11 +10.133.26.174 trc14 gon12 +10.133.26.175 trc15 gon13 +10.133.26.176 trc16 gon14 +10.133.26.177 trc17 gon15 10.133.26.231 swg swg1 @@ -38,38 +38,19 @@ ff02::3 ip6-allhosts # =============================== # prod fe306 1 110->118 -10.133.28.110 fe306-1 +10.133.26.110 fe306-1 # prod fe306 2 120->1285 -10.133.28.120 fe306-2 +10.133.26.120 fe306-2 # prod fe306 3 130->138 -10.133.28.130 fe306-3 +10.133.26.130 fe306-3 # prod fe306 4 140->148 -10.133.28.140 fe306-4 +10.133.26.140 fe306-4 # prod fe306 5 150->158 -10.133.28.150 fe306-5 +10.133.26.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.231 swm 10.133.28.253 matrix diff --git a/master/etc/hosts.30MHzMDF b/master/etc/hosts.30MHzMDF index e6efa49..638e5a6 100644 --- a/master/etc/hosts.30MHzMDF +++ b/master/etc/hosts.30MHzMDF @@ -12,34 +12,34 @@ ff02::3 ip6-allhosts # Reseau 10.133.26.0 # =============================== -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.160 trc00 maitre sup fusion nfsserver +10.133.26.161 trc01 lsu +10.133.26.162 trc02 gon00 +10.133.26.163 trc03 gon01 +10.133.26.164 trc04 gon02 +10.133.26.165 trc05 gon03 +10.133.26.166 trc06 gon04 +10.133.26.167 trc07 gon05 +10.133.26.168 trc08 gon06 +10.133.26.169 trc09 gon07 +10.133.26.170 trc10 gon08 +10.133.26.171 trc11 gon09 +10.133.26.172 trc12 gon10 +10.133.26.173 trc13 gon11 +10.133.26.174 trc14 gon12 +10.133.26.175 trc15 gon13 +10.133.26.176 trc16 gon14 +10.133.26.177 trc17 gon15 +10.133.26.178 trc18 gon16 +10.133.26.179 trc19 gon17 +10.133.26.180 trc20 gon18 +10.133.26.181 trc21 gon19 +10.133.26.182 trc22 gon20 +10.133.26.183 trc23 gon21 +10.133.26.184 trc24 gon22 +10.133.26.185 trc25 gon23 +10.133.26.186 trc26 mon00 +10.133.26.187 trc27 mon01 10.133.26.231 swg swg1 10.133.26.232 swg2 @@ -49,50 +49,19 @@ ff02::3 ip6-allhosts # =============================== # prod fe306 1 110->118 -10.133.28.110 fe306-1 +10.133.26.110 fe306-1 # prod fe306 2 120->128 -10.133.28.120 fe306-2 +10.133.26.120 fe306-2 # prod fe306 3 130->138 -10.133.28.130 fe306-3 +10.133.26.130 fe306-3 # prod fe306 4 140->148 -10.133.28.140 fe306-4 +10.133.26.140 fe306-4 # prod fe306 5 150->158 -10.133.28.150 fe306-5 +10.133.26.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.28.231 swm - 10.133.28.253 matrix 10.133.28.254 gps diff --git a/master/etc/inetd.conf b/master/etc/inetd.conf deleted file mode 100644 index cc53dd7..0000000 --- a/master/etc/inetd.conf +++ /dev/null @@ -1,49 +0,0 @@ -# /etc/inetd.conf: see inetd(8) for further informations. -# -# Internet superserver configuration database -# -# -# Lines starting with "#:LABEL:" or "##" should not -# be changed unless you know what you are doing! -# -# If you want to disable an entry so it isn't touched during -# package updates just comment it out with a single '#' character. -# -# Packages should modify this file by using update-inetd(8) -# -# -# -#:INTERNAL: Internal services -#discard stream tcp nowait root internal -#discard dgram udp wait root internal -#daytime stream tcp nowait root internal -#time stream tcp nowait root internal - -#:STANDARD: These are standard services. - -#:BSD: Shell, login, exec and talk are BSD protocols. - -#:MAIL: Mail, news and uucp services. - -#:INFO: Info services - -#:BOOT: TFTP service is provided primarily for booting. Most sites -# run this only on machines acting as "boot servers." -# ============================================================================ -# V1.0 -# Copyright (C) THALES. All rights reserved -# Author: Herve Petit -# Date : 03/09/2010 -# Modification: -# - Suppression demarrage serveur tftp pour qu'il ne soit pas en concurrence -# du serveur atftpd lance en stand alone du capteur -# ============================================================================ -#tftp dgram udp4 wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftp - -#:RPC: RPC based services - -#:HAM-RADIO: amateur-radio services - -#:OTHER: Other services -## netbios-ssn stream tcp nowait root /usr/sbin/tcpd /usr/sbin/smbd - diff --git a/master/etc/initramfs-tools/scripts/tftp b/master/etc/initramfs-tools/scripts/tftp index 4e6caa0..6847ffb 100644 --- a/master/etc/initramfs-tools/scripts/tftp +++ b/master/etc/initramfs-tools/scripts/tftp @@ -2,10 +2,8 @@ mountroot () { - # configure ethernet ipconfig -c dhcp eth0 - ipconfig -c dhcp eth1 mount -t ramfs /dev/ram0 ${rootmnt} @@ -13,10 +11,10 @@ mountroot () for f in $(echo ${tarballs} | sed 's/,/ /g'); do log_begin_msg "download $f" tftp -b 32764 -g -r $f ${tftpserver} - log_begin_msg "Extract $f into ${rootmnt}" - log_end_msg - tar xzf $f -C ${rootmnt} || exec /bin/sh - rm -f $f + log_begin_msg "Extract $f into ${rootmnt}" + log_end_msg + tar xzf $f -C ${rootmnt} || exec /bin/sh + rm -f $f done # remove files predeced by tilde diff --git a/master/etc/network/interfaces b/master/etc/network/interfaces index 843ddaa..a8c838a 100644 --- a/master/etc/network/interfaces +++ b/master/etc/network/interfaces @@ -13,6 +13,11 @@ iface eth0 inet static network 10.133.26.0 broadcast 10.133.26.255 pre-up ip addr flush dev eth0 + post-up ip addr add 10.133.28.160/24 dev eth0 + # Sensor prod + post-up ip route add 225.0.0.0/8 dev eth0 + # FE306 authentification + post-up ip route add 238.0.0.0/24 dev eth0 # FE306 pano post-up ip route add 238.75.0.0/16 dev eth0 # FE306 WP channels @@ -20,25 +25,10 @@ iface eth0 inet static # => 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 - - -# The secondary network interface -auto eth1 -iface eth1 inet static - address 10.133.28.160 - netmask 255.255.255.0 - network 10.133.28.0 - broadcast 10.133.28.255 - gateway 10.133.28.231 - pre-up ip addr flush dev eth1 - # FE306 authentification - post-up ip route add 238.0.0.0/24 dev eth1 # 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 eth1 + 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 eth1 - # Sensor prod - post-up ip route add 225.0.0.0/8 dev eth1 + post-up ip route add 239.0.0.0/8 dev eth0 diff --git a/master/opt/bios/bios-3.0.cfg b/master/opt/bios/bios-3.0.cfg index bdf228a..73198e3 100644 --- a/master/opt/bios/bios-3.0.cfg +++ b/master/opt/bios/bios-3.0.cfg @@ -3022,8 +3022,8 @@ Token =179 // Do NOT change this line Offset =1EA Width =01 BIOS Default =[01]Enabled -Options =*[00]Disabled // Move "*" to the desired Option - [01]Enabled +Options =[00]Disabled // Move "*" to the desired Option + *[01]Enabled Setup Question = Load Onboard LAN 2 Option ROM Token =17A // Do NOT change this line diff --git a/master/opt/bios/bios-3.10.cfg b/master/opt/bios/bios-3.10.cfg index 79480a1..6c7cdb6 100644 --- a/master/opt/bios/bios-3.10.cfg +++ b/master/opt/bios/bios-3.10.cfg @@ -3095,8 +3095,8 @@ Token =17E // Do NOT change this line Offset =1F0 Width =01 BIOS Default =[01]Enabled -Options =*[00]Disabled // Move "*" to the desired Option - [01]Enabled +Options =[00]Disabled // Move "*" to the desired Option + *[01]Enabled Setup Question = Load Onboard LAN 2 Option ROM Token =17F // Do NOT change this line diff --git a/master/opt/bios/bios-3.11.cfg b/master/opt/bios/bios-3.11.cfg index c04751e..560114b 100644 --- a/master/opt/bios/bios-3.11.cfg +++ b/master/opt/bios/bios-3.11.cfg @@ -3850,8 +3850,8 @@ Token =1D7 // Do NOT change this line Offset =21F Width =01 BIOS Default =[01]Enabled -Options =[00]Disabled // Move "*" to the desired Option - *[01]Enabled +Options =*[00]Disabled // Move "*" to the desired Option + [01]Enabled Setup Question = Load Onboard LAN 2 Option ROM Token =1D8 // Do NOT change this line diff --git a/master/opt/cluster/slave/etc/network/interfaces b/master/opt/cluster/slave/etc/network/interfaces index 769f4e3..c65d746 100644 --- a/master/opt/cluster/slave/etc/network/interfaces +++ b/master/opt/cluster/slave/etc/network/interfaces @@ -16,20 +16,14 @@ iface eth0 inet dhcp # => 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 - - -# The secondary network interface -auto eth1 -iface eth1 inet dhcp - pre-up ip addr flush dev eth1 - # FE306 authentification - post-up ip route add 238.0.0.0/24 dev eth1 # 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 eth1 + 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 eth1 + 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 eth1 + post-up ip route add 225.0.0.0/8 dev eth0 diff --git a/master/opt/tftp/pxelinux.cfg/.default.swp b/master/opt/tftp/pxelinux.cfg/.default.swp new file mode 100644 index 0000000..1591012 Binary files /dev/null and b/master/opt/tftp/pxelinux.cfg/.default.swp differ diff --git a/master/opt/tftp/pxelinux.cfg/default b/master/opt/tftp/pxelinux.cfg/default index a801909..c0b767a 100644 --- a/master/opt/tftp/pxelinux.cfg/default +++ b/master/opt/tftp/pxelinux.cfg/default @@ -12,7 +12,7 @@ LABEL debian MENU LABEL ^Debian 7 (TRC6500) KERNEL /vmlinuz INITRD /initrd.img - APPEND noinitrd ramdisk_size=8192 boot=tftp fastboot tftpserver=10.133.28.160 tarballs=root.tgz,slave.tgz + APPEND noinitrd ramdisk_size=8192 boot=tftp fastboot tftpserver=10.133.26.160 tarballs=root.tgz,slave.tgz LABEL freedos MENU LABEL ^FreeDos 1.0 diff --git a/master/opt/tftp/swg1.txt b/master/opt/tftp/swg1.txt index 0e9bf71..2f63163 100644 --- a/master/opt/tftp/swg1.txt +++ b/master/opt/tftp/swg1.txt @@ -1,7 +1,6 @@ - -! -! 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 +macro name VERSION +macro description 2.3 full-duplex +@ ! version 12.2 no service pad @@ -21,10 +20,6 @@ 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 @@ -47,6 +42,9 @@ spanning-tree extend system-id ! vlan internal allocation policy ascending ! +vlan 10 + name IFORMATION-SYSTEM +! ! ! interface Port-channel1 @@ -60,222 +58,222 @@ interface FastEthernet1 ! interface GigabitEthernet1/1 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/2 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/3 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/4 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/5 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/6 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/7 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/8 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/9 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/10 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/11 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/12 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/13 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/14 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/15 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/16 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/17 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/18 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/19 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/20 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/21 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/22 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/23 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/24 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/25 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/26 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/27 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/28 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/29 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/30 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/31 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/32 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/33 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/34 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/35 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/36 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/37 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/38 speed auto - duplex auto + duplex full spanning-tree portfast ! interface GigabitEthernet1/39 - speed auto - duplex auto + speed 100 + duplex full spanning-tree portfast ! interface GigabitEthernet1/40 - speed auto - duplex auto + speed 100 + duplex full spanning-tree portfast ! interface GigabitEthernet1/41 - speed auto - duplex auto + speed 100 + duplex full spanning-tree portfast ! interface GigabitEthernet1/42 - speed auto - duplex auto + speed 100 + duplex full spanning-tree portfast ! interface GigabitEthernet1/43 - speed auto - duplex auto + speed 100 + duplex full spanning-tree portfast ! interface GigabitEthernet1/44 - speed auto - duplex auto + speed 100 + duplex full spanning-tree portfast ! interface GigabitEthernet1/45 @@ -297,6 +295,8 @@ interface GigabitEthernet1/47 spanning-tree portfast ! interface GigabitEthernet1/48 + switchport access vlan 10 + switchport mode access media-type rj45 speed auto duplex auto @@ -315,14 +315,23 @@ 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.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 ! @@ -342,8 +351,7 @@ line vty 5 15 password 7 120D0D161E0E1F login ! -ntp clock-period 17179537 +ntp clock-period 17179594 +ntp server 10.133.26.254 ntp server 10.133.26.160 -ntp server 10.133.28.160 -ntp server 10.133.28.254 end diff --git a/master/opt/tftp/swg2.txt b/master/opt/tftp/swg2.txt index de2b904..1f0d9e0 100644 --- a/master/opt/tftp/swg2.txt +++ b/master/opt/tftp/swg2.txt @@ -1,7 +1,6 @@ - -! -! 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 +macro name VERSION +macro description 2.3 full-duplex +@ ! version 12.2 no service pad @@ -21,10 +20,6 @@ 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 @@ -49,6 +44,9 @@ vlan internal allocation policy ascending ! ! ! +! +! +! interface Port-channel1 switchport ! @@ -297,6 +295,8 @@ interface GigabitEthernet1/47 spanning-tree portfast ! interface GigabitEthernet1/48 +! +! media-type rj45 speed auto duplex auto @@ -315,15 +315,24 @@ 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 ! ! @@ -342,8 +351,7 @@ line vty 5 15 password 7 120D0D161E0E1F login ! -ntp clock-period 17179537 +ntp clock-period 17179594 +ntp server 10.133.26.254 ntp server 10.133.26.160 -ntp server 10.133.28.160 -ntp server 10.133.28.254 end diff --git a/master/opt/tftp/swm.txt b/master/opt/tftp/swm.txt index c635690..e164445 100644 --- a/master/opt/tftp/swm.txt +++ b/master/opt/tftp/swm.txt @@ -1,7 +1,6 @@ - -! -! 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 +macro name VERSION +macro description 2.3 +@ ! version 12.2 no service pad @@ -21,10 +20,6 @@ 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_swm_integration.tcl b/master/root/bin/conf_swm_integration.tcl index 0afda89..8230cf9 100755 --- a/master/root/bin/conf_swm_integration.tcl +++ b/master/root/bin/conf_swm_integration.tcl @@ -2,13 +2,13 @@ set sub [lrange $argv 0 0] if { $sub == "" } { set sub "1" } -spawn telnet swm +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 } + "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" } @@ -19,7 +19,7 @@ expect -exact "#" { send "vlan 192\r" } expect -exact "#" { send "name Integration\r" } expect -exact "#" { send "exit\r" } -expect -exact "#" { send "interface gigabitEthernet 1/45\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" } diff --git a/master/root/bin/deploiement_conf_reseau_integration.sh b/master/root/bin/deploiement_conf_reseau_integration.sh index 8ab7d74..dbdb5e2 100755 --- a/master/root/bin/deploiement_conf_reseau_integration.sh +++ b/master/root/bin/deploiement_conf_reseau_integration.sh @@ -40,12 +40,12 @@ done # Attribution adresse IP au capteur dans le domaine 192.168.$SUB.0 -ifconfig eth1:2 192.168.$SUB.160 +ip addr add 192.168.$SUB.160/24 dev eth0 # Definition des routes supplementaires -route add 192.168.$SUB.160 gw 192.168.$SUB.231 -route add 192.168.$SUB.231 gw 192.168.$SUB.160 -route add 192.168.0.53 gw 192.168.$SUB.160 +ip route add 192.168.$SUB.160 via 192.168.$SUB.231 dev eth0 +ip route add 192.168.$SUB.231 via 192.168.$SUB.160 dev eth0 +ip route add 192.168.0.53 via 192.168.$SUB.160 dev eth0 if [ $SWITCH -eq 1 ]; then # Recuperation du chemin pour executer le script du switch depuis un chemin quelconque diff --git a/simple-cdd/TRC6500.pub b/simple-cdd/TRC6500.pub new file mode 100644 index 0000000..184aeee Binary files /dev/null and b/simple-cdd/TRC6500.pub differ diff --git a/simple-cdd/additional_scripts/change_configuration.sh b/simple-cdd/additional_scripts/change_configuration.sh new file mode 100755 index 0000000..918b64e --- /dev/null +++ b/simple-cdd/additional_scripts/change_configuration.sh @@ -0,0 +1,164 @@ +#!/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 " + 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 new file mode 100755 index 0000000..5c17bf2 --- /dev/null +++ b/simple-cdd/additional_scripts/check_network.sh @@ -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/simple-cdd/additional_scripts/configure_fe306.sh b/simple-cdd/additional_scripts/configure_fe306.sh new file mode 100755 index 0000000..a9de411 --- /dev/null +++ b/simple-cdd/additional_scripts/configure_fe306.sh @@ -0,0 +1,182 @@ +#!/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 ]" + 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.28.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 new file mode 100755 index 0000000..0473f15 --- /dev/null +++ b/simple-cdd/additional_scripts/configure_matrix.tcl @@ -0,0 +1,41 @@ +#!/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 +# ============================================================================ + +set ipmaxtrix "10.133.28.253" + +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.028.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 new file mode 100755 index 0000000..8e2af2f --- /dev/null +++ b/simple-cdd/additional_scripts/configure_switch.tcl @@ -0,0 +1,50 @@ +#!/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 { $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 new file mode 100755 index 0000000..873b674 --- /dev/null +++ b/simple-cdd/additional_scripts/configure_switch_bootstrap.tcl @@ -0,0 +1,47 @@ +#!/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 { $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 new file mode 100755 index 0000000..5f2299e --- /dev/null +++ b/simple-cdd/additional_scripts/connect_switch.tcl @@ -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/simple-cdd/additional_scripts/flash_fe306.sh b/simple-cdd/additional_scripts/flash_fe306.sh new file mode 100755 index 0000000..b728862 --- /dev/null +++ b/simple-cdd/additional_scripts/flash_fe306.sh @@ -0,0 +1,84 @@ +#!/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 <" + +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 new file mode 100644 index 0000000..f2ed7bb --- /dev/null +++ b/simple-cdd/deb_build/Makefile @@ -0,0 +1,64 @@ +# -*- 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 new file mode 100644 index 0000000..cd5ac03 --- /dev/null +++ b/simple-cdd/deb_build/debian-binary @@ -0,0 +1 @@ +2.0 diff --git a/simple-cdd/deb_build/debian/debian-changelog b/simple-cdd/deb_build/debian/debian-changelog new file mode 100644 index 0000000..72d5aea --- /dev/null +++ b/simple-cdd/deb_build/debian/debian-changelog @@ -0,0 +1,14 @@ +trc6500-master-files (7.8.1-1) unstable; urgency=low + + * .deb packaging + + -- Olivier Leobal 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 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 new file mode 100644 index 0000000..d8fef16 --- /dev/null +++ b/simple-cdd/deb_build/debian/debian-control @@ -0,0 +1,9 @@ +Section: TRC6500 +Priority: important +Version: @@version@@ +Architecture: all +Package: trc6500-master-files +Maintainer: Olivier Léobal +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 new file mode 100755 index 0000000..e26e741 --- /dev/null +++ b/simple-cdd/deb_build/debian/debian-postinst @@ -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..' +[ -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 new file mode 100755 index 0000000..b97cb85 --- /dev/null +++ b/simple-cdd/deb_build/debian/debian-postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +# list of diverts diff --git a/simple-cdd/deb_build/debian/debian-preinst b/simple-cdd/deb_build/debian/debian-preinst new file mode 100755 index 0000000..7d1b6f3 --- /dev/null +++ b/simple-cdd/deb_build/debian/debian-preinst @@ -0,0 +1,3 @@ +#!/bin/bash + +# list of diverts diff --git a/simple-cdd/deb_build/master-files b/simple-cdd/deb_build/master-files new file mode 120000 index 0000000..eeb5f92 --- /dev/null +++ b/simple-cdd/deb_build/master-files @@ -0,0 +1 @@ +../../master/ \ No newline at end of file diff --git a/simple-cdd/deb_build/readme b/simple-cdd/deb_build/readme new file mode 100644 index 0000000..1b2e764 --- /dev/null +++ b/simple-cdd/deb_build/readme @@ -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/simple-cdd/local_packages/cpumon_2.4-1_amd64.deb b/simple-cdd/local_packages/cpumon_2.4-1_amd64.deb new file mode 100644 index 0000000..5aa387b Binary files /dev/null and b/simple-cdd/local_packages/cpumon_2.4-1_amd64.deb differ 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 new file mode 100644 index 0000000..bf5bfe3 Binary files /dev/null and b/simple-cdd/local_packages/dce_1.10.2-1_all.deb differ diff --git a/simple-cdd/local_packages/dce_1.10.3-1_all.deb b/simple-cdd/local_packages/dce_1.10.3-1_all.deb new file mode 100644 index 0000000..abe3cb8 Binary files /dev/null and b/simple-cdd/local_packages/dce_1.10.3-1_all.deb differ diff --git a/simple-cdd/local_packages/firmware-bnx2_0.36+wheezy.1_all.deb b/simple-cdd/local_packages/firmware-bnx2_0.36+wheezy.1_all.deb new file mode 100644 index 0000000..6dcbe72 Binary files /dev/null and b/simple-cdd/local_packages/firmware-bnx2_0.36+wheezy.1_all.deb differ diff --git a/simple-cdd/local_packages/libcalloc1_1.2.1-1_amd64.deb b/simple-cdd/local_packages/libcalloc1_1.2.1-1_amd64.deb new file mode 100644 index 0000000..62d749e Binary files /dev/null and b/simple-cdd/local_packages/libcalloc1_1.2.1-1_amd64.deb differ diff --git a/simple-cdd/local_packages/libcycle1_1.4.0-1_amd64.deb b/simple-cdd/local_packages/libcycle1_1.4.0-1_amd64.deb new file mode 100644 index 0000000..d898e18 Binary files /dev/null and b/simple-cdd/local_packages/libcycle1_1.4.0-1_amd64.deb differ diff --git a/simple-cdd/local_packages/libdebug1_1.2.1-1_amd64.deb b/simple-cdd/local_packages/libdebug1_1.2.1-1_amd64.deb new file mode 100644 index 0000000..0684b0f Binary files /dev/null and b/simple-cdd/local_packages/libdebug1_1.2.1-1_amd64.deb 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 new file mode 100644 index 0000000..1ca9ed9 Binary files /dev/null and b/simple-cdd/local_packages/libmadb-dev_0.8.1-1_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 new file mode 100644 index 0000000..31d8bd1 Binary files /dev/null and b/simple-cdd/local_packages/libmadb0_0.8.1-1_amd64.deb differ diff --git a/simple-cdd/local_packages/libmcore1_1.2.1-2_amd64.deb b/simple-cdd/local_packages/libmcore1_1.2.1-2_amd64.deb new file mode 100644 index 0000000..9a90821 Binary files /dev/null and b/simple-cdd/local_packages/libmcore1_1.2.1-2_amd64.deb differ diff --git a/simple-cdd/local_packages/raf_1.0.0-1_all.deb b/simple-cdd/local_packages/raf_1.0.0-1_all.deb new file mode 100644 index 0000000..42b7eb7 Binary files /dev/null and b/simple-cdd/local_packages/raf_1.0.0-1_all.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 new file mode 100644 index 0000000..7d7706d Binary files /dev/null and b/simple-cdd/local_packages/swb_1.2.0-1_all.deb differ diff --git a/simple-cdd/local_packages/swb_1.2.1-1_all.deb b/simple-cdd/local_packages/swb_1.2.1-1_all.deb new file mode 100644 index 0000000..2c005b9 Binary files /dev/null and b/simple-cdd/local_packages/swb_1.2.1-1_all.deb 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 new file mode 100644 index 0000000..2b43dae Binary files /dev/null and b/simple-cdd/local_packages/webconfig_1.12.5-2_all.deb 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 new file mode 100644 index 0000000..fc32b7c Binary files /dev/null and b/simple-cdd/local_packages/webconfig_1.12.6-1_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 new file mode 100644 index 0000000..06b2c33 Binary files /dev/null and b/simple-cdd/local_packages/xcfe_1.6.2-1_all.deb 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 new file mode 100644 index 0000000..ccdc238 Binary files /dev/null and b/simple-cdd/local_packages/xcfe_1.6.3-1_all.deb differ diff --git a/simple-cdd/myrc.local b/simple-cdd/myrc.local new file mode 100755 index 0000000..c47d25d --- /dev/null +++ b/simple-cdd/myrc.local @@ -0,0 +1,30 @@ +#!/bin/sh + +# this file will replace /etc/rc.local for the first boot of the machine. Before that, we'll have saved the original rc.local as rc.local.original and we'll restore it at the end of this script. + + +# our own /etc/network/interfaces gets written over for some reason, lets put it back where it belongs +echo '(trc6500 first boot) Replacing the /etc/network/interfaces file..' +logger -t 'trc6500 first boot' 'Replacing the /etc/network/interfaces file..' +rm -f /etc/network/interfaces +mv /etc/network/interfaces.original /etc/network/interfaces +# interfaces.new was hopefully created during the install, after master.tar was unpacked + +echo '(trc6500 first boot) Done replacing interfaces file.' + + +# we generate the tarballs given to the slave blades here, since if we do it during install they might get "locked" versions of files +echo '(trc6500 first boot) Generating tarballs..' +logger -t 'trc6500 first boot' 'Generating tarballs..' +cd /opt/cluster +make all +echo '(trc6500 first boot) Done generating.' + + +# now let's delete this script and replace it with the vanilla one +echo '(trc6500 first boot) Replacing this script with original /etc/rc.local..' +logger -t 'trc6500 first boot' 'Replacing this script with original /etc/rc.local..' +rm -f /etc/rc.local && mv /etc/rc.local.original /etc/rc.local +echo '(trc6500 first boot) Done replacing' + +exit 0 diff --git a/simple-cdd/profiles/trc6500.description b/simple-cdd/profiles/trc6500.description new file mode 100644 index 0000000..2e4bafa --- /dev/null +++ b/simple-cdd/profiles/trc6500.description @@ -0,0 +1 @@ +Everything you need for your master blade. diff --git a/simple-cdd/profiles/trc6500.packages b/simple-cdd/profiles/trc6500.packages new file mode 100644 index 0000000..ff98d74 --- /dev/null +++ b/simple-cdd/profiles/trc6500.packages @@ -0,0 +1,284 @@ +# Most of this is coming from (debian6500 repo)/master/root/debian-list.txt which provided a list of packages to install after the OS install. We'll be doing that all at once. + +acpi +acpi-support-base +acpid +adduser +apt +apt-listchanges +apt-utils +aptitude +aptitude-common +at +atftpd +base-files +base-passwd +bash +bash-completion +bc +bind9-host +bsd-mailx +bsdmainutils +bsdutils +build-essential +busybox +bzip2 +cdrdao +chrony +console-setup +coreutils +cpio +cpumon +cron +curl +daemon +dash +db5.1-util +dc +dce +debconf +debconf-i18n +debian-archive-keyring +debianutils +deborphan +diffutils +discover +dmidecode +dnsutils +dosfstools +dpkg +e2fslibs +e2fsprogs +eject +etherwake +ethtool +expect +fakeroot +file +findutils +#firmware-bnx2 refuses to be added to local packages, we'll install it in postinst manually +#firmware-bnx2 +firmware-linux-free +fonts-liberation +freeipmi-tools +ftp +gawk +gcc-4.7-base +gdb +gettext-base +git +gnupg +gnuplot-nox +gnuplot +gpgv +gpm +grep +groff-base +grub-common +grub-pc +gzip +hddtemp +hdparm +host +hostname +ifupdown +info +initramfs-tools +initscripts +insserv +install-info +installation-report +iperf +ipmitool +iproute +iptables +iptables-persistent +iptraf +iputils-ping +isc-dhcp-client +isc-dhcp-common +isc-dhcp-server +keyboard-configuration +kmod +laptop-detect +less +libacl1 +libapt-inst1.5 +libapt-pkg4.12 +libattr1 +libavahi-client3 +libavahi-common-data +libavahi-common3 +libblkid1 +libboost-iostreams1.49.0 +libbz2-1.0 +libc-bin +libc6 +libc6-i386 +libcalloc1 +libcap2-bin +libclass-accessor-perl +libcomerr2 +libcroco3 +libcups2 +libcwidget3 +libcycle1 +libdb5.1 +libdbus-1-3 +libdebug1 +libelfg0 +libept1.4.12 +libfile-copy-recursive-perl +libgcc1 +libgcrypt11 +libgdbm3 +libgnutls26 +libgpg-error0 +libidn11 +libjbig0 +libkmod2 +liblist-moreutils-perl +liblocale-gettext-perl +liblockfile-bin +liblog4cxx10 +liblzma5 +libmcore1 +libmount1 +libncurses5 +libncursesw5 +libnewt0.52 +libnfnetlink0 +libopenthreads14 +libp11-kit0 +libpam-modules +libpam-modules-bin +libpam-runtime +libpam0g +libpipeline1 +libpopt0 +libprocps0 +libreadline6 +librtmp0 +libselinux1 +libsemanage-common +libsemanage1 +libsepol1 +libsigc++-2.0-0c2a +libslang2 +libsqlite3-0 +libss2 +libssh2-1 +libssl1.0.0 +libstdc++6 +libsub-name-perl +libtasn1-3 +libtdb1 +libtext-charwidth-perl +libtext-iconv-perl +libtext-wrapi18n-perl +libtinfo5 +libudev0 +libusb-0.1-4 +libustr-1.0-1 +libuuid1 +libxapian22 +libxml-simple-perl +linux-image-amd64 +lm-sensors +locales +login +logrotate +lsb-base +lsof +ltrace +m4 +man-db +manpages +mawk +memstat +mlocate +mount +multiarch-support +mutt +nano +ncurses-base +ncurses-bin +net-tools +netbase +netcat-traditional +ntpdate +openssh-server +p7zip-full +par2 +passwd +patch +pciutils +pdmenu +perl-base +procmail +procps +psmisc +python-apt +python-reportbug +python-support +python-twisted-web +raf +readline-common +reportbug +rsync +rsyslog +samba-common-bin +screen +sed +sensible-utils +sensord +smbclient +snmp +snmpd +sshfs +ssmtp +strace +sudo +swb +syslinux +sysv-rc +sysvinit +sysvinit-utils +tar +task-english +task-file-server +task-ssh-server +tasksel +tasksel-data +tcl +tcpdump +telnet +texinfo +time +timelimit +tofrodos +traceroute +tzdata +udev +unrar-free +unzip +update-inetd +usbutils +util-linux +valgrind +vim +vim-common +vim-tiny +w3m +wakeonlan +webconfig +wget +whiptail +whois +winbind +wodim +xcfe +xz-utils +yasm +zip +zlib1g diff --git a/simple-cdd/profiles/trc6500.postinst b/simple-cdd/profiles/trc6500.postinst new file mode 100755 index 0000000..4a808e8 --- /dev/null +++ b/simple-cdd/profiles/trc6500.postinst @@ -0,0 +1,43 @@ +#!/bin/sh +# this file is executed right at the end of installation, just before reboot. +# it operates from the point of view of the target computer, so / is the target's HDD and so on +# importantly enough, this is actually followed-up after reboot by a custom /etc/rc.local file, which erases itself after running (so it only runs on first reboot) +# the (abundant) feedback messages should not be visible, but they should appear on the installer's syslog. Also yes, I know writing "task finished" after something that might fail isn't the greatest thing. +# note that much of what used to be here was put in the postinst file for the deb package we unpack + + +mount /dev/cdrom /media/cdrom + +# first we install the packages we couldn't install automatically +echo 'Installing additional package : firmware-bnx2..' +dpkg -i /media/cdrom/simple-cdd/firmware-bnx2_0.36+wheezy.1_all.deb +echo 'Additional packages installed.' + +#debugging +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 +chown root /etc/cron.d/getswitchtemp +chown root /root/bin/get_switch_temperature +echo 'Files unpacked.' + +echo 'Adding TRC6500 public key to keyring..' +cat /media/cdrom/simple-cdd/TRC6500.pub | apt-key add - +echo 'Key added.' + +# our interfaces file gets written over for some reason, we'll copy it and restore it on first boot +# note : after install, we'll be executing our own rc.local on first boot +echo 'Placing first-boot script (/etc/rc.local)..' +cp /etc/network/interfaces /etc/network/interfaces.original +mv /etc/rc.local /etc/rc.local.original +cp /media/cdrom/simple-cdd/myrc.local /etc/rc.local +echo 'Script copied.' + +echo 'Deleting simple-cdd files on disk..' +rm -r /usr/local/simple-cdd +rm -r /etc/dpkg/dpkg.cfg.d/trc6500 +echo 'Files deleted' + +umount /media/cdrom diff --git a/simple-cdd/profiles/trc6500.preseed b/simple-cdd/profiles/trc6500.preseed new file mode 100644 index 0000000..7e06ae2 --- /dev/null +++ b/simple-cdd/profiles/trc6500.preseed @@ -0,0 +1,91 @@ +# only ask important questions +#d-i debconf/priority string critical + + +# Locale & Timezone + +d-i clock-setup/ntp boolean false +d-i time/zone string Europe/Paris +# d-i debian-installer/language string en +# d-i debian-installer/country string FR +# d-i debian-installer/locale string en_US.UTF-8 +# note : although these could be preseeded in the default preseeds file (which is loaded before the others), I chose not to, so the install can be in any locale. The clock is preseeded, since else we have to wait for the NTP server connection to time out. + +# Network + +d-i netcfg/disable_autoconfig boolean true +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_netmask string 255.255.255.0 +d-i netcfg/get_gateway string 10.133.28.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. + + +# User configuration +# For these three I sometimes see d-i and sometimes passwd (as first argument). It seems to work like this. +passwd passwd/root-password password thales +passwd passwd/root-password-again password thales + +passwd passwd/user-fullname string trc6500 +passwd passwd/username string trc6500 +passwd passwd/user-password password thales +passwd passwd/user-password-again password thales + + +# Partitioning +# three partitions : +# - sda1 / 20GB ext4 +# - sda2 (none) 1G swap +# - sda3 /var/media/backup (remaining) ext4 +# Note that it will fail if you have less than 31 gigabytes it can use, obviously. + +# Oh yeah and also it DOES NOT FORMAT if it finds something suitable +# ie, if you're reinstalling over something similar, better format it BEFORE using this +# really sorry about it, but I couldn't find a way around that + +d-i partman-auto/disk string /dev/sda +d-i partman-auto/method string regular + + +d-i partman-auto/expert_recipe string \ + boot-root :: \ + 20000 20000 20000 ext4 \ + $primary{ } $bootable{ } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ / } \ + . \ + 1024 2048 1024 linux-swap \ + $primary{ } method{ swap } format{ } \ + . \ + 512 10000 -1 ext4 \ + $primary{ } method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ /var/media/backup } \ + . + +d-i partman-partitioning/confirm_write_new_label boolean true +d-i partman/choose_partition select finish +d-i partman/confirm boolean true +d-i partman/confirm_nooverwrite boolean true +d-i partman/mount_style select traditional + + +# GRUB configuration +grub grub-pc/install_devices multiselect /dev/sda +# unlike what the internet would tell you, sending this command to d-i doesn't work + +# iptables configuration + +iptables-persistent iptables-persistent/autosave_v6 boolean false +iptables-persistent iptables-persistent/autosave_v4 boolean false + +# APT configuration +d-i apt-setup/use_mirror boolean false +popularity-contest popularity-contest/participate boolean false + diff --git a/simple-cdd/readme b/simple-cdd/readme new file mode 100644 index 0000000..cd58b5c --- /dev/null +++ b/simple-cdd/readme @@ -0,0 +1,64 @@ +** 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 .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="," 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 /dev/ && sync + 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 + + +** 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/simple-cdd.conf b/simple-cdd/simple-cdd.conf new file mode 100644 index 0000000..ae6faff --- /dev/null +++ b/simple-cdd/simple-cdd.conf @@ -0,0 +1,29 @@ +# simple-cdd configuration file + +# 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" + +# Profiles to include on the CD +profiles="trc6500" +build_profiles="trc6500" +auto_profiles="trc6500" + +do_mirror="false" +profiles_udeb_dist="wheezy" +mirror_component="main" +mirror_tools="wget" +# default for mirror_tools is "wget reprepro". However, if we use reprepro, build-simple-cdd doesn't read the local_packages option, because it assumes reprepro has already built those into the mirror. But we're not building the mirror here, so we never actually get them. If we disable reprepro, it will actually look into local_packages. +# Note that all this was because we were using the previously-built mirror in ./tmp instead of being connected to a repository like we'd normally do. If you don't do that just delete those things. + +# Packages that couldn't be included in the /tmp mirror, so we put them there instead +local_packages="${working_dir}/local_packages" + +# we'll unpack that during install +# 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" + +# added value +export SPLASHPNG="${working_dir}/splash-thales.png" diff --git a/simple-cdd/splash-thales.png b/simple-cdd/splash-thales.png new file mode 100644 index 0000000..56b52ea Binary files /dev/null and b/simple-cdd/splash-thales.png differ