From 94f7012fbb3debfc1e945dc0cdaec3993db9ee33 Mon Sep 17 00:00:00 2001 From: George Date: Sat, 8 Jun 2024 15:55:34 +0100 Subject: [PATCH] Now works on named filesystems --- automount-usb.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/automount-usb.sh b/automount-usb.sh index 489b5af..6f7ebe9 100644 --- a/automount-usb.sh +++ b/automount-usb.sh @@ -93,9 +93,11 @@ fi runuser userplaceholder -s /bin/bash -c "udisksctl mount -b /dev/${PART} --no-user-interaction" +MOUNTPOINT=`lsblk /dev/${PART} -o MOUNTPOINTS -n` + if [ -f /usr/local/bin/ps3netsrv++ ]; then pkill ps3netsrv++ - /usr/local/bin/ps3netsrv++ -d /media/userplaceholder/$UUID + /usr/local/bin/ps3netsrv++ -d ${MOUNTPOINT} fi #create a new smb share for the mounted drive @@ -108,7 +110,7 @@ map to guest = bad user allow insecure wide links = yes [share] Comment = default shared folder -Path = /media/userplaceholder/$UUID +Path = ${MOUNTPOINT} Browseable = yes Writeable = Yes only guest = no