Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2017-05-28 22:14:57 +0300
committernachoparker <nacho@ownyourbits.com>2017-05-28 22:14:57 +0300
commitfb0ad989f8a303520a48517025d4fe2cff85464f (patch)
treebd487b1d1ef831306d6900a5775cb53e3dc1190f
parente917409291e0c06195a8b749a5a025551b7f9491 (diff)
nc-automount fixesv0.12.14
-rwxr-xr-xetc/nextcloudpi-config.d/nc-automount.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/etc/nextcloudpi-config.d/nc-automount.sh b/etc/nextcloudpi-config.d/nc-automount.sh
index d3ab2930..3e95db67 100755
--- a/etc/nextcloudpi-config.d/nc-automount.sh
+++ b/etc/nextcloudpi-config.d/nc-automount.sh
@@ -92,13 +92,10 @@ ACTION!="remove", PROGRAM="/usr/local/etc/blknum", RUN+="/bin/mkdir -p /media/US
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
# Link with label name if exists
-ACTION!="remove", ENV{ID_FS_LABEL}!="", RUN+="/bin/ln -s /media/USBdrive%c /media/%E{ID_FS_LABEL}"
-
-# Clean up created directory
-ACTION=="remove", RUN+="/bin/rmdir /media/USBdrive%c"
+ACTION!="remove", ENV{ID_FS_LABEL}!="", ENV{ID_FS_LABEL}!="USBdrive*", RUN+="/bin/ln -sT /media/USBdrive%c /media/%E{ID_FS_LABEL}"
# Cleanup created link
-ACTION=="remove", ENV{ID_FS_LABEL}!="", RUN+="/bin/rm /media/%E{ID_FS_LABEL}"
+ACTION=="remove", ENV{ID_FS_LABEL}, ENV{ID_FS_LABEL}!="USBdrive*"!="", RUN+="/bin/rm /media/%E{ID_FS_LABEL}"
# Exit
LABEL="exit"