File: 61-dmraid-imsm.rules

package info (click to toggle)
dracut 005-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,368 kB
  • ctags: 207
  • sloc: sh: 6,487; ansic: 192; makefile: 108
file content (24 lines) | stat: -rw-r--r-- 720 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# This file causes block devices with RAID (dmraid) signatures to
# automatically cause dmraid_scan to be run.
# See udev(8) for syntax

SUBSYSTEM!="block", GOTO="dm_end"
ACTION!="add|change", GOTO="dm_end"

ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="dm_end"

ENV{ID_FS_TYPE}!="*_raid_member", , GOTO="dm_end"

ENV{ID_FS_TYPE}=="isw_raid_member", ENV{rd_NO_MDIMSM}!="?*", GOTO="dm_end"

ENV{rd_NO_DM}=="?*", GOTO="dm_end"

PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && exit 0; done; exit 1;' ", \
    GOTO="dm_end"

ENV{DEVTYPE}!="partition", \
    RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"

RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan"

LABEL="dm_end"