summaryrefslogtreecommitdiffstats
path: root/src/boot-env/pbs/uclib-rootfs/bin/bbinit
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot-env/pbs/uclib-rootfs/bin/bbinit')
-rwxr-xr-xsrc/boot-env/pbs/uclib-rootfs/bin/bbinit19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/boot-env/pbs/uclib-rootfs/bin/bbinit b/src/boot-env/pbs/uclib-rootfs/bin/bbinit
new file mode 100755
index 00000000..3fd67612
--- /dev/null
+++ b/src/boot-env/pbs/uclib-rootfs/bin/bbinit
@@ -0,0 +1,19 @@
+#!/bin/hush
+
+# create clean setup
+mkdir -p /etc/events.conf
+mkdir -p /etc/events.d
+rm /etc/events.d/*
+for f in $(ls -1 /etc/events)
+do
+ ln -sf /etc/events/$f /etc/events.d/$f
+done
+
+mkdir -p /tmp/event
+rm /tmp/event/*
+rm /tmp/events
+
+# start bbinit
+inotifyd /bin/handleEvents /tmp/event/:n &
+# initial call (executing all zero dependent scipts)
+handleEvents