mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
commit
5d5df0e8bd
9 changed files with 62 additions and 12 deletions
|
@ -19,8 +19,8 @@
|
|||
name:
|
||||
# - avahi-discover
|
||||
- avahi-daemon
|
||||
- exfat-fuse
|
||||
- exfat-utils
|
||||
- exfat-fuse # Should no longer be nec with 5.4+ kernels.
|
||||
- exfat-utils # Likewise.
|
||||
- inetutils-syslogd
|
||||
- libnss-mdns
|
||||
- wpasupplicant
|
||||
|
|
|
@ -16,16 +16,16 @@ Automount is handled by usbmount, and scripts in this role look in the root of t
|
|||
* /Share
|
||||
* /Piratebox/Share
|
||||
|
||||
...and if found, creates a symlink of the form /library/www/html/local_content/USBn pointing to /media/usbn.
|
||||
...and if found, creates a symlink of the form /library/www/html/local_content/USBn pointing to /media/usbn — where n is generally one of {0, 1, 2, 3, 4, 5, 6, 7}.
|
||||
|
||||
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 76 of: `/opt/iiab/iiab/roles/usb_lib/tasks/install.yml <https://github.com/iiab/iiab/blob/master/roles/usb_lib/tasks/install.yml#L76>`_
|
||||
|
||||
Official `usbmount <https://github.com/hfuchs/usbmount>`_ documentation, from 2010:
|
||||
IIAB will generally mount USB drives 'rw' allowing root to both read and write to them. In addition, in March 2021 (`PR #2715 <https://github.com/iiab/iiab/issues/2715>`_) Kolibri exports were enabled by also giving non-root users read and write access to VFAT/FAT32, NTFS and exFAT USB drives, using ``umask=0000`` (in /etc/usbmount/usbmount.conf) to override the ``umask=0022`` default. If however you prefer to restore usbmount's default, set ``usb_lib_umask0000_for_kolibri: False`` in `/etc/iiab/local_vars.yml <http://FAQ.IIAB.IO/#What_is_local_vars.yml_and_how_do_I_customize_it.3F>`_ prior to installing IIAB.
|
||||
|
||||
* https://github.com/hfuchs/usbmount/blob/master/README
|
||||
* https://github.com/hfuchs/usbmount/blob/master/usbmount.conf
|
||||
Official `usbmount 0.0.22 (2011-08-08) <https://github.com/rbrito/usbmount/releases>`_ documentation:
|
||||
|
||||
As of March 2021, better Kolibri integration/support is being investigated: `#2713 <https://github.com/iiab/iiab/issues/2713>`_
|
||||
* https://github.com/hfuchs/usbmount/blob/master/README (2010-08-11)
|
||||
* https://github.com/rbrito/usbmount/blob/master/README.md (2018-08-10)
|
||||
* https://github.com/rbrito/usbmount/blob/master/usbmount.conf (2010-04-25)
|
||||
|
||||
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.
|
||||
|
|
|
@ -4,5 +4,9 @@
|
|||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
# iiab_usb_lib_show_all: True
|
||||
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
# usb_lib_umask0000_for_kolibri: True
|
||||
|
||||
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# Official usbmount 0.0.22 (2011-08-08) documentation:
|
||||
# https://github.com/rbrito/usbmount/releases
|
||||
# https://github.com/hfuchs/usbmount/blob/master/README (2010-08-11)
|
||||
# https://github.com/rbrito/usbmount/blob/master/README.md (2018-08-10)
|
||||
# https://github.com/rbrito/usbmount/blob/master/usbmount.conf (2010-04-25)
|
||||
|
||||
- name: Does systemd-udevd.service exist
|
||||
stat:
|
||||
path: "{{ systemd_location }}/systemd-udevd.service"
|
||||
|
@ -61,12 +67,39 @@
|
|||
- { 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
|
||||
# 2021-03-21: If usbmount is repackaged by apt as a result of Linux kernel 5.4+
|
||||
# supporting exFAT, the stanza below (might) in future no longer be needed...
|
||||
# SEE ALSO: https://github.com/iiab/iiab/blob/master/roles/2-common/tasks/packages.yml#L22-L23
|
||||
- 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
|
||||
when: usb_lib_umask0000_for_kolibri
|
||||
|
||||
# Setting 'umask=0000' for all filesystems: (much the same thing as above, as
|
||||
# the mount command does not use this umask setting for filesystems like ext4)
|
||||
#- 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
|
||||
# when: usb_lib_umask0000_for_kolibri
|
||||
|
||||
- name: 'Set FS_MOUNTOPTIONS="" in /etc/usbmount/usbmount.conf, e.g. if Kolibri will not be used'
|
||||
lineinfile:
|
||||
regexp: '^FS_MOUNTOPTIONS=.*'
|
||||
line: 'FS_MOUNTOPTIONS=""' # Restore apt pkg default, if runrole forced
|
||||
path: /etc/usbmount/usbmount.conf
|
||||
when: not usb_lib_umask0000_for_kolibri
|
||||
|
||||
# 2021-03-25: Consider removing this stanza & all of this role's Apache logic!
|
||||
- name: Install /etc/{{ apache_conf_dir }}/content_dir.conf from template
|
||||
template:
|
||||
src: content_dir.conf
|
||||
|
|
|
@ -316,6 +316,9 @@ usb_lib_install: True
|
|||
usb_lib_enabled: True
|
||||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
iiab_usb_lib_show_all: True
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
usb_lib_umask0000_for_kolibri: True
|
||||
|
||||
# Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info)
|
||||
nodocs: False
|
||||
|
|
|
@ -203,6 +203,9 @@ samba_enabled: False
|
|||
|
||||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
iiab_usb_lib_show_all: True
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
usb_lib_umask0000_for_kolibri: True
|
||||
|
||||
|
||||
# 5-XO-SERVICES
|
||||
|
|
|
@ -13,6 +13,7 @@ munin_enabled: True
|
|||
vnstat_install: True
|
||||
vnstat_enabled: True
|
||||
openvpn_handle: "Medical IIAB - Put Your Name Here"
|
||||
usb_lib_umask0000_for_kolibri: False
|
||||
# By default
|
||||
# kiwix
|
||||
# awstats
|
||||
|
|
|
@ -203,6 +203,9 @@ samba_enabled: False
|
|||
|
||||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
iiab_usb_lib_show_all: True
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
usb_lib_umask0000_for_kolibri: True
|
||||
|
||||
|
||||
# 5-XO-SERVICES
|
||||
|
|
|
@ -203,6 +203,9 @@ samba_enabled: False
|
|||
|
||||
# Show entire contents of USB sticks/drives (at http://box/usb)
|
||||
iiab_usb_lib_show_all: True
|
||||
# Set umask=0000 for VFAT, NTFS and exFAT in /etc/usbmount/usbmount.conf so
|
||||
# Kolibri can export & import channels to USB sticks/drive:
|
||||
usb_lib_umask0000_for_kolibri: True
|
||||
|
||||
|
||||
# 5-XO-SERVICES
|
||||
|
|
Loading…
Reference in a new issue