update gitignore
[debian6500.git] / master / opt / cluster / acq / etc / rc.local
1 #!/bin/bash
2 #
3 # rc.local
4 #
5 # This script is executed at the end of each multiuser runlevel.
6 # Make sure that the script will "exit 0" on success or any other
7 # value on error.
8 #
9 # In order to enable or disable this script just change the execution
10 # bits.
11
12 # set eth interrupts on core 0-4
13 core=(1 2 4 8 10)
14 for j in $(seq 0 5); do
15 for i in $(cat /proc/interrupts |awk '/eth'$j'/ {sub(/:/, "");; print $1}'); do
16 echo ${core[$l]} > /proc/irq/$i/smp_affinity
17 let l++;
18 [ $l -eq ${#core[*]} ] && l=0
19 done
20 done
21
22 # check eth2-5 (issue with client blade)
23 ip addr | awk '/: / {sub(/:/, "", $2); eth=$2} /inet / {print eth, $2}' > /root/ip.addr
24 for i in $(seq 2 5); do
25 interface=eth$i
26 grep -q $interface /root/ip.addr || { ifdown $interface; ifup $interface; }
27 done
28
29 # remove acpi cpu frequence controler
30 modprobe -r acpi_cpufreq
31
32 for i in $(seq 1 25); do
33 echo TRC6500
34 done
35
36 exit 0