#!/bin/bash set -e . /usr/share/debconf/confmodule db_get solaar/use_plugdev_group CONFIG=/etc/default/solaar if [ ! -f "$CONFIG" ]; then printf '# If true, users in the plugdev group will be able to use Solaar\n' > "$CONFIG" printf '# If uaccess is supported, the current console user will also have access\n' >> "$CONFIG" printf 'USE_PLUGDEV_GROUP="%s"\n' "$RET" >> "$CONFIG" fi USE_PLUGDEV_GROUP=false while IFS="=" read -r VAR VALUE _; do if [ "$VAR" = "USE_PLUGDEV_GROUP" ]; then USE_PLUGDEV_GROUP="${VALUE//\"/}" fi done < "$CONFIG" if [ "$USE_PLUGDEV_GROUP" = true ]; then # make sure the group exists if required if ! getent group plugdev >/dev/null; then groupadd --system plugdev || addgroup --system plugdev fi fi # Automatically added by dh_python3 if command -v py3compile >/dev/null 2>&1; then py3compile -p solaar /usr/share/solaar/lib || true fi if command -v pypy3compile >/dev/null 2>&1; then pypy3compile -p solaar /usr/share/solaar/lib || true fi # End automatically added section