From f2a08bfd0e1d7d7f2e62e81a287fd5cd867db817 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Thu, 19 Jun 2008 12:22:19 -0700 Subject: Bugfix: 3355 Handle case of user changing SMP affinity configuration of an interface. --- .../interfaces/ethernet/node.tag/smp_affinity/node.def | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'templates/interfaces') diff --git a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def b/templates/interfaces/ethernet/node.tag/smp_affinity/node.def index 850d1c1..9d5d289 100644 --- a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def +++ b/templates/interfaces/ethernet/node.tag/smp_affinity/node.def @@ -17,6 +17,16 @@ comp_help: Hexidecimal bitmask representing CPUs that this NIC will interrupt syntax:expression: exec "/opt/vyatta/sbin/vyatta-irqaffin check $VAR(../@) $VAR(@)" -create:expression: "sudo /opt/vyatta/sbin/vyatta-irqaffin set $VAR(../@) $VAR(@)"; "Error setting CPU affinity mask $VAR(@) on interface $VAR(../@)" +update: + sudo /opt/vyatta/sbin/vyatta-irqaffin set $VAR(../@) $VAR(@) + if [ $? -ne 0 ]; then + echo "Error setting CPU affinity mask $VAR(@) on interface $VAR(../@)" + exit 1 + fi -delete:expression: "sudo /opt/vyatta/sbin/vyatta-irqaffin reset $VAR(../@)"; "Error deleting CPU affinity mask on interface $VAR(../@)" +delete: + sudo /opt/vyatta/sbin/vyatta-irqaffin reset $VAR(../@) + if [ $? -ne 0 ]; then + echo "Error deleting CPU affinity mask on interface $VAR(../@)" + exit 1 + fi -- cgit v1.2.3