@@ -211,15 +211,13 @@ xvfb-run ./tests/test_sunshine
211
211
cd %{_builddir }/Sunshine/build
212
212
%make_install
213
213
214
- # Add modules-load configuration
215
- # load the uhid module in initramfs even if it doesn't detect the module as being used during dracut
216
- # which must be run every time a new kernel is installed
217
- install -D -m 0644 /dev/stdin %{buildroot }/usr/lib/modules-load.d/uhid.conf << EOF
218
- uhid
219
- EOF
220
-
221
214
%post
222
215
# Note: this is copied from the postinst script
216
+
217
+ # Load uhid (DS5 emulation)
218
+ echo "Loading uhid kernel module for DS5 emulation."
219
+ modprobe uhid
220
+
223
221
# Check if we're in an rpm-ostree environment
224
222
if [ ! -x "$(command -v rpm-ostree)" ]; then
225
223
echo "Not in an rpm-ostree environment, proceeding with post install steps."
@@ -239,10 +237,6 @@ else
239
237
echo "rpm-ostree environment detected, skipping post install steps. Restart to apply the changes."
240
238
fi
241
239
242
- %preun
243
- # Remove modules-load configuration
244
- rm -f /usr/lib/modules-load.d/uhid.conf
245
-
246
240
%files
247
241
# Executables
248
242
%caps(cap_sys_admin+p) %{_bindir }/sunshine
@@ -255,7 +249,7 @@ rm -f /usr/lib/modules-load.d/uhid.conf
255
249
%{_udevrulesdir }/*-sunshine.rules
256
250
257
251
# Modules-load configuration
258
- %{_modulesloaddir }/uhid .conf
252
+ %{_modulesloaddir }/*-sunshine .conf
259
253
260
254
# Desktop entries
261
255
%{_datadir }/applications/*.desktop
0 commit comments