clean rc.local for xdf-12mhz, xdf-30mhz, and mhf
[debian6500.git] / master / opt / cluster / acq / etc / rc.local
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