#!/bin/sh
#
# sa4250_ch_guid  Copyright 2008 by Bradley S. Corsello
# Licensed under GPL
#
# Because the node number assigned to Firewire STBs can change, this 
# script changes channel on connnected SA4250 STB identified by GUID.
# You don't need to use the whole GUID, just enough to make it unique
#

GUID="$1"
CHANNEL="$2"

/usr/local/bin/sa4250_ch -n $(plugreport 2>/dev/null | awk '/'$GUID'/ {print $2}' - ) $CHANNEL
