aboutsummaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-03-30 22:18:53 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-03-30 22:18:53 +0200
commit3d52b2129312d5a91bb9619d78e0578c98f31547 (patch)
treea551a1d2e9ddfecdc9b765d860d09cbde67385fe /install
parent7beb31f48515cbc3eb0e91b09c2faa66ca286b15 (diff)
add hooks
Diffstat (limited to 'install')
-rwxr-xr-xinstall12
1 files changed, 12 insertions, 0 deletions
diff --git a/install b/install
new file mode 100755
index 0000000..5ee5f42
--- /dev/null
+++ b/install
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+USB_UUID="$1"
+
+[ -z "$USB_UUID" ] && echo ./install [UUID] && exit
+
+sed ./keyusbctl -e "s/\[USB_UUID\]/${USB_UUID}/g" > /usr/local/sbin/keyusbctl
+cp ./usb-unplug.rules /etc/udev/rules.d/
+cp ./elk.hook /etc/initcpio/hooks/elk
+cp ./elk.install /etc/initcpio/install/elk
+chmod +x /usr/local/sbin/keyusbctl
+echo type 'udevadm control --reload' to reload the udev rules