Commit | Line | Data |
---|---|---|
09d7a212 | 1 | #!/bin/bash |
5316baff LM |
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. | |
5316baff | 11 | |
09d7a212 LM |
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; } | |
2c2423eb | 27 | done |
2c2423eb | 28 | |
a299db21 LM |
29 | # remove acpi cpu frequence controler |
30 | modprobe -r acpi_cpufreq | |
31 | ||
2c2423eb | 32 | for i in $(seq 1 25); do |
09d7a212 | 33 | echo TRC6500 |
5316baff LM |
34 | done |
35 | ||
36 | exit 0 |