Fix regexp for mdadm.conf update
authorJamie Cameron <jcameron@webmin.com>
Mon, 20 Oct 2008 17:48:38 +0000 (17:48 +0000)
committerJamie Cameron <jcameron@webmin.com>
Mon, 20 Oct 2008 17:48:38 +0000 (17:48 +0000)
raid/raid-lib.pl

index 68227f2..1961024 100644 (file)
@@ -371,7 +371,7 @@ if ($raid_mode eq "mdadm") {
                        }
                elsif ($lref->[$i] =~ /^ARRAY\s+(\S+)/ &&
                       $1 eq $_[0]->{'value'}) {
-                       $lref->[$i] =~ s/devices=(\S+)/devices=$1,$_[1]/;
+                       $lref->[$i] =~ s/(\s)devices=(\S+)/${1}devices=${2},$_[1]/;
                        }
                }
        &flush_file_lines();