Hi,

in another 'thread'
(http://forums.slimdevices.com/showthread.php?108321-Max-instances-of-squeezelite-is-4)
here we had some disccusion about gerrelts script.


Since  i am not using this script but i do know it - i know that line is
from gerrelt.
Hopefully he sees that thread.

That are the lines

Code:
--------------------
    # get mac address from wifi adapter or on board network card
  SL_MAC_ADDRESS=$(ifconfig | grep '^wlan0 ' | tr -s ' ' | rev | sed -e 's/^[ 
\t]*//' | cut -d ' ' -f1 | rev)
  [ -n "$SL_MAC_ADDRESS" ] || SL_MAC_ADDRESS=$(ifconfig | grep 'eth0' | tr -s ' 
' | rev | sed -e 's/^[ \t]*//' | cut -d ' ' -f1 | rev)
--------------------


On my rpi these lines didnt show anything.

I would use something like that instead:

Code:
--------------------
    
  # ping your localhost subnet once
  ping -c1 127.0.0.0
  # find the networkdevice 
  device=$(arp -a|grep "on"|cut -d ' ' -f7|sort -u)
  # find the macadress of that device and use it as SL_MAC_ADDRESS
  SL_MAC_ADDRESS=$(cat /sys/class/net/$device/address)
  # make sure SL_MAC_ADDRESS contains : otherwise its empty or malformed 
/useless.
  echo $SL_MAC_ADDRESS|grep ":" ||SL_MAC_ADDRESS=""
  
--------------------


------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=108327

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to