1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #3913 from avni/renamevar

vars/* and usb_lib/*: rename usb_lib_umask0000_for_kolibri
This commit is contained in:
A Holt 2025-01-29 04:50:37 -05:00 committed by GitHub
commit 078bab6d15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 44 additions and 65 deletions

View file

@ -7,8 +7,8 @@
# https://github.com/rbrito/usbmount/blob/master/README.md (2018-08-10)
# https://github.com/rbrito/usbmount/blob/master/usbmount.conf (2010-04-25)
# usb_lib_umask0000_for_kolibri (e.g., in /etc/iiab/local_vars.yml) must be set to true in order to be able to write to mounted USB sticks
# If you are still not able to write to a mounted USB stick, you can unmount the drive (sudo umount <mountpoint>) and then remount it setting umask to 0000 manually (sudo mount -o umask=0000 <device name> <mountpoint>).
# usb_lib_writable_sticks (e.g., in /etc/iiab/local_vars.yml) must be set to true in order for non-root users to be able to write to VFAT/FAT32, NTFS and exFAT USB sticks.
# If you are still not able to write to a mounted USB stick, try unmounting the drive (sudo umount <mountpoint>) and then remount it setting umask to 0000 manually (sudo mount -o umask=0000 <device name> <mountpoint>).
- name: Record (initial) disk space used

View file

@ -32,12 +32,12 @@
# If setup.yml becomes the norm in future, put the 2-3 stanzas below in there:
- name: "Set 'umask=0000' for {VFAT/FAT32, NTFS, exFAT} using var FS_MOUNTOPTIONS in /etc/usbmount/usbmount.conf, so Kolibri exports work"
- name: "Set 'umask=0000' for {VFAT/FAT32, NTFS, exFAT} using var FS_MOUNTOPTIONS in /etc/usbmount/usbmount.conf -- for Kolibri exports AND student uploads to teacher's USB stick (using http://box/usb)"
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
when: usb_lib_writable_sticks
# 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)
@ -46,14 +46,14 @@
# regexp: '^MOUNTOPTIONS=.*'
# line: 'MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,umask=0000"'
# path: /etc/usbmount/usbmount.conf
# when: usb_lib_umask0000_for_kolibri
# when: usb_lib_writable_sticks
- name: 'Set FS_MOUNTOPTIONS="" in /etc/usbmount/usbmount.conf, e.g. if Kolibri will not be used'
- name: 'Set FS_MOUNTOPTIONS="" in /etc/usbmount/usbmount.conf -- e.g. if Kolibri exports AND student uploads to teacher USB stick are not needed'
lineinfile:
regexp: '^FS_MOUNTOPTIONS=.*'
line: 'FS_MOUNTOPTIONS=""' # Restore apt pkg default, e.g. for runrole
path: /etc/usbmount/usbmount.conf
when: not usb_lib_umask0000_for_kolibri
when: not usb_lib_writable_sticks
- name: Enable/Disable/Restart NGINX
@ -66,12 +66,6 @@
path: /etc/usbmount/mount.d/00_create_model_symlink
state: absent
- name: Put variable in iiab.env that enables display of content at root of USB
lineinfile:
path: "{{ iiab_env_file }}"
regexp: "^IIAB_USB_LIB_SHOW_ALL.*"
line: "IIAB_USB_LIB_SHOW_ALL={{ iiab_usb_lib_show_all }}"
- name: Add 'usb_lib' variable values to {{ iiab_ini_file }}
ini_file:
@ -88,5 +82,5 @@
value: "{{ usb_lib_install }}"
- option: usb_lib_enabled
value: "{{ usb_lib_enabled }}"
- option: usb_lib_umask0000_for_kolibri
value: "{{ usb_lib_umask0000_for_kolibri }}"
- option: usb_lib_writable_sticks
value: "{{ usb_lib_writable_sticks }}"