summarylogtreecommitdiffstats
path: root/imod.install
diff options
context:
space:
mode:
authortildearrow2018-12-08 21:25:05 -0500
committertildearrow2018-12-08 21:25:05 -0500
commit00a6a15c8968962da6269558404739f6a4ce0397 (patch)
treec9815fdf391926ec7970686d32e1bd569598831f /imod.install
downloadaur-00a6a15c8968962da6269558404739f6a4ce0397.tar.gz
initial commit
Diffstat (limited to 'imod.install')
-rw-r--r--imod.install23
1 files changed, 23 insertions, 0 deletions
diff --git a/imod.install b/imod.install
new file mode 100644
index 000000000000..9c8b0c9ffa1f
--- /dev/null
+++ b/imod.install
@@ -0,0 +1,23 @@
+post_install() {
+ INSEXTRAFAIL=0
+ { udevadm control --reload-rules && udevadm trigger; } || INSEXTRAFAIL=1
+ sleep 1
+ modprobe uinput || INSEXTRAFAIL=1
+ if [ -e /dev/uinput ]
+ then chmod 660 /dev/uinput || INSEXTRAFAIL=1
+ chown root:input /dev/uinput || INSEXTRAFAIL=1
+ touch /dev/uinput
+ sleep 0.25
+ UISTAT=$(stat -c %a /dev/uinput)
+ if [ $UISTAT == "600" ]
+ then INSEXTRAFAIL=1
+ fi
+ else INSEXTRAFAIL=1
+ fi
+ echo "add yourself to the input group in order to be able to use the program:"
+ echo "sudo usermod -a -G input <username>"
+
+ if [ $INSEXTRAFAIL -eq 1 ]
+ then echo "additionally, you may have to reboot... :("
+ fi
+}