From d03a8d064e202a47ab52df7a42b4a0561c45238f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 29 Mar 2010 16:27:02 -0700 Subject: Ignore setting CPU affinity on UP systems If only one CPU, then not worth bothering doing any kind of interrrupt affinity. --- templates/interfaces/ethernet/node.tag/smp_affinity/node.def | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def b/templates/interfaces/ethernet/node.tag/smp_affinity/node.def index 098287cc..f62ef246 100644 --- a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def +++ b/templates/interfaces/ethernet/node.tag/smp_affinity/node.def @@ -29,6 +29,9 @@ syntax:expression: exec " \ fi" update: + if [ $(cat /sys/devices/system/cpu/present) -eq 0 ]; then + exit 0 + fi if [ "$VAR(@)" = "auto" ]; then echo "Setting SMP affinity for $VAR(../@) automatically." sudo /opt/vyatta/sbin/vyatta-auto-irqaffin.pl --setup $VAR(../@) -- cgit v1.2.3