-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·39 lines (30 loc) · 1012 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
FILE=`pwd`/build/new-lg4ff/hid-logitech-new.ko
if test -f "$FILE"; then
echo "Creating a service on /etc/systemd/system/ ..."
echo "
[Unit]
Description=Loads new logitech driver for wheels.
DefaultDependencies=false
After=systemd-user-sessions.service
[Service]
Type=simple
WorkingDirectory=`pwd`
ExecStart=sh `pwd`/load-hid-logitech-new.sh --scope user
[Install]
Alias=hid-logitech-new.service
WantedBy=multi-user.target" > /etc/systemd/system/hid-logitech-new.service
echo "Disabling original module hid-logitech"
echo "Creating a black list file /etc/modprobe.d/hid-logitech-blacklist.conf"
echo "blacklist hid-logitech
install hid-logitech /bin/false
" > /etc/modprobe.d/hid-logitech-blacklist.conf
chmod +x /etc/systemd/system/hid-logitech-new.service
echo "Enable service..."
systemctl enable hid-logitech-new.service
echo "Starting service"
systemctl restart hid-logitech-new.service
echo "OK.Bye bye"
else
echo "$FILE does not exist. You must execute podman_build.sh first."
fi