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

mount root directory

This commit is contained in:
George Hunt 2018-03-13 15:06:12 -04:00
parent 47e59309dc
commit b1f5a078b1
7 changed files with 32 additions and 3 deletions

View file

@ -4,6 +4,7 @@ IIAB_BASE_PATH={{ iiab_base }}
IIAB_DIR={{ iiab_dir }}
IIAB_RELEASE={{ iiab_base_ver }}
IIAB_REVISION={{ iiab_revision }}
IIAB_USB_LIB_SHOW_ALL={{ iiab_usb_lib_show_all }}
OS={{ ansible_local.local_facts.os }}
OS_VER={{ ansible_local.local_facts.os_ver }}
WWWROOT={{ doc_root }}

View file

@ -19,9 +19,12 @@
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
with_items:
- { src: 'usbmount@.service.j2' , dest: '/etc/systemd/system/usbmount@.service' }
- { src: 'usbmount.rules.j2' , dest: '/etc/udev/rules.d/usbmount.rules' }
- { src: 'usbmount@.service.j2' , dest: '/etc/systemd/system/usbmount@.service', mode: '0644' }
- { src: 'usbmount.rules.j2' , dest: '/etc/udev/rules.d/usbmount.rules', mode: '0644' }
- { src: 'iiab-usb-lib-show-all-on' , dest: '/usr/bin/', mode: '0755' }
- { src: 'iiab-usb-lib-show-all-off' , dest: '/usr/bin/', mode: '0755' }
- name: Enable exfat and ntfs
lineinfile:

View file

@ -0,0 +1,6 @@
#!/bin/bash
# turn on the flag which registers new USB sticks at root directory
sed -i -e's/^IIAB_USB_LIB_SHOW_ALL.*/IIAB_USB_LIB_SHOW_ALL=False/' /etc/iiab/iiab.env
udevadm trigger -t subsystems -s usb -c add

View file

@ -0,0 +1,6 @@
#!/bin/bash
# turn on the flag which registers new USB sticks at root directory
sed -i -e's/^IIAB_USB_LIB_SHOW_ALL.*/IIAB_USB_LIB_SHOW_ALL=True/' /etc/iiab/iiab.env
udevadm trigger -t subsystems -s usb -c add

View file

@ -9,7 +9,15 @@
#
# by Tim Moody tim@timmoody.com
logger -p user.notice -t "70-usb-library" -- "Looking for /share, /Share, /Piratebox/Share, /USB, or /usb on $UM_MOUNTPOINT."
source /etc/iiab/iiab.env
case $IIAB_USB_LIB_SHOW_ALL in
'True'|'true'|'TRUE')
logger -p user.notice -t "70-usb-library" -- "Displaying root directory on $UM_MOUNTPOINT."
;;
*)
logger -p user.notice -t "70-usb-library" -- "Looking for /share, /Share, /Piratebox/Share, /USB, or /usb on $UM_MOUNTPOINT."
;;
esac
VERBOSE=yes
@ -31,6 +39,9 @@ fi
if [ -d $UM_MOUNTPOINT/usb ]; then
SHARE_DIR="$UM_MOUNTPOINT/usb"
fi
if [ -d $UM_MOUNTPOINT ]; then
SHARE_DIR="$UM_MOUNTPOINT"
fi
if [ ! -z "$SHARE_DIR" ]; then
logger -p user.notice -t "70-usb-library" -- "Found Share Directory $SHARE_DIR."

View file

@ -206,6 +206,7 @@ samba_enabled: False
# usb-lib
usb_lib_install: True
usb_lib_enabled: True
iiab_usb_lib_show_all: False
# Toggle iiab-refresh-wiki-docs scraping for offline docs (http://box/info)
nodocs: False

View file

@ -19,3 +19,4 @@ sshd_service: ssh
php_version: 7.1
postgresql_version: 9.6
systemd_location: /lib/systemd/system
iiab_usb_lib_show_all: True