Skip to content

Commit

Permalink
nc-automount fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed May 28, 2017
1 parent e917409 commit fb0ad98
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions etc/nextcloudpi-config.d/nc-automount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fb0ad98

Please sign in to comment.