diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-05-28 22:14:57 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-05-28 22:14:57 +0300 |
commit | fb0ad989f8a303520a48517025d4fe2cff85464f (patch) | |
tree | bd487b1d1ef831306d6900a5775cb53e3dc1190f /etc/nextcloudpi-config.d/nc-automount.sh | |
parent | e917409291e0c06195a8b749a5a025551b7f9491 (diff) |
nc-automount fixesv0.12.14
Diffstat (limited to 'etc/nextcloudpi-config.d/nc-automount.sh')
-rwxr-xr-x | etc/nextcloudpi-config.d/nc-automount.sh | 7 |
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" |