diff --git a/roles/usb_lib/README.rst b/roles/usb_lib/README.rst index 06ae5f1b5..722eb3b44 100644 --- a/roles/usb_lib/README.rst +++ b/roles/usb_lib/README.rst @@ -18,14 +18,13 @@ Automount is handled by usbmount, and scripts in this role look in the root of t ...and if found, creates a symlink of the form /library/www/html/local_content/USBn pointing to /media/usbn. -USB drives must be formatted with one of the filesystems listed under "FILESYSTEMS=" at /etc/usbmount/usbmount.conf +USB drives must be formatted with one of the filesystems listed under "FILESYSTEMS=" at ``/etc/usbmount/usbmount.conf`` — these are specified on/around Line 67 of: `/opt/iiab/iiab/roles/usb_lib/tasks/install.yml `_ + +In March 2021, Kolibri exports were enabled, using ``umask=0000`` (also within /etc/usbmount/usbmount.conf) to override what was ``umask=0022`` by default: `PR #2715 `_ Official `usbmount `_ documentation, from 2010: * https://github.com/hfuchs/usbmount/blob/master/README * https://github.com/hfuchs/usbmount/blob/master/usbmount.conf -As of March 2021, better Kolibri integration/support is being investigated: `#2713 `_ - -Legacy: There is also a patch for problems with automount on Fedora 21+. -Please Note that as of 4.1.8-200.fc22.x86_64 not all USB drives will mount, even with this patch. +Legacy warning: There is also a patch for problems with automount on Fedora 21+. Please note that as of 4.1.8-200.fc22.x86_64 not all USB drives will mount, even with this patch. diff --git a/roles/usb_lib/tasks/install.yml b/roles/usb_lib/tasks/install.yml index 49f5044ef..8ec96623c 100644 --- a/roles/usb_lib/tasks/install.yml +++ b/roles/usb_lib/tasks/install.yml @@ -61,12 +61,25 @@ - { src: 'iiab-usb_lib-show-all-off', dest: '/usr/bin/', mode: '0755' } - { src: 'iiab-clean-usb.sh', dest: '/usr/sbin/', mode: '0755' } -- name: Enable exFAT and NTFS in /etc/usbmount/usbmount.conf +- name: Add ' exfat fuseblk ntfs' to FILESYSTEMS var in /etc/usbmount/usbmount.conf lineinfile: - regexp: '^FILESYSTEMS.*' + regexp: '^FILESYSTEMS=.*' line: 'FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus exfat fuseblk ntfs"' path: /etc/usbmount/usbmount.conf +- name: "Set 'umask=0000' for {VFAT/FAT32, NTFS, exFAT} using var FS_MOUNTOPTIONS in /etc/usbmount/usbmount.conf, so Kolibri exports work" + lineinfile: + regexp: '^FS_MOUNTOPTIONS=.*' + line: 'FS_MOUNTOPTIONS="-fstype=vfat,umask=0000 -fstype=ntfs,umask=0000 -fstype=exfat,umask=0000"' + path: /etc/usbmount/usbmount.conf + +# Setting 'umask=0000' for all filesystems: (accomplishes the same thing as above) +#- name: "Add ',umask=0000' to MOUNTOPTIONS var in /etc/usbmount/usbmount.conf, so Kolibri exports work" +# lineinfile: +# regexp: '^MOUNTOPTIONS=.*' +# line: 'MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,umask=0000"' +# path: /etc/usbmount/usbmount.conf + - name: Install /etc/{{ apache_conf_dir }}/content_dir.conf from template template: src: content_dir.conf