summaryrefslogtreecommitdiffstats
path: root/modules.d/90mgalive/mgalive-genrules.sh
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/90mgalive/mgalive-genrules.sh')
-rwxr-xr-xmodules.d/90mgalive/mgalive-genrules.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules.d/90mgalive/mgalive-genrules.sh b/modules.d/90mgalive/mgalive-genrules.sh
new file mode 100755
index 0000000..f450ebf
--- /dev/null
+++ b/modules.d/90mgalive/mgalive-genrules.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+case "$root" in
+ mgalive:/dev/*)
+ {
+ printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/mgalive-root $env{DEVNAME}"\n' \
+ ${root#mgalive:/dev/}
+ printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/mgalive-root $env{DEVNAME}"\n' \
+ ${root#mgalive:/dev/}
+ } >> /etc/udev/rules.d/99-mgalive.rules
+ wait_for_dev "${root#mgalive:}"
+ ;;
+ mgalive:*)
+ if [ -f "${root#mgalive:}" ]; then
+ /sbin/initqueue --settled --onetime --unique /sbin/mgalive-root "${root#mgalive:}"
+ fi
+ ;;
+esac