summaryrefslogtreecommitdiffstats
path: root/files/90mgalive/mgalive-genrules.sh
blob: f450ebfa50d3ce30d82e711626ab6ad3b820d254 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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