forked from rohitpid/Linux-Magic-Trackpad-2-Driver
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fix removes the need for external files to load the driver. It turns out the driver already loaded itself, but without a delay it would fail. This is now fixed. Based on the work seen here johnchen902/linux@cb700d0
- Loading branch information
1 parent
dd4d31f
commit e050c13
Showing
8 changed files
with
104 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
#!/bin/bash | ||
|
||
if [ "$EUID" -ne 0 ] | ||
then echo "Please run as root" | ||
exit | ||
fi | ||
|
||
set -e | ||
set -x | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
OPT_DIR="/opt/magicmouse-hid" | ||
UDEV_DIR="/etc/udev/rules.d" | ||
MODPROBE_DIR="/etc/modprobe.d" | ||
|
||
# Remove drive through DKMS | ||
chmod u+x ${DIR}/scripts/remove.sh | ||
${DIR}/scripts/remove.sh | ||
|
||
# Remove loaded driver | ||
modprobe -r hid_magicmouse | ||
|
||
# Remove Modprobe configuration file | ||
rm -f ${MODPROBE_DIR}/hid-magicmouse.conf | ||
|
||
# Copy `.ko` and script to activate it to OPT directory | ||
rm -rf ${OPT_DIR} | ||
|
||
# Remove the udev rule and reload udev | ||
rm -f ${UDEV_DIR}/10-magicmouse.rules | ||
udevadm control -R | ||
|
||
# Restart Bluetooth | ||
systemctl restart bluetooth |
This file was deleted.
Oops, something went wrong.