diff options
Diffstat (limited to 'modules.d/90mgalive/mgalive-genrules.sh')
-rwxr-xr-x | modules.d/90mgalive/mgalive-genrules.sh | 18 |
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 |