Needed for "--layout o2".
Spaces must be substituted by '#'.
---
 auto-raidcfg | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/auto-raidcfg b/auto-raidcfg
index 01722c1..f0d4643 100755
--- a/auto-raidcfg
+++ b/auto-raidcfg
@@ -21,12 +21,9 @@ create_raid() {
 
        FS_TYPE="$4"
        MOUNTPOINT="$5"
-       DEVICES="$6"
-       SPARE_DEVICES="$7"
-
-       RAID_DEVICES=$(echo $DEVICES | sed -e "s/#/ /g")
-
-       SPARE_DEVICES=$(echo $SPARE_DEVICES | sed -e "s/#/ /g")
+       RAID_DEVICES=$(echo $6 | sed -e "s/#/ /g")
+       SPARE_DEVICES=$(echo $7 | sed -e "s/#/ /g")
+       EXTRA_ARGS=$(echo $8 | sed -e "s/#/ /g")
 
        NAMED_SPARES=$(echo $SPARE_DEVICES | wc -w)
 
@@ -76,7 +73,7 @@ create_raid() {
 
        if ! log-output -t partman-auto-raid \
                mdadm --create /dev/md$MD_NUM --auto=yes --force -R -l 
raid$RAID_TYPE \
-                     -n $DEV_COUNT $MDADM_PARAMS
+                     -n $DEV_COUNT $MDADM_PARAMS $EXTRA_ARGS
        then
                logger -t partman-auto-raid "Error creating array 
/dev/md$MD_NUM"
                exit 1
@@ -119,10 +116,10 @@ while [ -n "$recipes" ]; do
 
        # Do the recipe!
        echo $recipe >/tmp/partman-auto-raid-recipe
-       read raidtype devcount sparecount fstype mountpoint devs sparedevs \
+       read raidtype devcount sparecount fstype mountpoint devs sparedevs args 
\
                </tmp/partman-auto-raid-recipe
        create_raid $raidtype $devcount $sparecount $fstype $mountpoint \
-               $devs $sparedevs
+               $devs $sparedevs $args
 done
 
 exit 0
-- 
1.9.1


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: 
https://lists.debian.org/765be2a20f2f7f76a519539e7508eebaced30c06.1436447716.git.h...@univention.de

Reply via email to