]> git.pld-linux.org Git - packages/dmraid.git/blob - dmraid-activation.sh
- add dmraid-activation service and script from main systemd package
[packages/dmraid.git] / dmraid-activation.sh
1 #!/bin/sh
2
3 # Read functions
4 . /lib/rc-scripts/functions
5
6 if [ -x /sbin/dmraid ]; then
7         modprobe -s dm-mod >/dev/null 2>&1
8         modprobe -s dm-mirror >/dev/null 2>&1
9         dmraidsets=$(LC_ALL=C /sbin/dmraid -s -c -i)
10         if [ "$?" = "0" ]; then
11                 oldIFS=$IFS
12                 IFS=$(echo -en "\n\b")
13                 for dmname in $dmraidsets ; do
14                         [[ "$dmname" = isw_* ]] && continue
15                         /sbin/dmraid -ay -i --rm_partitions -p "$dmname"
16                         [ -x /sbin/kpartx ] && /sbin/kpartx -u -a -p p "/dev/mapper/$dmname"
17                 done
18                 IFS=$oldIFS
19         fi
20 fi
This page took 0.056775 seconds and 3 git commands to generate.