From afa89d9b40a08c06a74d1de725830229276222e2 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Mon, 28 Jan 2008 16:40:14 -0800 Subject: Bugfix: 2688 Allow upper case hex values in smp_affinity parameter. Also get irq number of interface from /sys/class/net/..., which is more reliable than parsing it out of the output of /proc/interrupts. --- scripts/vyatta-irqaffin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/vyatta-irqaffin') diff --git a/scripts/vyatta-irqaffin b/scripts/vyatta-irqaffin index 6650175..90222e0 100644 --- a/scripts/vyatta-irqaffin +++ b/scripts/vyatta-irqaffin @@ -27,7 +27,7 @@ print_usage() get_irqnum() { - irqnum=`find /proc/irq -name $1 -print | awk -F / '{ print $4 }'` + irqnum=`cat /sys/class/net/$1/device/irq` if [ -z "$irqnum" ]; then echo "Invalid interface name: $1" return 1 @@ -46,7 +46,7 @@ get_mask() fi # strip out all the hex digits - exmask=`echo $mask | sed -e s/[0-9a-f]//g` + exmask=`echo $mask | sed -e s/[0-9a-fA-F]//g` # if anything is left, its not hex if [ ! -z "$exmask" ]; then -- cgit v1.2.3