Skip to content

Commit

Permalink
Update mount-smb.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
hifiberry committed Jul 8, 2020
1 parent d1a5deb commit 5079210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions buildroot/package/hifiberry-automount/mount-smb.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash
BASEDIR=/data/library/music
for m in `cat /etc/smbmounts.conf | grep -v ^#`; do
dir=`echo $m | awk -F, '{print $1}'`
dir=`echo $m | awk -F\; '{print $1}'`
if [ ! -d $BASEDIR/$dir ]; then
mkdir -p $BASEDIR/$dir
fi
# Check if share is on a .local host, resolve this first
HOST=`echo $m | awk -F, '{print $2}' | awk -F\/ '{print $3}'`
HOST=`echo $m | awk -F\; '{print $2}' | awk -F\/ '{print $3}'`
if [[ $HOST == *.local ]]; then
IP=`avahi-resolve-host-name $HOST | awk '{print $2}'`
if [ "$IP" != "" ]; then
Expand Down

0 comments on commit 5079210

Please sign in to comment.