fix(packaging): apply udev rules for uhid (#3041)
Some checks are pending
CI / GitHub Env Debug (push) Waiting to run
CI / Setup Release (push) Waiting to run
CI / Setup Flatpak Matrix (push) Waiting to run
CI / Linux Flatpak (push) Blocked by required conditions
CI / Linux ${{ matrix.type }} (--appimage-build, 22.04, AppImage) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 12) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 13) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 14) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest) (push) Blocked by required conditions
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest, true) (push) Blocked by required conditions
CI / Macports (macOS-${{ matrix.os_version }}) (12, true) (push) Blocked by required conditions
CI / Macports (macOS-${{ matrix.os_version }}) (13) (push) Blocked by required conditions
CI / Macports (macOS-${{ matrix.os_version }}) (14) (push) Blocked by required conditions
CI / Windows (push) Blocked by required conditions
CI Docker / Check Dockerfiles (push) Waiting to run
CI Docker / Setup Release (push) Blocked by required conditions
CI Docker / Lint Dockerfile${{ matrix.tag }} (push) Blocked by required conditions
CI Docker / Docker${{ matrix.tag }} (push) Blocked by required conditions
CodeQL / Get language matrix (push) Waiting to run
CodeQL / Analyze (${{ matrix.name }}) (push) Blocked by required conditions
Build GH-Pages / update_pages (push) Waiting to run

This commit is contained in:
Cameron Gutman 2024-08-19 08:29:49 -05:00 committed by GitHub
parent 170f4dd181
commit 17c4b26af0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -49,6 +49,7 @@ function install() {
cat "$SUNSHINE_SHARE_HERE/udev/rules.d/60-sunshine.rules" | sudo tee /etc/udev/rules.d/60-sunshine.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --property-match=DEVNAME=/dev/uinput
sudo udevadm trigger --property-match=DEVNAME=/dev/uhid
# sunshine service
mkdir -p ~/.config/systemd/user

View File

@ -5,7 +5,9 @@ do_setcap() {
do_udev_reload() {
udevadm control --reload-rules
udevadm trigger --property-match=DEVNAME=/dev/uinput
udevadm trigger --property-match=DEVNAME=/dev/uhid
modprobe uinput || true
modprobe uhid || true
}
post_install() {

View File

@ -8,9 +8,10 @@ if [ -x "$path_to_setcap" ] ; then
$path_to_setcap cap_sys_admin+p $path_to_sunshine
fi
# Trigger udev rule reload for /dev/uinput
# Trigger udev rule reload for /dev/uinput and /dev/uhid
path_to_udevadm=$(which udevadm)
if [ -x "$path_to_udevadm" ] ; then
$path_to_udevadm control --reload-rules
$path_to_udevadm trigger --property-match=DEVNAME=/dev/uinput
$path_to_udevadm trigger --property-match=DEVNAME=/dev/uhid
fi