Merge branch 'silhouette-usbip' into 'master'

Silhouette usbip

See merge request fablab/labsync!42
This commit is contained in:
jalr 2018-10-23 20:02:53 +00:00
commit 99b461f552
3 changed files with 28 additions and 5 deletions

@ -1 +1 @@
Subproject commit 6b1d81884cd2df50ee78a248b8c3a219695bd38c Subproject commit 8afe49a2a52bb13bb2a34331e7c9625fb05529bf

View file

@ -1,7 +1,9 @@
--- ---
- name: install python-usb - name: install python-usb and usbip
apt: apt:
name: python-usb name:
- python-usb
- usbip
state: present state: present
- name: copy files - name: copy files
@ -10,8 +12,29 @@
dest: /usr/share/inkscape/extensions dest: /usr/share/inkscape/extensions
owner: root owner: root
group: root group: root
mode: "0644"
loop: loop:
- sendto_silhouette.inx - sendto_silhouette.inx
- sendto_silhouette.py - sendto_silhouette.py
- silhouette - silhouette
- name: usbip.sh should be executable
file:
dest: "/usr/share/inkscape/extensions/silhouette/usbip.sh"
owner: root
group: root
mode: "0755"
- name: add lp group to guest account
lineinfile:
path: /etc/guest-account/groups
line: lp
create: yes
- name: add sudoers config
copy:
content: "%lp ALL=(root) NOPASSWD:/usr/share/inkscape/extensions/silhouette/usbip.sh\n"
dest: /etc/sudoers.d/silhouette
owner: root
group: root
mode: "0644"

View file

@ -23,7 +23,7 @@ fi
# read list of supplementary groups of the guest account from file # read list of supplementary groups of the guest account from file
if [ -f /etc/guest-account/groups ]; then if [ -f /etc/guest-account/groups ]; then
GROUPS="$(cat /etc/guest-account/groups)" GROUPS="$(awk '{ if (NR==1) printf "%s", $0; else printf ",%s", $0; } END { print "" }' /etc/guest-account/groups)"
fi fi
is_system_user () is_system_user ()