summarylogtreecommitdiffstats
path: root/hook
diff options
context:
space:
mode:
authorPlaton Ryzhikov2019-02-07 15:16:03 +0300
committerPlaton Ryzhikov2019-02-07 15:16:03 +0300
commite6b6b49f957c8837ab986d0eefb69691794a7aca (patch)
treeb9d14658a1fe2f717e6cba3828101a25b9509e90 /hook
parenteff88c60dba8afbf2be424c4267760f08837e9b9 (diff)
downloadaur-e6b6b49f957c8837ab986d0eefb69691794a7aca.tar.gz
Add initramfs support
Diffstat (limited to 'hook')
-rw-r--r--hook21
1 files changed, 21 insertions, 0 deletions
diff --git a/hook b/hook
new file mode 100644
index 00000000000..556e58878ed
--- /dev/null
+++ b/hook
@@ -0,0 +1,21 @@
+#!/usr/bin/ash
+
+run_earlyhook() {
+ ln -sf /proc/self/fd /dev/fd
+ ln -sf /proc/self/fd/0 /dev/stdin
+ ln -sf /proc/self/fd/1 /dev/stdout
+ ln -sf /proc/self/fd/2 /dev/stderr
+ nldev -r /usr/bin/smdev &
+ echo $! > /run/nldev.pid
+}
+
+run_hook() {
+ msg ":: Triggering uevents..."
+ nltrigger add all
+ sleep 1s
+}
+
+run_cleanuphook() {
+ kill $(cat /run/nldev.pid)
+ rm /run/nldev.pid
+}